From 91c6e113449d59276fbf97ec72211ebae4eff319 Mon Sep 17 00:00:00 2001 From: Rafael Mardojai CM Date: Wed, 26 Jun 2019 22:12:28 -0500 Subject: [PATCH] CSD code improvements --- theme/gnome-theme.css | 4 ---- theme/parts/csd.css | 27 +++++++++++++++++---------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/theme/gnome-theme.css b/theme/gnome-theme.css index 49c1d27..12728e6 100755 --- a/theme/gnome-theme.css +++ b/theme/gnome-theme.css @@ -17,7 +17,3 @@ :root { --space-above-tabbar: 0 !important; } - -#main-window { - -moz-appearance: -moz-window-titlebar !important; -} diff --git a/theme/parts/csd.css b/theme/parts/csd.css index 7850153..6d4fee5 100755 --- a/theme/parts/csd.css +++ b/theme/parts/csd.css @@ -2,19 +2,22 @@ @namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); -/* Navbar */ -:root[tabsintitlebar] #nav-bar { - border-radius: 6px 6px 0 0; - position: relative; +#main-window { + -moz-appearance: -moz-window-titlebar !important; } -/* Window controls: at least 1 button */ +/* Headerbar top border corners rounded */ +:root[tabsintitlebar]:not([inFullscreen]):not([sizemode="maximized"]) #nav-bar { + border-radius: 7px 7px 0 0 !important; +} + +/* Window buttons: at least 1 button */ @media (-moz-gtk-csd-minimize-button), (-moz-gtk-csd-maximize-button), (-moz-gtk-csd-close-button) { :root[tabsintitlebar]:not([inFullscreen]) #nav-bar { padding-right: 50px !important; } } -/* Window controls: at least 2 buttons */ +/* Window buttons: at least 2 buttons */ @media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button), (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-close-button), (-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) { @@ -22,14 +25,14 @@ padding-right: 90px !important; } } -/* Window controls: 3 buttons */ +/* Window buttons: 3 buttons */ @media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) { :root[tabsintitlebar]:not([inFullscreen]) #nav-bar { padding-right: 130px !important; } } -/* Fullscreen */ +/* Fullscreen headerbar padding for 1 button */ :root[tabsintitlebar][inFullscreen] #nav-bar { padding-right: 50px !important; } @@ -47,7 +50,7 @@ -moz-appearance: none !important; } -/* Window buttons */ +/* Window buttons style */ :root[tabsintitlebar] #titlebar .titlebar-button, :root[tabsintitlebar][inFullscreen] #window-controls toolbarbutton { -moz-appearance: none !important; @@ -88,6 +91,7 @@ border: var(--gnome-button-border) !important; } +/* Use stack icons for window buttons */ :root[tabsintitlebar] #titlebar .titlebar-buttonbox .titlebar-close .toolbarbutton-icon { filter: var(--gnome-icons-hack-filter); list-style-image: url("moz-icon://stock/window-close-symbolic?size=dialog") !important; @@ -105,6 +109,7 @@ list-style-image: url("moz-icon://stock/view-restore-symbolic?size=dialog") !important; } +/* Remove close and minimize buttons from fullscreen buttons */ :root[tabsintitlebar][inFullscreen] #window-controls #close-button, :root[tabsintitlebar][inFullscreen] #window-controls #minimize-button { display: none; @@ -145,11 +150,13 @@ } } -/* */ +/* Prevent menubar from breaking */ :root[tabsintitlebar] #toolbar-menubar:not([inactive=true]) { height: 30px !important; margin-bottom: 8px; } + +/* Remove default style of titlebar */ :root[tabsintitlebar] #titlebar { -moz-appearance: none !important; }