Bug 1418005 - Draw CSD titlebar according to -moz-gtk-csd-available and draw tilebar buttons. r=aceman

This commit is contained in:
Richard Marti 2017-11-17 23:42:40 +01:00
Родитель 6105d979dd
Коммит b743e8293f
4 изменённых файлов: 84 добавлений и 6 удалений

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

@ -497,11 +497,7 @@ pref("mail.tabs.closeWindowWithLastTab", true);
pref("mail.tabs.closeButtons", 1);
// Allow the tabs to be in the titlebar on supported systems
#ifdef UNIX_BUT_NOT_MAC
pref("mail.tabs.drawInTitlebar", false);
#else
pref("mail.tabs.drawInTitlebar", true);
#endif
// The breakpad report server to link to in about:crashes
pref("breakpad.reportURL", "https://crash-stats.mozilla.com/report/index/");

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

@ -21,7 +21,7 @@ if CONFIG['MOZILLA_OFFICIAL']:
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
DEFINES['HAVE_SHELL_SERVICE'] = 1
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'):
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa', 'gtk3'):
DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
if CONFIG['MOZ_UPDATER']:

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

@ -88,6 +88,88 @@ toolbar[brighttext] {
--toolbarbutton-checkedhover-backgroundcolor: rgba(85%, 85%, 85%, .25);
}
/* 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 {
position: relative;
z-index: 1;
}
.titlebar-button {
padding: initial;
}
/* 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;
}
}
}
toolbar:not(.inline-toolbar):not(:-moz-lwtheme) {
-moz-appearance: menubar;
color: -moz-menubartext;

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

@ -8,7 +8,7 @@
* Tabmail Tabs
*/
#navigation-toolbox:not(:-moz-lwtheme) {
:root:not([tabsintitlebar]) > #navigation-toolbox:not(:-moz-lwtheme) {
-moz-appearance: menubar;
}