Bug 1489662 - Port bug 1408360 to TB: Make toplevel window transparent when mozilla.widget.titlebar-theme-round-corners is set. r=darktrojan
authorRichard Marti <richard.marti@gmail.com>
Thu, 06 Sep 2018 20:19:09 +0200
changeset 33109 4eec6def8a100730fef0fcd861272998640189ab
parent 33108 a8d134e692bdbc0efc034cb66c0583bca9df5f8c
child 33110 a682d50b9f77d581c589af056c5fe49b40a8b436
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersdarktrojan
bugs1489662, 1408360
Bug 1489662 - Port bug 1408360 to TB: Make toplevel window transparent when mozilla.widget.titlebar-theme-round-corners is set. r=darktrojan
mail/themes/linux/mail/messenger.css
--- a/mail/themes/linux/mail/messenger.css
+++ b/mail/themes/linux/mail/messenger.css
@@ -102,16 +102,28 @@ toolbar[brighttext] {
 @media (-moz-gtk-csd-available: 0) {
   #titlebar {
     display: none;
   }
 }
 
 /* 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 with ARGB visual.
+   * It may cause performanance issue so let's put it under a preference
+   * and allow distros to enable it per default theme. */
+  @supports -moz-bool-pref("mozilla.widget.use-argb-visuals") {
+    :root[tabsintitlebar]:not(:-moz-lwtheme) {
+      background-color: transparent;
+      background-image: linear-gradient(transparent 25px, -moz-dialog 25px);
+      -moz-appearance: none;
+    }
+  }
+
   :root[tabsintitlebar] > #titlebar:-moz-lwtheme {
     visibility: hidden;
   }
   :root[tabsintitlebar] #titlebar-content:-moz-lwtheme {
     visibility: visible;
   }
 
   :root[tabsintitlebar][sizemode="normal"] > #titlebar {