diff options
author | Larry Ewing <lewing@ximian.com> | 2004-07-23 02:11:24 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2004-07-23 02:11:24 +0800 |
commit | 19d5ea83c9b568886b0e37cdfb6a29e582280a17 (patch) | |
tree | 1a09539b1db92a72942977490d4f117d1b0a2af6 /calendar | |
parent | 7ddc1267500f3fc0f9c340e598089735e081fc4a (diff) | |
download | gsoc2013-evolution-19d5ea83c9b568886b0e37cdfb6a29e582280a17.tar.gz gsoc2013-evolution-19d5ea83c9b568886b0e37cdfb6a29e582280a17.tar.zst gsoc2013-evolution-19d5ea83c9b568886b0e37cdfb6a29e582280a17.zip |
fix the row heights and tweek the offsets so that things come out OK.
2004-07-16 Larry Ewing <lewing@ximian.com>
* gui/e-meeting-time-sel.c (e_meeting_time_selector_style_set):
fix the row heights and tweek the offsets so that things come out
OK.
svn path=/trunk/; revision=26706
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 12 | ||||
-rw-r--r-- | calendar/gui/e-meeting-time-sel.c | 38 |
2 files changed, 39 insertions, 11 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index dc6d6d2a04..76d239e2df 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2004-07-16 Larry Ewing <lewing@ximian.com> + + * gui/e-meeting-time-sel.c (e_meeting_time_selector_style_set): + fix the row heights and tweek the offsets so that things come out + OK. + 2004-07-21 JP Rosevear <jpr@novell.com> Fixes #61776 @@ -46,6 +52,12 @@ 2004-07-16 Larry Ewing <lewing@ximian.com> + * gui/e-meeting-time-sel.c (e_meeting_time_selector_style_set): + fix the row heights and tweek the offsets so that things come out + OK. + +2004-07-16 Larry Ewing <lewing@ximian.com> + * gui/calendar-component.c (set_info): use short month forms to limit the maximum width of the label. diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index d1691b7301..c068890f37 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -839,6 +839,20 @@ e_meeting_time_selector_unrealize (GtkWidget *widget) (*GTK_WIDGET_CLASS (parent_class)->unrealize)(widget); } +static int +get_cell_height (GtkTreeView *tree) +{ + GtkTreeViewColumn *column; + int height = -1; + + column = gtk_tree_view_get_column (tree, 0); + gtk_tree_view_column_cell_get_size (column, NULL, + NULL, NULL, + NULL, &height); + + return height; +} + static void e_meeting_time_selector_style_set (GtkWidget *widget, GtkStyle *previous_style) @@ -878,7 +892,7 @@ e_meeting_time_selector_style_set (GtkWidget *widget, max_hour_width = MAX (max_hour_width, mts->hour_widths[hour]); } - pango_layout_get_pixel_size (layout, NULL, &mts->row_height); + mts->row_height = get_cell_height (GTK_TREE_VIEW (mts->list_view)); mts->col_width = max_hour_width + 6; e_meeting_time_selector_save_position (mts, &saved_time); @@ -886,18 +900,20 @@ e_meeting_time_selector_style_set (GtkWidget *widget, e_meeting_time_selector_restore_position (mts, &saved_time); gtk_widget_set_usize (mts->display_top, -1, mts->row_height * 3 + 4); + + /* + * FIXME: I can't find a way to get the treeview header heights + * other than the below but it isn't nice to realize that widget here + * + + gtk_widget_realize (mts->list_view); + gdk_window_get_position (gtk_tree_view_get_bin_window (GTK_TREE_VIEW (mts->list_view)), + NULL, &maxheight); + gtk_widget_set_usize (mts->attendees_vbox_spacer, 1, mts->row_height * 3 - maxheight); - /* Calculate header height */ - if (GTK_WIDGET_REALIZED (mts->list_view)) { - path = gtk_tree_path_new (); - gtk_tree_path_append_index (path, 0); - gtk_tree_view_get_cell_area (GTK_TREE_VIEW (mts->list_view), path, NULL, &cell_area); - gtk_tree_path_free (path); - maxheight = cell_area.y; - } else - maxheight = 10; + */ - gtk_widget_set_usize (mts->attendees_vbox_spacer, 1, mts->row_height * 3 - maxheight); + gtk_widget_set_usize (mts->attendees_vbox_spacer, 1, mts->row_height * 2 - 4); GTK_LAYOUT (mts->display_main)->hadjustment->step_increment = mts->col_width; GTK_LAYOUT (mts->display_main)->vadjustment->step_increment = mts->row_height; |