Bug 1283299 - Part 9: Update browser styles to use CSD on GTK. r?karlt draft
authorAndrew Comminos <andrew@comminos.com>
Tue, 05 Jul 2016 14:15:04 -0400
changeset 384226 9cacb2b9314e
parent 384225 f511ac18ce61
child 384227 6ce569259603
push id22212
push userbmo:andrew@comminos.com
push dateTue, 05 Jul 2016 20:52:16 +0000
reviewerskarlt
bugs1283299
milestone50.0a1
Bug 1283299 - Part 9: Update browser styles to use CSD on GTK. r?karlt MozReview-Commit-ID: Ao6O2zMtclc
browser/themes/linux/browser.css
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -1495,18 +1495,22 @@ html|span.ac-emphasize-text-url {
   margin-bottom: calc(-1 * var(--tab-toolbar-navbar-overlap));
 }
 
 #TabsToolbar:not(:-moz-lwtheme) {
   -moz-appearance: menubar;
   color: -moz-menubartext;
 }
 
+/* Support dragging the window using the toolbar when drawing our own
+ * decorations, or where the GTK theme allows. */
 #toolbar-menubar:not([autohide="true"]):not(:-moz-lwtheme):-moz-system-metric(menubar-drag),
-#TabsToolbar:not(:-moz-lwtheme):-moz-system-metric(menubar-drag) {
+#TabsToolbar:not(:-moz-lwtheme):-moz-system-metric(menubar-drag),
+#main-window[tabsintitlebar] #toolbar-menubar:not([autohide="true"]),
+#main-window[tabsintitlebar] #TabsToolbar {
   -moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag");
 }
 
 .tabbrowser-tab:focus > .tab-stack > .tab-content {
   outline: 1px dotted;
   outline-offset: -6px;
 }
 
@@ -1820,22 +1824,24 @@ notification.pluginVulnerable > .notific
 }
 
 %include ../shared/social/chat.inc.css
 
 /* Customization mode */
 
 %include ../shared/customizableui/customizeMode.inc.css
 
+#main-window[tabsintitlebar][customize-entered] > #titlebar,
 #main-window[customize-entered] > #tab-view-deck {
   background-image: url("chrome://browser/skin/customizableui/customizeMode-gridTexture.png"),
                     linear-gradient(to bottom, #bcbcbc, #b5b5b5);
   background-attachment: fixed;
 }
 
+#main-window[tabsintitlebar][customization-lwtheme] > #titlebar:-moz-lwtheme,
 #main-window[customization-lwtheme] > #tab-view-deck:-moz-lwtheme {
   background-repeat: no-repeat;
   background-position: right top;
   background-attachment: fixed;
   /* The image will get set from CustomizeMode.jsm */
   background-image: none;
   background-color: transparent;
 }
@@ -1933,8 +1939,52 @@ notification.pluginVulnerable > .notific
 .browser-extension-panel > .panel-arrowcontainer > .panel-arrowcontent {
   padding: 0;
   overflow: hidden;
 }
 
 .menuitem-iconic[usercontextid] > .menu-iconic-left > .menu-iconic-icon {
   visibility: visible;
 }
+
+/* Titlebar/CSD */
+
+#main-window[tabsintitlebar][sizemode="normal"] {
+  -moz-appearance: -moz-gtk-window-decoration;
+  background-color: transparent;
+  background-clip: border-box;
+  background-origin: border-box;
+}
+
+#main-window[tabsintitlebar][sizemode="normal"]:not([customizing]):not(:-moz-lwtheme) > #titlebar {
+  -moz-appearance: -moz-window-titlebar;
+}
+
+#main-window[tabsintitlebar][sizemode="maximized"]:not([customizing]):not(:-moz-lwtheme) > #titlebar {
+  -moz-appearance: -moz-window-titlebar-maximized;
+}
+
+#main-window[tabsintitlebar]:not([sizemode="fullscreen"]) #TabsToolbar {
+  -moz-appearance: none;
+}
+
+/* titlebar command buttons */
+
+#titlebar-min {
+  list-style-image: url("moz-icon://stock/window-minimize-symbolic?size=menu");
+  -moz-appearance: -moz-window-button-minimize;
+}
+
+#titlebar-max {
+  list-style-image: url("moz-icon://stock/window-maximize-symbolic?size=menu");
+  -moz-appearance: -moz-window-button-maximize;
+}
+
+#main-window[sizemode="maximized"] #titlebar-max {
+  list-style-image: url("moz-icon://stock/window-restore-symbolic?size=menu");
+  -moz-appearance: -moz-window-button-restore;
+}
+
+#titlebar-close {
+  list-style-image: url("moz-icon://stock/window-close-symbolic?size=menu");
+  -moz-appearance: -moz-window-button-close;
+}
+