From 5c9b361d43cfc7125d7af2b53431f22cb15baa1e Mon Sep 17 00:00:00 2001 From: UK992 Date: Sat, 10 Jun 2017 18:20:53 +0200 Subject: [PATCH] Bug 1185482 - Remove gap between titlebar buttons and navigation toolbar r=dao MozReview-Commit-ID: AD2opbF4Uxn --- browser/base/content/browser-tabsintitlebar.js | 10 ++++++++++ toolkit/modules/AppConstants.jsm | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/browser/base/content/browser-tabsintitlebar.js b/browser/base/content/browser-tabsintitlebar.js index 1db4596b50e6..3a28104f4792 100644 --- a/browser/base/content/browser-tabsintitlebar.js +++ b/browser/base/content/browser-tabsintitlebar.js @@ -176,6 +176,16 @@ var TabsInTitlebar = { // Begin setting CSS properties which will cause a reflow + if (AppConstants.MOZ_PHOTON_THEME && + AppConstants.isPlatformAndVersionAtLeast("win", "10.0")) { + if (!menuHeight) { + 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 // its full height (i.e. including margins) to match the titlebar, // by changing the menubar's bottom padding diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm index 49b3bfede57b..210ec6534272 100644 --- a/toolkit/modules/AppConstants.jsm +++ b/toolkit/modules/AppConstants.jsm @@ -362,4 +362,11 @@ this.AppConstants = Object.freeze({ false, #endif + MOZ_PHOTON_THEME: +#ifdef MOZ_PHOTON_THEME + true, +#else + false, +#endif + });