From d631fe58f19bc5afb5ac0d4692f581ef4f889261 Mon Sep 17 00:00:00 2001 From: Rory Fewell Date: Mon, 1 Jul 2024 23:53:49 +0100 Subject: [PATCH] Bugfix: Fixes #334, Separator styles, including menubar/toolbar borders, are missing --- .../gtk-3.0-base/common/frame.scss | 12 +++++++ .../gtk-3.0-base/common/menu.scss | 5 +++ .../gtk-3.0-base/common/toolbar.scss | 10 ++++++ .../build-common/gtk-3.0-base/init/_all.scss | 1 + .../build-common/gtk-3.0-base/init/frame.scss | 3 +- .../gtk-3.0-base/init/toolbar.scss | 13 +++++++ .../gtk-3.0-base/styling/_all.scss | 1 + .../gtk-3.0-base/styling/frame.scss | 17 +++++++-- .../gtk-3.0-base/styling/menu.scss | 12 +++++++ .../gtk-3.0-base/styling/toolbar.scss | 24 +++++++++++++ themes/luna/blue/Resources/toolbar_border.png | Bin 0 -> 472 bytes themes/luna/blue/gtk-3.0/styling/_all.scss | 1 + themes/luna/blue/gtk-3.0/styling/frame.scss | 5 ++- themes/luna/blue/gtk-3.0/styling/menu.scss | 16 +++++++++ themes/luna/blue/gtk-3.0/styling/toolbar.scss | 26 ++++++++++++++ .../{separator.png => separator_horz.png} | Bin themes/native/Resources/separator_vert.png | Bin 0 -> 474 bytes .../professional/Resources/toolbar_border.png | Bin 0 -> 497 bytes themes/professional/gtk-3.0/colors/_all.scss | 1 + .../professional/gtk-3.0/colors/toolbar.scss | 10 ++++++ themes/professional/gtk-3.0/styling/_all.scss | 1 + .../professional/gtk-3.0/styling/frame.scss | 4 ++- themes/professional/gtk-3.0/styling/menu.scss | 23 ++++++++++++ .../gtk-3.0/styling/start-menu.scss | 25 +++++++++++++ .../professional/gtk-3.0/styling/toolbar.scss | 34 ++++++++++++++++++ 25 files changed, 238 insertions(+), 6 deletions(-) create mode 100644 themes/build-common/gtk-3.0-base/init/toolbar.scss create mode 100644 themes/build-common/gtk-3.0-base/styling/toolbar.scss create mode 100644 themes/luna/blue/Resources/toolbar_border.png create mode 100644 themes/luna/blue/gtk-3.0/styling/toolbar.scss rename themes/native/Resources/{separator.png => separator_horz.png} (100%) create mode 100644 themes/native/Resources/separator_vert.png create mode 100644 themes/professional/Resources/toolbar_border.png create mode 100644 themes/professional/gtk-3.0/colors/toolbar.scss create mode 100644 themes/professional/gtk-3.0/styling/toolbar.scss diff --git a/themes/build-common/gtk-3.0-base/common/frame.scss b/themes/build-common/gtk-3.0-base/common/frame.scss index d5078c2..55501cf 100644 --- a/themes/build-common/gtk-3.0-base/common/frame.scss +++ b/themes/build-common/gtk-3.0-base/common/frame.scss @@ -121,10 +121,22 @@ scrolledwindow } // vbox and hbox separators +// RORY: Default to horizontal styles, and only override for vertical - the +// common use-case is horizontal (eg. menus) // separator { @include __wintc_apply_props($separator_styles); + @include __wintc_apply_props($separator_horz_styles); min-height: $separator_thickness; + min-width: $separator_thickness; +} + +// Direct descendant selector so we don't screw up menus from like horizontal +// menu bar that pops out a menu (which always has vertical orientation) +// +.horizontal > separator +{ + @include __wintc_apply_props($separator_vert_styles); } diff --git a/themes/build-common/gtk-3.0-base/common/menu.scss b/themes/build-common/gtk-3.0-base/common/menu.scss index 735f3fc..86e9ad9 100644 --- a/themes/build-common/gtk-3.0-base/common/menu.scss +++ b/themes/build-common/gtk-3.0-base/common/menu.scss @@ -26,6 +26,11 @@ menubar, -GtkWidget-window-dragging: true; + box.vertical > &:last-child + { + border-bottom-style: none; + } + > menuitem { @include __wintc_apply_props($menustrip_menuitem_styles); diff --git a/themes/build-common/gtk-3.0-base/common/toolbar.scss b/themes/build-common/gtk-3.0-base/common/toolbar.scss index fa710ce..6121563 100644 --- a/themes/build-common/gtk-3.0-base/common/toolbar.scss +++ b/themes/build-common/gtk-3.0-base/common/toolbar.scss @@ -18,8 +18,18 @@ toolbar { @extend %toolbar; + @include __wintc_apply_props($toolbar_styles); + padding: 4px 3px 3px 4px; + // RORY: This is an attempt to avoid weird borders on frames... see + // issue #334 + // + box.vertical > &:last-child + { + border-bottom-style: none; + } + // On OSD // .osd & diff --git a/themes/build-common/gtk-3.0-base/init/_all.scss b/themes/build-common/gtk-3.0-base/init/_all.scss index 4c19a37..81ac39a 100644 --- a/themes/build-common/gtk-3.0-base/init/_all.scss +++ b/themes/build-common/gtk-3.0-base/init/_all.scss @@ -18,6 +18,7 @@ @import "progressbar"; @import "frame"; @import "menu"; +@import "toolbar"; @import "scrollbar"; @import "notebook"; @import "csd"; diff --git a/themes/build-common/gtk-3.0-base/init/frame.scss b/themes/build-common/gtk-3.0-base/init/frame.scss index e927e13..50f145b 100644 --- a/themes/build-common/gtk-3.0-base/init/frame.scss +++ b/themes/build-common/gtk-3.0-base/init/frame.scss @@ -16,4 +16,5 @@ $frame_label_styles: (); // // SEPARATOR // -$separator_styles: (); +$separator_horz_styles: (); +$separator_vert_styles: (); diff --git a/themes/build-common/gtk-3.0-base/init/toolbar.scss b/themes/build-common/gtk-3.0-base/init/toolbar.scss new file mode 100644 index 0000000..78cb27a --- /dev/null +++ b/themes/build-common/gtk-3.0-base/init/toolbar.scss @@ -0,0 +1,13 @@ +/** + * toolbar.scss - WinTC Toolbar Theme Part Definitions + * + * This source-code is part of Windows XP stuff for XFCE: + * <> + * + * Author(s): Rory Fewell + */ + +// +// TOOLBAR +// +$toolbar_styles: (); diff --git a/themes/build-common/gtk-3.0-base/styling/_all.scss b/themes/build-common/gtk-3.0-base/styling/_all.scss index d1692e0..c84cab1 100644 --- a/themes/build-common/gtk-3.0-base/styling/_all.scss +++ b/themes/build-common/gtk-3.0-base/styling/_all.scss @@ -15,6 +15,7 @@ @import "progressbar"; @import "frame"; @import "menu"; +@import "toolbar"; @import "scrollbar"; @import "notebook"; @import "csd"; diff --git a/themes/build-common/gtk-3.0-base/styling/frame.scss b/themes/build-common/gtk-3.0-base/styling/frame.scss index 654b63f..d9384d9 100644 --- a/themes/build-common/gtk-3.0-base/styling/frame.scss +++ b/themes/build-common/gtk-3.0-base/styling/frame.scss @@ -28,13 +28,24 @@ $frame_label_styles: // // SEPARATOR // -$separator_styles: +$separator_styles: (); +$separator_horz_styles: wintc_define_props_bg( - $separator_styles, + $separator_horz_styles, true, undefined, undefined, undefined, undefined, - url('../Resources/separator.png') + url('../Resources/separator_horz.png') + ); +$separator_vert_styles: + wintc_define_props_bg( + $separator_vert_styles, + true, + undefined, + undefined, + undefined, + undefined, + url('../Resources/separator_vert.png') ); diff --git a/themes/build-common/gtk-3.0-base/styling/menu.scss b/themes/build-common/gtk-3.0-base/styling/menu.scss index 684cd4a..fb11665 100644 --- a/themes/build-common/gtk-3.0-base/styling/menu.scss +++ b/themes/build-common/gtk-3.0-base/styling/menu.scss @@ -26,6 +26,18 @@ $menustrip_styles: 0, 0 ); +$menustrip_styles: + wintc_define_props_borders( + $menustrip_styles, + true, + solid, + 0, + 0, + 2, + 0, + undefined, + url('../Resources/separator_horz.png') + ); $menustrip_menuitem_styles: wintc_define_props_box( diff --git a/themes/build-common/gtk-3.0-base/styling/toolbar.scss b/themes/build-common/gtk-3.0-base/styling/toolbar.scss new file mode 100644 index 0000000..b65b0d4 --- /dev/null +++ b/themes/build-common/gtk-3.0-base/styling/toolbar.scss @@ -0,0 +1,24 @@ +/** + * toolbar.scss - Theme Base Toolbar Style Constants + * + * This source-code is part of Windows XP stuff for XFCE: + * <> + * + * Author(s): Rory Fewell + */ + +// +// TOOLBAR +// +$toolbar_styles: + wintc_define_props_borders( + $toolbar_styles, + true, + solid, + 0, + 0, + 2, + 0, + undefined, + url('../Resources/separator_horz.png') + ); diff --git a/themes/luna/blue/Resources/toolbar_border.png b/themes/luna/blue/Resources/toolbar_border.png new file mode 100644 index 0000000000000000000000000000000000000000..2dd1b652c9633142410ef9f0dd74f97e589d43eb GIT binary patch literal 472 zcmV;}0Vn>6P)j+EBpOCp@cYdP!KOA-q-6EZ!3yQF4it z@QJWrmjQ)uEj`)bH;c0k{<2t)MHj(t_4H=jIN8QZPR|QZ3j6YES!vE=eTgewSXq`l zCdY$8ln_C@Bq_6rN{N8vg6yobZ>sKFq9`6k-WnBjab(Gf*Dq>Wx~3&(L{H13QnB{_ zf1gHXX1dYc6@=bb)BGF<=RVY`rulnnnzb`KmY(EO$TG~U><@1 O0000> + * + * Author(s): Rory Fewell + */ + +$menu_separator_thickness: $separator_thickness; + +// +// TOOLBAR +// +$toolbar_styles: + wintc_define_props_borders( + $toolbar_styles, + false, + solid, + 0, + 0, + 2, + 0, + undefined, + url('../Resources/toolbar_border.png') + ); diff --git a/themes/native/Resources/separator.png b/themes/native/Resources/separator_horz.png similarity index 100% rename from themes/native/Resources/separator.png rename to themes/native/Resources/separator_horz.png diff --git a/themes/native/Resources/separator_vert.png b/themes/native/Resources/separator_vert.png new file mode 100644 index 0000000000000000000000000000000000000000..8c3645a0bfe45ef88b0a1c68215339d0392ced91 GIT binary patch literal 474 zcmV<00VV#4P)-?_Rh(_kXu6laXO`K?AEo0<`$ArE4Tv_{_M}3JaSy)_< zIw*SxlL$cqct}ttOOBG{lBFP-wf0TaeDf5=qsd#Rf+3DH8S(l=Elby=)RgE+d2&=# z?tk+%Q&W@m?ydl|KUvn>2sn4(yJ}fqN0#+{430;*C^Y;<$;tmAdbOc>55T<%XO|5v zu?y#0Fz}$qjd)FR$hN0a@Olb8G3dR4u9bRLzvrCXLv%xa(KYPt!>HVMul@jzfoMzc zR8+YD000SaNLh0L01FZT01FZU(%pXi0000HNklj+EBpOCp@cYdP!KOA-q-6EZ!3yQF4it z@QJWrmjQ)uEj`)bH;c0k{<2t)MHj(t_4H=jIN8QZPR|QZ3j6YES!vE=eTgewSXq`l zCdY$8ln_C@Bq_6rN{N8vg6yobZ>sKFq9`6k-WnBjab(Gf*Dq>Wx~3&(L{H13QnB{_ zf1gHXX1dYc6@=bb)BGF<=RVY`rulnnnzb`R3&I3IG>UeZ00;m878ei0hqS{j00000NkvXXu0mjf@lD!~ literal 0 HcmV?d00001 diff --git a/themes/professional/gtk-3.0/colors/_all.scss b/themes/professional/gtk-3.0/colors/_all.scss index c47b27b..6ee27f9 100644 --- a/themes/professional/gtk-3.0/colors/_all.scss +++ b/themes/professional/gtk-3.0/colors/_all.scss @@ -9,3 +9,4 @@ @import "borders"; @import "menu"; +@import "toolbar"; diff --git a/themes/professional/gtk-3.0/colors/toolbar.scss b/themes/professional/gtk-3.0/colors/toolbar.scss new file mode 100644 index 0000000..06224ee --- /dev/null +++ b/themes/professional/gtk-3.0/colors/toolbar.scss @@ -0,0 +1,10 @@ +/** + * toolbar.scss - Professional Style Toolbar Colour Constants + * + * This source-code is part of Windows XP stuff for XFCE: + * <> + * + * Author(s): Rory Fewell + */ + +$toolbar_bg_color: #F4F4F0; diff --git a/themes/professional/gtk-3.0/styling/_all.scss b/themes/professional/gtk-3.0/styling/_all.scss index 0ae4e1b..1318be6 100644 --- a/themes/professional/gtk-3.0/styling/_all.scss +++ b/themes/professional/gtk-3.0/styling/_all.scss @@ -15,6 +15,7 @@ @import "progressbar"; @import "frame"; @import "menu"; +@import "toolbar"; @import "scrollbar"; @import "notebook"; @import "csd"; diff --git a/themes/professional/gtk-3.0/styling/frame.scss b/themes/professional/gtk-3.0/styling/frame.scss index b7404b9..8e625b1 100644 --- a/themes/professional/gtk-3.0/styling/frame.scss +++ b/themes/professional/gtk-3.0/styling/frame.scss @@ -16,9 +16,11 @@ $separator_styles: wintc_define_props_bg( $separator_styles, false, - $menu_borders_color, + #BDBDB7, undefined, undefined, undefined, undefined ); +$separator_horz_styles: (); +$separator_vert_styles: (); diff --git a/themes/professional/gtk-3.0/styling/menu.scss b/themes/professional/gtk-3.0/styling/menu.scss index 320aa42..d3e5212 100644 --- a/themes/professional/gtk-3.0/styling/menu.scss +++ b/themes/professional/gtk-3.0/styling/menu.scss @@ -12,6 +12,29 @@ $menu_separator_thickness: $separator_thickness; // // MENUSTRIP // +$menustrip_styles: + wintc_define_props_bg( + $menustrip_styles, + false, + $toolbar_bg_color, + undefined, + undefined, + undefined, + undefined + ); +$menustrip_styles: + wintc_define_props_borders( + $menustrip_styles, + false, + solid, + 2, + 2, + 2, + 2, + undefined, + url('../Resources/toolbar_border.png') + ); + $menustrip_menuitem_styles: wintc_define_props_borders( $menustrip_menuitem_styles, diff --git a/themes/professional/gtk-3.0/styling/start-menu.scss b/themes/professional/gtk-3.0/styling/start-menu.scss index 82c2f6c..71d70c7 100644 --- a/themes/professional/gtk-3.0/styling/start-menu.scss +++ b/themes/professional/gtk-3.0/styling/start-menu.scss @@ -179,6 +179,31 @@ $start_menu_styles: undefined ); +// Clear out default menubar styles +// +$start_menu_menustrip_styles: + wintc_define_props_bg( + $start_menu_menustrip_styles, + false, + unset, + undefined, + undefined, + undefined, + undefined + ); +$start_menu_menustrip_styles: + wintc_define_props_borders( + $start_menu_menustrip_styles, + false, + none, + undefined, + undefined, + undefined, + undefined, + undefined, + undefined + ); + $start_menu_menustrip_menuitem_styles: wintc_define_props_borders( $start_menu_menustrip_menuitem_styles, diff --git a/themes/professional/gtk-3.0/styling/toolbar.scss b/themes/professional/gtk-3.0/styling/toolbar.scss new file mode 100644 index 0000000..56eb6b0 --- /dev/null +++ b/themes/professional/gtk-3.0/styling/toolbar.scss @@ -0,0 +1,34 @@ +/** + * toolbar.scss - Professional Style Toolbar Style Constants + * + * This source-code is part of Windows XP stuff for XFCE: + * <> + * + * Author(s): Rory Fewell + */ + +// +// TOOLBAR +// +$toolbar_styles: + wintc_define_props_bg( + $toolbar_styles, + false, + $toolbar_bg_color, + undefined, + undefined, + undefined, + undefined + ); +$toolbar_styles: + wintc_define_props_borders( + $toolbar_styles, + false, + solid, + 2, + 2, + 2, + 2, + undefined, + url('../Resources/toolbar_border.png') + );