]> Pileus Git - ~andy/gtk/commitdiff
Remove GtkOrientation parameter from gtk_render_handle().
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 12 Oct 2010 22:52:50 +0000 (00:52 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:38:21 +0000 (15:38 +0100)
The case for paned can be guessed out from the height and width,
for handlebox the orientation parameter doesn't make much sense,
and this way it could also be used for resize grips.

gtk/gtkstyle.c
gtk/gtkstylecontext.c
gtk/gtkstylecontext.h
gtk/gtkthemingengine.c
gtk/gtkthemingengine.h

index 8f495a795dd288c4c889e67d00a97060263fe325..44c3ed9731c74de0c0e7d9ff55fc72a7f160e9b3 100644 (file)
@@ -3135,8 +3135,7 @@ gtk_default_draw_handle (GtkStyle      *style,
                      (gdouble) x,
                      (gdouble) y,
                      (gdouble) width,
-                     (gdouble) height,
-                     orientation);
+                     (gdouble) height);
 
   cairo_restore (cr);
   gtk_style_context_restore (context);
index ff58377274ee138f0ba7157439f36370eb135857..04a39b53d20088516939db06e61bd0fe6a8a5f2f 100644 (file)
@@ -2385,8 +2385,7 @@ gtk_render_handle (GtkStyleContext *context,
                    gdouble          x,
                    gdouble          y,
                    gdouble          width,
-                   gdouble          height,
-                   GtkOrientation   orientation)
+                   gdouble          height)
 {
   GtkStyleContextPrivate *priv;
   GtkThemingEngineClass *engine_class;
@@ -2400,5 +2399,5 @@ gtk_render_handle (GtkStyleContext *context,
   store_animation_region (context, x, y, width, height);
 
   _gtk_theming_engine_set_context (priv->theming_engine, context);
-  engine_class->render_handle (priv->theming_engine, cr, x, y, width, height, orientation);
+  engine_class->render_handle (priv->theming_engine, cr, x, y, width, height);
 }
index 3daf753059cea95edff15788afda5cab3da9ba3f..9bab375a0533ec12e859c1c30afe19885da6fe37 100644 (file)
@@ -255,8 +255,13 @@ void gtk_render_handle    (GtkStyleContext *context,
                            gdouble          x,
                            gdouble          y,
                            gdouble          width,
-                           gdouble          height,
-                           GtkOrientation   orientation);
+                           gdouble          height);
+void gtk_render_progress  (GtkStyleContext *context,
+                           cairo_t         *cr,
+                           gdouble          x,
+                           gdouble          y,
+                           gdouble          width,
+                           gdouble          height);
 
 G_END_DECLS
 
index 95536ab09c245531d63807883e7d21feaea3eed0..5096996e57528ff0534f2dfe26d090b037a220ab 100644 (file)
@@ -126,8 +126,7 @@ static void gtk_theming_engine_render_handle    (GtkThemingEngine *engine,
                                                  gdouble           x,
                                                  gdouble           y,
                                                  gdouble           width,
-                                                 gdouble           height,
-                                                 GtkOrientation    orientation);
+                                                 gdouble           height);
 
 G_DEFINE_TYPE (GtkThemingEngine, gtk_theming_engine, G_TYPE_OBJECT)
 
@@ -1998,8 +1997,7 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
                                   gdouble           x,
                                   gdouble           y,
                                   gdouble           width,
-                                  gdouble           height,
-                                  GtkOrientation    orientation)
+                                  gdouble           height)
 {
   GtkStateFlags flags;
   GdkColor *bg_color;
@@ -2023,7 +2021,7 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
 
   if (gtk_theming_engine_has_class (engine, "paned"))
     {
-      if (orientation == GTK_ORIENTATION_HORIZONTAL)
+      if (width > height)
         for (xx = x + width / 2 - 15; xx <= x + width / 2 + 15; xx += 5)
           render_dot (cr, &lighter, &darker, xx, y + height / 2 - 1, 3);
       else
index 8cbd75ad2dacab385773eb25830734403570c9c6..47a4234f4ba0cd57be2974f8765afdb81197f98c 100644 (file)
@@ -130,8 +130,7 @@ struct GtkThemingEngineClass
                              gdouble           x,
                              gdouble           y,
                              gdouble           width,
-                             gdouble           height,
-                             GtkOrientation    orientation);
+                             gdouble           height);
 };
 
 GType gtk_theming_engine_get_type (void) G_GNUC_CONST;