[maemo-commits] [maemo-commits] r12725 - in projects/haf/trunk/gtk+: . gtk
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Jul 12 12:31:36 EEST 2007
- Previous message: [maemo-commits] r12724 - in projects/haf/trunk/hildon-theme-layout-4: . rc
- Next message: [maemo-commits] r12726 - in projects/haf/trunk/hildon-desktop: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: tko Date: 2007-07-12 12:31:33 +0300 (Thu, 12 Jul 2007) New Revision: 12725 Modified: projects/haf/trunk/gtk+/ChangeLog projects/haf/trunk/gtk+/gtk/gtkrange.c Log: Replace arrow-paint-box-layout with arrow-scaling for consistency 2007-07-12 Tommi Komulainen <tommi.komulainen at nokia.com> * gtk/gtkrange.c (gtk_range_class_init, draw_stepper): Replace arrow-paint-box-layout (boolean) style property with arrow-scaling (float) to be consistent with GtkArrow. Modified: projects/haf/trunk/gtk+/ChangeLog =================================================================== --- projects/haf/trunk/gtk+/ChangeLog 2007-07-12 09:15:47 UTC (rev 12724) +++ projects/haf/trunk/gtk+/ChangeLog 2007-07-12 09:31:33 UTC (rev 12725) @@ -1,3 +1,9 @@ +2007-07-12 Tommi Komulainen <tommi.komulainen at nokia.com> + + * gtk/gtkrange.c (gtk_range_class_init, draw_stepper): Replace + arrow-paint-box-layout (boolean) style property with + arrow-scaling (float) to be consistent with GtkArrow. + 2007-07-10 Tomas Junnonen <tomas.junnonen at nokia.com> * gtk/gtktextview.c (gtk_text_view_class_init): Modified: projects/haf/trunk/gtk+/gtk/gtkrange.c =================================================================== --- projects/haf/trunk/gtk+/gtk/gtkrange.c 2007-07-12 09:15:47 UTC (rev 12724) +++ projects/haf/trunk/gtk+/gtk/gtkrange.c 2007-07-12 09:31:33 UTC (rev 12725) @@ -509,19 +509,17 @@ g_type_class_add_private (class, sizeof (GtkRangeLayout)); #ifdef MAEMO_CHANGES /** - * GtkRange:arrow-paint-box-layout: + * GtkRange:arrow-scaling: * - * Allows to use images instead of normal arrows. - * - * Since: maemo 1.0 + * Since: maemo 4.0 * Stability: Unstable */ gtk_widget_class_install_style_property (widget_class, - g_param_spec_boolean ("arrow-paint-box-layout", - P_("Arrow paint box layout"), - P_("Allocate range arrows with the maximum available space."), - FALSE, - GTK_PARAM_READABLE)); + g_param_spec_float ("arrow-scaling", + P_("Arrow Scaling"), + P_("Amount of space used by the scroll arrows"), + 0.0, 1.0, 0.5, + GTK_PARAM_READABLE)); #endif /* MAEMO_CHANGES */ } @@ -1326,6 +1324,9 @@ gint arrow_height; gboolean arrow_sensitive = TRUE; +#ifdef MAEMO_CHANGES + gfloat arrow_scaling; +#endif /* MAEMO_CHANGES */ /* More to get the right clip region than for efficiency */ if (!gdk_rectangle_intersect (area, rect, &intersection)) @@ -1370,22 +1371,17 @@ rect->width, rect->height); +#ifdef MAEMO_CHANGES + gtk_widget_style_get (widget, "arrow-scaling", &arrow_scaling, NULL); + + arrow_width = rect->width * arrow_scaling; + arrow_height = rect->height * arrow_scaling; +#else /* MAEMO_CHANGES */ arrow_width = rect->width / 2; arrow_height = rect->height / 2; +#endif /* MAEMO_CHANGES */ arrow_x = widget->allocation.x + rect->x + (rect->width - arrow_width) / 2; arrow_y = widget->allocation.y + rect->y + (rect->height - arrow_height) / 2; - -#ifdef MAEMO_CHANGES - gboolean arrow_paint_box_layout = FALSE; - gtk_widget_style_get (widget, "arrow-paint-box-layout", &arrow_paint_box_layout, NULL); - if (arrow_paint_box_layout) - { - arrow_width = rect->width; - arrow_height = rect->height; - arrow_x = widget->allocation.x + rect->x; - arrow_y = widget->allocation.y + rect->y; - } -#endif /* MAEMO_CHANGES */ if (clicked && arrow_sensitive) {
- Previous message: [maemo-commits] r12724 - in projects/haf/trunk/hildon-theme-layout-4: . rc
- Next message: [maemo-commits] r12726 - in projects/haf/trunk/hildon-desktop: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]