Bug 1372043 - Set height on titlebar buttons only in miximized window draft
authorUK992 <urbankrajnc92@gmail.com>
Sat, 15 Jul 2017 21:16:56 +0200
changeset 609389 f4d4ef71fad3577d73de9248f39ae7ec5c8948bf
parent 609112 2908b6171cb8df85fc1f0985e2bf94ce3b04a522
child 637560 e7f762951a1e100d8d2643b469612e7b1c2f17f6
push id68564
push userbmo:urbankrajnc92@gmail.com
push dateSat, 15 Jul 2017 19:18:03 +0000
bugs1372043
milestone56.0a1
Bug 1372043 - Set height on titlebar buttons only in miximized window MozReview-Commit-ID: 5wMN83E72in
browser/base/content/browser-tabsintitlebar.js
--- a/browser/base/content/browser-tabsintitlebar.js
+++ b/browser/base/content/browser-tabsintitlebar.js
@@ -173,17 +173,17 @@ var TabsInTitlebar = {
 
       // And get the height of what's in the titlebar:
       let titlebarContentHeight = rect(titlebarContent).height;
 
       // Begin setting CSS properties which will cause a reflow
 
       if (AppConstants.MOZ_PHOTON_THEME &&
           AppConstants.isPlatformAndVersionAtLeast("win", "10.0")) {
-        if (!menuHeight) {
+        if (!menuHeight && window.windowState == window.STATE_MAXIMIZED) {
           titlebarContentHeight = Math.max(titlebarContentHeight, fullTabsHeight);
           $("titlebar-buttonbox").style.height = titlebarContentHeight + "px";
         } else {
           $("titlebar-buttonbox").style.removeProperty("height");
         }
       }
 
       // If the menubar is around (menuHeight is non-zero), try to adjust