[gtk+/wip/baedert/box: 92/108] window: Remove decoration-resize-handle style property



commit 2895e65bef584cfc3ec26ed3842fdb5c087d2ade
Author: Timm Bäder <mail baedert org>
Date:   Sat Oct 15 21:55:38 2016 +0200

    window: Remove decoration-resize-handle style property

 gtk/gtkwindow.c |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index b40328e..667ddd6 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -150,6 +150,7 @@
  */
 
 #define MENU_BAR_ACCEL "F10"
+#define RESIZE_HANDLE_SIZE 20
 #define MNEMONICS_DELAY 300 /* ms */
 #define NO_CONTENT_CHILD_NAT 200
 /* In case the content (excluding header bar and shadows) of the window
@@ -1069,13 +1070,6 @@ gtk_window_class_init (GtkWindowClass *klass)
                                                                 "menu:close",
                                                                 GTK_PARAM_READABLE|G_PARAM_DEPRECATED));
 
-  gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("decoration-resize-handle",
-                                                             P_("Decoration resize handle size"),
-                                                             P_("Decoration resize handle size"),
-                                                             0, G_MAXINT,
-                                                             20, GTK_PARAM_READWRITE));
-
   /**
    * GtkWindow:set-focus:
    * @window: the window which received the signal
@@ -6505,7 +6499,7 @@ update_border_windows (GtkWindow *window)
   GtkWidget *widget = (GtkWidget *)window;
   GtkWindowPrivate *priv = window->priv;
   gboolean resize_h, resize_v;
-  gint handle, handle_h, handle_v;
+  gint handle_h, handle_v;
   cairo_region_t *region;
   cairo_rectangle_int_t rect;
   gint width, height;
@@ -6524,9 +6518,6 @@ update_border_windows (GtkWindow *window)
   sum_borders (&border, &tmp);
   gtk_style_context_get_padding (context, &tmp);
   sum_borders (&border, &tmp);
-  gtk_widget_style_get (widget,
-                        "decoration-resize-handle", &handle,
-                        NULL);
   gtk_style_context_restore (context);
   get_shadow_width (window, &window_border);
 
@@ -6548,8 +6539,8 @@ update_border_windows (GtkWindow *window)
   width = gtk_widget_get_allocated_width (widget) - (window_border.left + window_border.right);
   height = gtk_widget_get_allocated_height (widget) - (window_border.top + window_border.bottom);
 
-  handle_h = MIN (handle, width / 2);
-  handle_v = MIN (handle, height / 2);
+  handle_h = MIN (RESIZE_HANDLE_SIZE, width / 2);
+  handle_v = MIN (RESIZE_HANDLE_SIZE, height / 2);
 
   if (resize_h && resize_v)
     {


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