Bug 1736437 - Port bug 1509931: Simplify titlebar buttons CSS. r=aleca

There's no need to use the media query to set the default styles of the
buttons, we only need to hide them if appropriate.

--HG--
extra : amend_source : 9b3384e4e63509de8d5ba1be1b29e95ed049335b
This commit is contained in:
Richard Marti 2021-10-19 13:38:38 +03:00
Родитель b6041197a9
Коммит 3bf3ea313a
1 изменённых файлов: 20 добавлений и 36 удалений

Просмотреть файл

@ -77,17 +77,9 @@
/* We draw to titlebar when Gkt+ CSD is available */
@media (-moz-gtk-csd-available) {
/* Some Gtk+ themes use non-rectangular toplevel windows. To fully support
* such themes we need to make toplevel window transparent.
* It may cause performanance issues so let's put it under a preference
* and enable it for desktop environment which do that by default.
* See nsWindow::TopLevelWindowUseARGBVisual() for details. */
@media (-moz-gtk-csd-transparent-background) {
:root[tabsintitlebar]:not(:-moz-lwtheme) {
background-color: transparent;
background-image: linear-gradient(transparent 25px, -moz-dialog 25px);
appearance: none;
}
:root[tabsintitlebar]:not(:-moz-lwtheme) {
background-color: transparent;
background-image: linear-gradient(transparent 25px, -moz-dialog 25px);
}
:root[tabsintitlebar] #titlebar:-moz-lwtheme {
@ -153,42 +145,34 @@
}
/* Render titlebar command buttons according to system config.
* Use full scale icons here as the Gtk+ does.
*/
@media (-moz-gtk-csd-minimize-button) {
#titlebar-min {
appearance: auto;
-moz-default-appearance: -moz-window-button-minimize;
}
* Use full scale icons here as the Gtk+ does. */
#titlebar-min {
appearance: auto;
-moz-default-appearance: -moz-window-button-minimize;
}
#titlebar-max {
appearance: auto;
-moz-default-appearance: -moz-window-button-maximize;
}
:root[sizemode="maximized"] #titlebar-max {
appearance: auto;
-moz-default-appearance: -moz-window-button-restore;
}
#titlebar-close {
appearance: auto;
-moz-default-appearance: -moz-window-button-close;
}
@media (-moz-gtk-csd-minimize-button: 0) {
#titlebar-min {
display: none;
}
}
@media (-moz-gtk-csd-maximize-button) {
#titlebar-max {
appearance: auto;
-moz-default-appearance: -moz-window-button-maximize;
}
:root[sizemode="maximized"] #titlebar-max {
appearance: auto;
-moz-default-appearance: -moz-window-button-restore;
}
}
@media (-moz-gtk-csd-maximize-button: 0) {
#titlebar-max {
display: none;
}
}
@media (-moz-gtk-csd-close-button) {
#titlebar-close {
appearance: auto;
-moz-default-appearance: -moz-window-button-close;
}
}
@media (-moz-gtk-csd-close-button: 0) {
#titlebar-close {
display: none;