[gtk+] win32 theme: Make titlebuttons look like they're the right size



commit 34e204952e1887a35468c34c802cc51436a53b2d
Author: Benjamin Otte <otte gnome org>
Date:   Fri Feb 26 03:17:01 2016 +0100

    win32 theme: Make titlebuttons look like they're the right size
    
    This is a hack because we can't really rtesize the buttons.
    
    Instead, we draw the background only over the area that they would
    be drawn if they were drawn by Windows. The button is still selectable
    outside of this area, but what can you do...

 gtk/theme/win32/gtk.css |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/theme/win32/gtk.css b/gtk/theme/win32/gtk.css
index 525674b..846041c 100644
--- a/gtk/theme/win32/gtk.css
+++ b/gtk/theme/win32/gtk.css
@@ -394,6 +394,9 @@ decoration:disabled {
     margin-right: -gtk-win32-size(button, cxedge);
     min-width: calc(-gtk-win32-size(button, cxsize) - 2 * -gtk-win32-size(button, cxedge));
     min-height: calc(-gtk-win32-size(button, cysize) - 2 * -gtk-win32-size(button, cyedge));
+    background-repeat: no-repeat;
+    background-size: 100% calc(-gtk-win32-size(button, cysize) - 2 * -gtk-win32-size(button, cyedge));
+    background-position: 50% calc(100% - -gtk-win32-size(window, cycaption) + -gtk-win32-size(window, 
cysize) - -gtk-win32-size(window, cyedge));
 }
 
 /* XXX: headerbar insists on 6px spacing between buttons. Windows doesn't


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