mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Bug 1414222 - Hide or show #titlebar according to -moz-gtk-csd-available and draw tilebar buttons, r=dao
Based on patches by Andrew Comminos [:acomminos] <andrew@comminos.com> MozReview-Commit-ID: EJtahgBcBrf --HG-- extra : rebase_source : 454b0a67139c680f37e5578a92d2bd383188aa6b
This commit is contained in:
parent
f9ba635d12
commit
6069f2da7c
@ -707,3 +707,80 @@ html|span.ac-emphasize-text-url {
|
||||
.restore-tabs-button:hover:active:not([disabled="true"]) {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
/* Hide the titlebar explicitly on versions of GTK+ where
|
||||
* it's rendered by window manager. */
|
||||
@media (-moz-gtk-csd-available: 0) {
|
||||
#titlebar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* We draw to titlebar when Gkt+ CSD is available */
|
||||
@media (-moz-gtk-csd-available) {
|
||||
:root[tabsintitlebar] > #titlebar:-moz-lwtheme {
|
||||
visibility: hidden;
|
||||
}
|
||||
:root[tabsintitlebar] > #titlebar-content:-moz-lwtheme {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
:root[tabsintitlebar][sizemode="normal"] > #titlebar {
|
||||
-moz-appearance: -moz-window-titlebar;
|
||||
}
|
||||
:root[tabsintitlebar][sizemode="maximized"] > #titlebar {
|
||||
-moz-appearance: -moz-window-titlebar-maximized;
|
||||
}
|
||||
|
||||
/* The button box must appear on top of the navigator-toolbox in order for
|
||||
* click and hover mouse events to work properly for the button in the restored
|
||||
* window state. Otherwise, elements in the navigator-toolbox, like the menubar,
|
||||
* can swallow those events.
|
||||
*/
|
||||
#titlebar-buttonbox {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* 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 {
|
||||
list-style-image: url("moz-icon://stock/window-minimize-symbolic");
|
||||
-moz-appearance: -moz-window-button-minimize;
|
||||
}
|
||||
}
|
||||
@media (-moz-gtk-csd-minimize-button: 0) {
|
||||
#titlebar-min {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-gtk-csd-maximize-button) {
|
||||
#titlebar-max {
|
||||
list-style-image: url("moz-icon://stock/window-maximize-symbolic");
|
||||
-moz-appearance: -moz-window-button-maximize;
|
||||
}
|
||||
:root[sizemode="maximized"] #titlebar-max {
|
||||
list-style-image: url("moz-icon://stock/window-restore-symbolic");
|
||||
-moz-appearance: -moz-window-button-restore;
|
||||
}
|
||||
}
|
||||
@media (-moz-gtk-csd-maximize-button: 0) {
|
||||
#titlebar-max {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-gtk-csd-close-button) {
|
||||
#titlebar-close {
|
||||
list-style-image: url("moz-icon://stock/window-close-symbolic");
|
||||
-moz-appearance: -moz-window-button-close;
|
||||
}
|
||||
}
|
||||
@media (-moz-gtk-csd-close-button: 0) {
|
||||
#titlebar-close {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user