[gtk+/gtk-style-context: 254/540] Remove GtkOrientation parameter from gtk_render_handle().



commit cc8ef4704381685b4d8d647998ccfafed71ddcca
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Oct 13 00:52:50 2010 +0200

    Remove GtkOrientation parameter from gtk_render_handle().
    
    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         |    3 +--
 gtk/gtkstylecontext.c  |    5 ++---
 gtk/gtkstylecontext.h  |    9 +++++++--
 gtk/gtkthemingengine.c |    8 +++-----
 gtk/gtkthemingengine.h |    3 +--
 5 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 8f495a7..44c3ed9 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -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);
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index ff58377..04a39b5 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -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);
 }
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index 3daf753..9bab375 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -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
 
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 95536ab..5096996 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -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
diff --git a/gtk/gtkthemingengine.h b/gtk/gtkthemingengine.h
index 8cbd75a..47a4234 100644
--- a/gtk/gtkthemingengine.h
+++ b/gtk/gtkthemingengine.h
@@ -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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]