From 89121e058a926280dc95d1a2530edf59e35d2814 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 2 Mar 2016 14:48:43 +0100 Subject: [PATCH] win32 theme: Add a naive switch implementation I couldn't come up with anything better than a button on a button. But the Windows theme sucks... --- gtk/theme/win32/gtk-win32-base.css | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/gtk/theme/win32/gtk-win32-base.css b/gtk/theme/win32/gtk-win32-base.css index 35a2ac6f65..e178fabd67 100644 --- a/gtk/theme/win32/gtk-win32-base.css +++ b/gtk/theme/win32/gtk-win32-base.css @@ -1202,24 +1202,31 @@ column-header button:active:hover:focus { /* Switch */ switch { - font: bold condensed 10; - color: @text_color; background-image: -gtk-win32-theme-part(button, 1, 1); } +switch:checked { + background-image: -gtk-win32-theme-part(button, 1, 3); +} + switch:disabled { background-image: -gtk-win32-theme-part(button, 1, 4); } -switch:active { +switch slider { + background-image: -gtk-win32-theme-part(button, 1, 1); +} + +switch:hover slider { background-image: -gtk-win32-theme-part(button, 1, 2); } -switch slider { - padding: 4px; - background-color: transparent; - background-image: -gtk-win32-theme-part(scrollbar, 2, 1, over (8, 1)); - border-width: 0; +switch:active slider { + background-image: -gtk-win32-theme-part(button, 1, 3); +} + +switch:disabled slider { + background-image: -gtk-win32-theme-part(button, 1, 4); } /* Menus */