Changeset 1839


Ignore:
Timestamp:
04/25/07 17:42:26 (6 years ago)
Author:
rob
Message:

2007-04-25 Rob Bradford <rob@…>

  • libmokoui/moko-paned-window.c: (moko_paned_window_init), (moko_paned_window_set_ratio): Improve the moko_paned_window_set_ratio function. It's just the ratio of the top half (including menu area and toolbox) to the bottom half. No need to be try and be clever about considering the menu and toolbox because its not clear what the ratio means in that case. Set a default ratio of 1:1.
Location:
trunk/src/target/OM-2007/openmoko-libs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/OM-2007/openmoko-libs/ChangeLog

    r1833 r1839  
     12007-04-25  Rob Bradford  <rob@openedhand.com> 
     2 
     3        * libmokoui/moko-paned-window.c: (moko_paned_window_init), 
     4        (moko_paned_window_set_ratio): 
     5        Improve the moko_paned_window_set_ratio function. It's just the ratio 
     6        of the top half (including menu area and toolbox) to the bottom half. 
     7        No need to be try and be clever about considering the menu and toolbox 
     8        because its not clear what the ratio means in that case. 
     9        Set a default ratio of 1:1. 
     10 
    1112007-04-25  Rob Bradford  <rob@openedhand.com> 
    212 
  • trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-paned-window.c

    r1818 r1839  
    8787    priv->menubox = NULL; 
    8888    priv->toolbox = NULL; 
     89 
     90    moko_paned_window_set_ratio (self, 50); 
    8991} 
    9092 
     
    137139    MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self); 
    138140    moko_debug( "moko_paned_window_set_ratio" ); 
    139     //FIXME calculate this correctly, need to subtract the height of tool box and menu box 
    140     //      which is probably not 120 ;-) 
    141     gtk_paned_set_position( GTK_PANED(priv->outerframe), ratio*(gdk_screen_height()-120)/100 ); 
     141    guint height; 
     142 
     143    gtk_window_get_size (GTK_WIDGET (self), NULL, &height); 
     144 
     145    gtk_paned_set_position( GTK_PANED(priv->outerframe), ratio * height / 100 ); 
    142146} 
    143147 
Note: See TracChangeset for help on using the changeset viewer.