[maemo-commits] [maemo-commits] r9846 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Feb 14 14:07:37 EET 2007
- Previous message: [maemo-commits] r9845 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r9847 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kris Date: 2007-02-14 14:07:32 +0200 (Wed, 14 Feb 2007) New Revision: 9846 Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkbutton.c Log: 2007-02-14 Kristian Rietveld <kris at imendio.com> * gtk/gtkbutton.c (gtk_button_class_init), (gtk_button_size_request), (gtk_button_size_allocate), (_gtk_button_paint): add tree-view-separator-area style property for reserving space for a separator between column headers and the tree view. Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog =================================================================== --- projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog 2007-02-14 10:30:42 UTC (rev 9845) +++ projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog 2007-02-14 12:07:32 UTC (rev 9846) @@ -1,3 +1,11 @@ +2007-02-14 Kristian Rietveld <kris at imendio.com> + + * gtk/gtkbutton.c (gtk_button_class_init), + (gtk_button_size_request), (gtk_button_size_allocate), + (_gtk_button_paint): add tree-view-separator-area style + property for reserving space for a separator between column + headers and the tree view. + Tue Feb 13 16:57:52 2007 Tim Janik <timj at gtk.org> * gtk/gtkframe.c: Fix a problem with large y thickness. Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkbutton.c =================================================================== --- projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkbutton.c 2007-02-14 10:30:42 UTC (rev 9845) +++ projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkbutton.c 2007-02-14 12:07:32 UTC (rev 9846) @@ -479,6 +479,27 @@ G_MAXINT, 2, GTK_PARAM_READABLE)); + +#ifdef MAEMO_CHANGES + /** + * GtkButton::tree-view-separator-area: + * + * Specifies the amount of pixels to reserve for drawing a separator + * below the button. This is used to visually separate column headers + * from the tree view. The separator which will be drawn is exactly + * 1px thick. When 0, no separator will be drawn. + * + * Since: maemo 1.0 + */ + gtk_widget_class_install_style_property (widget_class, + g_param_spec_int ("tree-view-separator-area", + P_("Tree View Separator Area"), + P_("Amount of pixels to reserve for a separator"), + 0, + G_MAXINT, + 0, + GTK_PARAM_READABLE)); +#endif /* MAEMO_CHANGES */ gtk_settings_install_property (g_param_spec_boolean ("gtk-button-images", @@ -1108,11 +1129,17 @@ GtkBorder inner_border; gint focus_width; gint focus_pad; +#ifdef MAEMO_CHANGES + gint tree_view_separator_area; +#endif /* MAEMO_CHANGES */ gtk_button_get_props (button, &default_border, NULL, &inner_border, NULL); gtk_widget_style_get (GTK_WIDGET (widget), "focus-line-width", &focus_width, "focus-padding", &focus_pad, +#ifdef MAEMO_CHANGES + "tree-view-separator-area", &tree_view_separator_area, +#endif /* MAEMO_CHANGES */ NULL); requisition->width = ((GTK_CONTAINER (widget)->border_width + @@ -1140,6 +1167,10 @@ requisition->width += 2 * (focus_width + focus_pad); requisition->height += 2 * (focus_width + focus_pad); + +#ifdef MAEMO_CHANGES + requisition->height += tree_view_separator_area; +#endif /* MAEMO_CHANGES */ } static void @@ -1156,11 +1187,17 @@ GtkBorder inner_border; gint focus_width; gint focus_pad; +#ifdef MAEMO_CHANGES + gint tree_view_separator_area; +#endif /* MAEMO_CHANGES */ gtk_button_get_props (button, &default_border, NULL, &inner_border, NULL); gtk_widget_style_get (GTK_WIDGET (widget), "focus-line-width", &focus_width, "focus-padding", &focus_pad, +#ifdef MAEMO_CHANGES + "tree-view-separator-area", &tree_view_separator_area, +#endif /* MAEMO_CHANGES */ NULL); @@ -1184,6 +1221,9 @@ inner_border.right - border_width * 2); child_allocation.height = MAX (1, widget->allocation.height - +#ifdef MAEMO_CHANGES + tree_view_separator_area - +#endif /* MAEMO_CHANGES */ ythickness * 2 - inner_border.top - inner_border.bottom - @@ -1239,6 +1279,9 @@ gboolean interior_focus; gint focus_width; gint focus_pad; +#ifdef MAEMO_CHANGES + gint tree_view_separator_area; +#endif /* MAEMO_CHANGES */ if (GTK_WIDGET_DRAWABLE (button)) { @@ -1249,6 +1292,9 @@ gtk_widget_style_get (GTK_WIDGET (widget), "focus-line-width", &focus_width, "focus-padding", &focus_pad, +#ifdef MAEMO_CHANGES + "tree-view-separator-area", &tree_view_separator_area, +#endif /* MAEMO_CHANGES */ NULL); x = widget->allocation.x + border_width; @@ -1256,6 +1302,19 @@ width = widget->allocation.width - border_width * 2; height = widget->allocation.height - border_width * 2; +#ifdef MAEMO_CHANGES + if (tree_view_separator_area != 0) + gtk_paint_hline (widget->style, + widget->window, + GTK_STATE_NORMAL, + area, + widget, + "listboxseparator", + area->x - focus_width - focus_pad, + area->x + area->width + focus_width + focus_pad, + height + 2 * tree_view_separator_area); +#endif /* MAEMO_CHANGES */ + if (GTK_WIDGET_HAS_DEFAULT (widget) && GTK_BUTTON (widget)->relief == GTK_RELIEF_NORMAL) {
- Previous message: [maemo-commits] r9845 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r9847 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]