diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2017-08-18 20:12:23 -0300 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2017-09-17 23:16:48 -0300 |
commit | b1c4e9afef5144b3c55a7be22b01c38cdf0088a7 (patch) | |
tree | 04b4943e81e6f1b3ec8556b0d92ef695ffad1a55 /gtk/theme | |
parent | 03204f8cdb8f29cc67c27467d2356e07d66f1ba5 (diff) | |
download | gtk+-b1c4e9afef5144b3c55a7be22b01c38cdf0088a7.tar.gz |
window: Add individual CSS classes based on edge constraints
The last touch on this patch series is making GtkWindow able to
selectively adjust various UI details based on the different
tiled edges. The main driver here is that we don't want to show
shadows on edges that are constrained.
This patch adds the necessary code to do that, while still
maintaining compatibility with the old ways.
https://bugzilla.gnome.org/show_bug.cgi?id=783669
Diffstat (limited to 'gtk/theme')
-rw-r--r-- | gtk/theme/Adwaita/_common.scss | 16 | ||||
-rw-r--r-- | gtk/theme/Adwaita/gtk-contained-dark.css | 6 | ||||
-rw-r--r-- | gtk/theme/Adwaita/gtk-contained.css | 6 |
3 files changed, 20 insertions, 8 deletions
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 4901c1fe32..3cf72743e2 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -1557,6 +1557,10 @@ headerbar { // squared corners when the window is maximized, tiled, or fullscreen .tiled &, + .tiled-top &, + .tiled-left &, + .tiled-right &, + .tiled-bottom &, .maximized &, .fullscreen & { &:backdrop, & { @@ -1604,7 +1608,11 @@ headerbar { } } -.background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar { +.background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar, +.background:not(.tiled-top):not(.maximized):not(.solid-csd) .titlebar, +.background:not(.tiled-left):not(.maximized):not(.solid-csd) .titlebar, +.background:not(.tiled-right):not(.maximized):not(.solid-csd) .titlebar, +.background:not(.tiled-bottom):not(.maximized):not(.solid-csd) .titlebar { &:backdrop, & { border-top-left-radius: 7px; border-top-right-radius: 7px; @@ -4236,7 +4244,11 @@ decoration { .maximized &, .fullscreen &, - .tiled & { border-radius: 0; } + .tiled &, + .tiled-top &, + .tiled-left &, + .tiled-right &, + .tiled-bottom & { border-radius: 0; } .popup & { box-shadow: none; } diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index 70db241a39..d7010c8b9d 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -650,7 +650,7 @@ searchbar, .location-bar { border-width: 0 0 1px; padding: 3px; } .selection-mode.titlebar:not(headerbar) .selection-menu:backdrop .arrow, .selection-mode.titlebar:not(headerbar) .selection-menu .arrow, headerbar.selection-mode .selection-menu:backdrop .arrow, headerbar.selection-mode .selection-menu .arrow { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); color: rgba(255, 255, 255, 0.5); -gtk-icon-shadow: none; } -.tiled .titlebar:backdrop:not(headerbar), .tiled .titlebar:not(headerbar), .maximized .titlebar:backdrop:not(headerbar), .maximized .titlebar:not(headerbar), .fullscreen .titlebar:backdrop:not(headerbar), .fullscreen .titlebar:not(headerbar), .tiled headerbar:backdrop, .tiled headerbar, .maximized headerbar:backdrop, .maximized headerbar, .fullscreen headerbar:backdrop, .fullscreen headerbar { border-radius: 0; } +.tiled .titlebar:backdrop:not(headerbar), .tiled .titlebar:not(headerbar), .tiled-top .titlebar:backdrop:not(headerbar), .tiled-top .titlebar:not(headerbar), .tiled-left .titlebar:backdrop:not(headerbar), .tiled-left .titlebar:not(headerbar), .tiled-right .titlebar:backdrop:not(headerbar), .tiled-right .titlebar:not(headerbar), .tiled-bottom .titlebar:backdrop:not(headerbar), .tiled-bottom .titlebar:not(headerbar), .maximized .titlebar:backdrop:not(headerbar), .maximized .titlebar:not(headerbar), .fullscreen .titlebar:backdrop:not(headerbar), .fullscreen .titlebar:not(headerbar), .tiled headerbar:backdrop, .tiled headerbar, .tiled-top headerbar:backdrop, .tiled-top headerbar, .tiled-left headerbar:backdrop, .tiled-left headerbar, .tiled-right headerbar:backdrop, .tiled-right headerbar, .tiled-bottom headerbar:backdrop, .tiled-bottom headerbar, .maximized headerbar:backdrop, .maximized headerbar, .fullscreen headerbar:backdrop, .fullscreen headerbar { border-radius: 0; } .default-decoration.titlebar:not(headerbar), headerbar.default-decoration { min-height: 28px; padding: 4px; } @@ -662,7 +662,7 @@ headerbar entry, headerbar spinbutton, headerbar separator, headerbar button { m headerbar switch { margin-top: 9px; margin-bottom: 9px; } -.background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar:backdrop, .background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar { border-top-left-radius: 7px; border-top-right-radius: 7px; } +.background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar:backdrop, .background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar, .background:not(.tiled-top):not(.maximized):not(.solid-csd) .titlebar:backdrop, .background:not(.tiled-top):not(.maximized):not(.solid-csd) .titlebar, .background:not(.tiled-left):not(.maximized):not(.solid-csd) .titlebar:backdrop, .background:not(.tiled-left):not(.maximized):not(.solid-csd) .titlebar, .background:not(.tiled-right):not(.maximized):not(.solid-csd) .titlebar:backdrop, .background:not(.tiled-right):not(.maximized):not(.solid-csd) .titlebar, .background:not(.tiled-bottom):not(.maximized):not(.solid-csd) .titlebar:backdrop, .background:not(.tiled-bottom):not(.maximized):not(.solid-csd) .titlebar { border-top-left-radius: 7px; border-top-right-radius: 7px; } window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) separator:first-child + headerbar:backdrop, window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) separator:first-child + headerbar, window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) headerbar:first-child:backdrop, window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) headerbar:first-child { border-top-left-radius: 7px; } @@ -1828,7 +1828,7 @@ decoration { border-radius: 7px 7px 0 0; border-width: 0px; box-shadow: 0 3px 9p decoration:backdrop { box-shadow: 0 3px 9px 1px transparent, 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(27, 31, 32, 0.9); transition: 200ms ease-out; } -.maximized decoration, .fullscreen decoration, .tiled decoration { border-radius: 0; } +.maximized decoration, .fullscreen decoration, .tiled decoration, .tiled-top decoration, .tiled-left decoration, .tiled-right decoration, .tiled-bottom decoration { border-radius: 0; } .popup decoration { box-shadow: none; } diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 1bed44af6e..a5f18f3943 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -658,7 +658,7 @@ searchbar, .location-bar { border-width: 0 0 1px; padding: 3px; } .selection-mode.titlebar:not(headerbar) .selection-menu:backdrop .arrow, .selection-mode.titlebar:not(headerbar) .selection-menu .arrow, headerbar.selection-mode .selection-menu:backdrop .arrow, headerbar.selection-mode .selection-menu .arrow { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); color: rgba(255, 255, 255, 0.5); -gtk-icon-shadow: none; } -.tiled .titlebar:backdrop:not(headerbar), .tiled .titlebar:not(headerbar), .maximized .titlebar:backdrop:not(headerbar), .maximized .titlebar:not(headerbar), .fullscreen .titlebar:backdrop:not(headerbar), .fullscreen .titlebar:not(headerbar), .tiled headerbar:backdrop, .tiled headerbar, .maximized headerbar:backdrop, .maximized headerbar, .fullscreen headerbar:backdrop, .fullscreen headerbar { border-radius: 0; } +.tiled .titlebar:backdrop:not(headerbar), .tiled .titlebar:not(headerbar), .tiled-top .titlebar:backdrop:not(headerbar), .tiled-top .titlebar:not(headerbar), .tiled-left .titlebar:backdrop:not(headerbar), .tiled-left .titlebar:not(headerbar), .tiled-right .titlebar:backdrop:not(headerbar), .tiled-right .titlebar:not(headerbar), .tiled-bottom .titlebar:backdrop:not(headerbar), .tiled-bottom .titlebar:not(headerbar), .maximized .titlebar:backdrop:not(headerbar), .maximized .titlebar:not(headerbar), .fullscreen .titlebar:backdrop:not(headerbar), .fullscreen .titlebar:not(headerbar), .tiled headerbar:backdrop, .tiled headerbar, .tiled-top headerbar:backdrop, .tiled-top headerbar, .tiled-left headerbar:backdrop, .tiled-left headerbar, .tiled-right headerbar:backdrop, .tiled-right headerbar, .tiled-bottom headerbar:backdrop, .tiled-bottom headerbar, .maximized headerbar:backdrop, .maximized headerbar, .fullscreen headerbar:backdrop, .fullscreen headerbar { border-radius: 0; } .default-decoration.titlebar:not(headerbar), headerbar.default-decoration { min-height: 28px; padding: 4px; } @@ -670,7 +670,7 @@ headerbar entry, headerbar spinbutton, headerbar separator, headerbar button { m headerbar switch { margin-top: 9px; margin-bottom: 9px; } -.background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar:backdrop, .background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar { border-top-left-radius: 7px; border-top-right-radius: 7px; } +.background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar:backdrop, .background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar, .background:not(.tiled-top):not(.maximized):not(.solid-csd) .titlebar:backdrop, .background:not(.tiled-top):not(.maximized):not(.solid-csd) .titlebar, .background:not(.tiled-left):not(.maximized):not(.solid-csd) .titlebar:backdrop, .background:not(.tiled-left):not(.maximized):not(.solid-csd) .titlebar, .background:not(.tiled-right):not(.maximized):not(.solid-csd) .titlebar:backdrop, .background:not(.tiled-right):not(.maximized):not(.solid-csd) .titlebar, .background:not(.tiled-bottom):not(.maximized):not(.solid-csd) .titlebar:backdrop, .background:not(.tiled-bottom):not(.maximized):not(.solid-csd) .titlebar { border-top-left-radius: 7px; border-top-right-radius: 7px; } window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) separator:first-child + headerbar:backdrop, window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) separator:first-child + headerbar, window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) headerbar:first-child:backdrop, window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) headerbar:first-child { border-top-left-radius: 7px; } @@ -1848,7 +1848,7 @@ decoration { border-radius: 7px 7px 0 0; border-width: 0px; box-shadow: 0 3px 9p decoration:backdrop { box-shadow: 0 3px 9px 1px transparent, 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.18); transition: 200ms ease-out; } -.maximized decoration, .fullscreen decoration, .tiled decoration { border-radius: 0; } +.maximized decoration, .fullscreen decoration, .tiled decoration, .tiled-top decoration, .tiled-left decoration, .tiled-right decoration, .tiled-bottom decoration { border-radius: 0; } .popup decoration { box-shadow: none; } |