Bug 1548612 Part 7 - Add and normalize stub installer UI parameters. r=agashlin a=jcristau
authorMatt Howell <mhowell@mozilla.com>
Tue, 21 May 2019 23:29:22 +0000
changeset 536461 a8cd16438d96df1cbdb7c0340fd99b9e5b2659d5
parent 536460 4e75132ecb51125eb96f6439c59cbeb0ade93566
child 536462 37268a8937c5afac3c47fbb0428d3d2f751e3891
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersagashlin, jcristau
bugs1548612
milestone68.0
Bug 1548612 Part 7 - Add and normalize stub installer UI parameters. r=agashlin a=jcristau This patch adds a bunch of new defines for stub installer UI parameters that were previously hard coded or implicit, moves several that were universal into the branding files, removes several no longer used ones, and changes the names of some others to match a standard naming convention. Depends on D31144 Differential Revision: https://phabricator.services.mozilla.com/D31145
browser/branding/aurora/branding.nsi
browser/branding/nightly/branding.nsi
browser/branding/official/branding.nsi
browser/branding/unofficial/branding.nsi
browser/installer/windows/nsis/defines.nsi.in
browser/installer/windows/nsis/stub.nsi
--- a/browser/branding/aurora/branding.nsi
+++ b/browser/branding/aurora/branding.nsi
@@ -23,32 +23,45 @@
 !define Channel "aurora"
 
 # The installer's certificate name and issuer expected by the stub installer
 !define CertNameDownload   "Mozilla Corporation"
 !define CertIssuerDownload "DigiCert SHA2 Assured ID Code Signing CA"
 
 # Dialog units are used so the UI displays correctly with the system's DPI
 # settings.
-# The dialog units for the bitmap's dimensions should match exactly with the
-# bitmap's width and height in pixels.
-!define APPNAME_BMP_WIDTH_DU 108u
-!define APPNAME_BMP_HEIGHT_DU 48u
-!define INTRO_BLURB_WIDTH_DU "232u"
-!define INTRO_BLURB_EDGE_DU "196u"
-!define INTRO_BLURB_LTR_TOP_DU "16u"
-!define INTRO_BLURB_RTL_TOP_DU "11u"
-!define INSTALL_FOOTER_TOP_DU "-48u"
+!define PROFILE_CLEANUP_LABEL_TOP "39u"
+!define PROFILE_CLEANUP_LABEL_LEFT "0"
+!define PROFILE_CLEANUP_LABEL_WIDTH "100%"
+!define PROFILE_CLEANUP_LABEL_ALIGN "center"
+!define PROFILE_CLEANUP_CHECKBOX_LEFT "center"
+!define PROFILE_CLEANUP_CHECKBOX_WIDTH "100%"
+!define PROFILE_CLEANUP_BUTTON_LEFT "center"
+!define INSTALL_BLURB_TOP "137u"
+!define INSTALL_BLURB_WIDTH "60u"
+!define INSTALL_FOOTER_TOP "-48u"
+!define INSTALL_FOOTER_WIDTH "250u"
+!define INSTALL_INSTALLING_TOP "70u"
+!define INSTALL_INSTALLING_LEFT "0"
+!define INSTALL_INSTALLING_WIDTH "100%"
+!define INSTALL_PROGRESS_BAR_TOP "112u"
+!define INSTALL_PROGRESS_BAR_LEFT "20%"
+!define INSTALL_PROGRESS_BAR_WIDTH "60%"
+!define INSTALL_PROGRESS_BAR_HEIGHT "12u"
+
+!define PROFILE_CLEANUP_CHECKBOX_TOP_MARGIN "20u"
+!define PROFILE_CLEANUP_BUTTON_TOP_MARGIN "20u"
+!define PROFILE_CLEANUP_BUTTON_X_PADDING "40u"
+!define PROFILE_CLEANUP_BUTTON_Y_PADDING "4u"
+
+# Font settings that can be customized for each channel
+!define INSTALL_HEADER_FONT_SIZE 28
+!define INSTALL_HEADER_FONT_WEIGHT 400
+!define INSTALL_INSTALLING_FONT_SIZE 28
+!define INSTALL_INSTALLING_FONT_WEIGHT 400
 
 # UI Colors that can be customized for each channel
-!define FOOTER_CONTROL_TEXT_COLOR_NORMAL 0x000000
-!define FOOTER_CONTROL_TEXT_COLOR_FADED 0x999999
-!define FOOTER_BKGRD_COLOR 0xFFFFFF
-!define INSTALL_FOOTER_TEXT_COLOR 0xFFFFFF
-!define INTRO_BLURB_TEXT_COLOR 0xFFFFFF
-!define INSTALL_BLURB_TEXT_COLOR 0xFFFFFF
-!define INSTALL_PROGRESS_TEXT_COLOR_NORMAL 0xFFFFFF
-!define COMMON_TEXT_COLOR_NORMAL 0xFFFFFF
-!define COMMON_TEXT_COLOR_FADED 0xA1AAB3
-!define COMMON_BKGRD_COLOR 0x0F1B26
+!define COMMON_TEXT_COLOR 0xFFFFFF
+!define COMMON_BACKGROUND_COLOR 0x000000
+!define INSTALL_INSTALLING_TEXT_COLOR 0xFFFFFF
 
 # Enable DeveloperEdition-specific behavior
 !define DEV_EDITION
--- a/browser/branding/nightly/branding.nsi
+++ b/browser/branding/nightly/branding.nsi
@@ -22,29 +22,42 @@
 !define Channel "nightly"
 
 # The installer's certificate name and issuer expected by the stub installer
 !define CertNameDownload   "Mozilla Corporation"
 !define CertIssuerDownload "DigiCert SHA2 Assured ID Code Signing CA"
 
 # Dialog units are used so the UI displays correctly with the system's DPI
 # settings.
-# The dialog units for the bitmap's dimensions should match exactly with the
-# bitmap's width and height in pixels.
-!define APPNAME_BMP_WIDTH_DU 159u
-!define APPNAME_BMP_HEIGHT_DU 28u
-!define INTRO_BLURB_WIDTH_DU "230u"
-!define INTRO_BLURB_EDGE_DU "198u"
-!define INTRO_BLURB_LTR_TOP_DU "16u"
-!define INTRO_BLURB_RTL_TOP_DU "11u"
-!define INSTALL_FOOTER_TOP_DU "-48u"
+!define PROFILE_CLEANUP_LABEL_TOP "39u"
+!define PROFILE_CLEANUP_LABEL_LEFT "0"
+!define PROFILE_CLEANUP_LABEL_WIDTH "100%"
+!define PROFILE_CLEANUP_LABEL_ALIGN "center"
+!define PROFILE_CLEANUP_CHECKBOX_LEFT "center"
+!define PROFILE_CLEANUP_CHECKBOX_WIDTH "100%"
+!define PROFILE_CLEANUP_BUTTON_LEFT "center"
+!define INSTALL_BLURB_TOP "137u"
+!define INSTALL_BLURB_WIDTH "60u"
+!define INSTALL_FOOTER_TOP "-48u"
+!define INSTALL_FOOTER_WIDTH "250u"
+!define INSTALL_INSTALLING_TOP "70u"
+!define INSTALL_INSTALLING_LEFT "0"
+!define INSTALL_INSTALLING_WIDTH "100%"
+!define INSTALL_PROGRESS_BAR_TOP "112u"
+!define INSTALL_PROGRESS_BAR_LEFT "20%"
+!define INSTALL_PROGRESS_BAR_WIDTH "60%"
+!define INSTALL_PROGRESS_BAR_HEIGHT "12u"
+
+!define PROFILE_CLEANUP_CHECKBOX_TOP_MARGIN "20u"
+!define PROFILE_CLEANUP_BUTTON_TOP_MARGIN "20u"
+!define PROFILE_CLEANUP_BUTTON_X_PADDING "40u"
+!define PROFILE_CLEANUP_BUTTON_Y_PADDING "4u"
+
+# Font settings that can be customized for each channel
+!define INSTALL_HEADER_FONT_SIZE 28
+!define INSTALL_HEADER_FONT_WEIGHT 400
+!define INSTALL_INSTALLING_FONT_SIZE 28
+!define INSTALL_INSTALLING_FONT_WEIGHT 400
 
 # UI Colors that can be customized for each channel
-!define FOOTER_CONTROL_TEXT_COLOR_NORMAL 0x000000
-!define FOOTER_CONTROL_TEXT_COLOR_FADED 0x999999
-!define FOOTER_BKGRD_COLOR 0xFFFFFF
-!define INSTALL_FOOTER_TEXT_COLOR 0xFFFFFF
-!define INTRO_BLURB_TEXT_COLOR 0xFFFFFF
-!define INSTALL_BLURB_TEXT_COLOR 0xFFFFFF
-!define INSTALL_PROGRESS_TEXT_COLOR_NORMAL 0xFFFFFF
-!define COMMON_TEXT_COLOR_NORMAL 0xFFFFFF
-!define COMMON_TEXT_COLOR_FADED 0xA1AAB3
-!define COMMON_BKGRD_COLOR 0x0F1B26
+!define COMMON_TEXT_COLOR 0xFFFFFF
+!define COMMON_BACKGROUND_COLOR 0x000000
+!define INSTALL_INSTALLING_TEXT_COLOR 0xFFFFFF
--- a/browser/branding/official/branding.nsi
+++ b/browser/branding/official/branding.nsi
@@ -26,30 +26,50 @@
 !define URLSystemRequirements "https://www.mozilla.org/firefox/system-requirements/"
 !define Channel "release"
 
 # The installer's certificate name and issuer expected by the stub installer
 !define CertNameDownload   "Mozilla Corporation"
 !define CertIssuerDownload "DigiCert SHA2 Assured ID Code Signing CA"
 
 # Dialog units are used so the UI displays correctly with the system's DPI
-# settings.
-# The dialog units for the bitmap's dimensions should match exactly with the
-# bitmap's width and height in pixels.
-!define APPNAME_BMP_WIDTH_DU "134u"
-!define APPNAME_BMP_HEIGHT_DU "36u"
-!define INTRO_BLURB_WIDTH_DU "258u"
-!define INTRO_BLURB_EDGE_DU "170u"
-!define INTRO_BLURB_LTR_TOP_DU "20u"
-!define INTRO_BLURB_RTL_TOP_DU "12u"
-!define INSTALL_FOOTER_TOP_DU "-33u"
+# settings. These are tweaked to look good with the en-US strings; ideally
+# we would customize them for each locale but we don't really have a way to
+# implement that and it would be a ton of work for the localizers.
+!define PROFILE_CLEANUP_LABEL_TOP "50u"
+!define PROFILE_CLEANUP_LABEL_LEFT "22u"
+!define PROFILE_CLEANUP_LABEL_WIDTH "175u"
+!define PROFILE_CLEANUP_LABEL_HEIGHT "100u"
+!define PROFILE_CLEANUP_LABEL_ALIGN "left"
+!define PROFILE_CLEANUP_CHECKBOX_LEFT "22u"
+!define PROFILE_CLEANUP_CHECKBOX_WIDTH "175u"
+!define PROFILE_CLEANUP_BUTTON_LEFT "22u"
+!define INSTALL_HEADER_TOP "70u"
+!define INSTALL_HEADER_LEFT "22u"
+!define INSTALL_HEADER_WIDTH "180u"
+!define INSTALL_BODY_LEFT "22u"
+!define INSTALL_BODY_WIDTH "180u"
+!define INSTALL_INSTALLING_TOP "115u"
+!define INSTALL_INSTALLING_LEFT "270u"
+!define INSTALL_INSTALLING_WIDTH "150u"
+!define INSTALL_PROGRESS_BAR_TOP "100u"
+!define INSTALL_PROGRESS_BAR_LEFT "270u"
+!define INSTALL_PROGRESS_BAR_WIDTH "150u"
+!define INSTALL_PROGRESS_BAR_HEIGHT "12u"
+
+!define PROFILE_CLEANUP_CHECKBOX_TOP_MARGIN "20u"
+!define PROFILE_CLEANUP_BUTTON_TOP_MARGIN "20u"
+!define PROFILE_CLEANUP_BUTTON_X_PADDING "80u"
+!define PROFILE_CLEANUP_BUTTON_Y_PADDING "8u"
+!define INSTALL_BODY_TOP_MARGIN "20u"
+
+# Font settings that can be customized for each channel
+!define INSTALL_HEADER_FONT_SIZE 20
+!define INSTALL_HEADER_FONT_WEIGHT 600
+!define INSTALL_INSTALLING_FONT_SIZE 15
+!define INSTALL_INSTALLING_FONT_WEIGHT 600
 
 # UI Colors that can be customized for each channel
-!define FOOTER_CONTROL_TEXT_COLOR_NORMAL 0x000000
-!define FOOTER_CONTROL_TEXT_COLOR_FADED 0x666666
-!define FOOTER_BKGRD_COLOR 0xFFFFFF
-!define INSTALL_FOOTER_TEXT_COLOR 0x000000
-!define INTRO_BLURB_TEXT_COLOR 0x666666
-!define INSTALL_BLURB_TEXT_COLOR 0x666666
-!define INSTALL_PROGRESS_TEXT_COLOR_NORMAL 0x666666
-!define COMMON_TEXT_COLOR_NORMAL 0x000000
-!define COMMON_TEXT_COLOR_FADED 0x666666
-!define COMMON_BKGRD_COLOR 0xF0F0F0
+!define COMMON_TEXT_COLOR 0x000000
+!define COMMON_BACKGROUND_COLOR 0xFFFFFF
+!define INSTALL_INSTALLING_TEXT_COLOR 0xFFFFFF
+# This color is written as 0x00BBGGRR because it's actually a COLORREF value.
+!define PROGRESS_BAR_BACKGROUND_COLOR 0xFFAA00
--- a/browser/branding/unofficial/branding.nsi
+++ b/browser/branding/unofficial/branding.nsi
@@ -22,29 +22,42 @@
 !define Channel "unofficial"
 
 # The installer's certificate name and issuer expected by the stub installer
 !define CertNameDownload   "Mozilla Corporation"
 !define CertIssuerDownload "DigiCert SHA2 Assured ID Code Signing CA"
 
 # Dialog units are used so the UI displays correctly with the system's DPI
 # settings.
-# The dialog units for the bitmap's dimensions should match exactly with the
-# bitmap's width and height in pixels.
-!define APPNAME_BMP_WIDTH_DU 159u
-!define APPNAME_BMP_HEIGHT_DU 50u
-!define INTRO_BLURB_WIDTH_DU "230u"
-!define INTRO_BLURB_EDGE_DU "198u"
-!define INTRO_BLURB_LTR_TOP_DU "16u"
-!define INTRO_BLURB_RTL_TOP_DU "11u"
-!define INSTALL_FOOTER_TOP_DU "-48u"
+!define PROFILE_CLEANUP_LABEL_TOP "39u"
+!define PROFILE_CLEANUP_LABEL_LEFT "0"
+!define PROFILE_CLEANUP_LABEL_WIDTH "100%"
+!define PROFILE_CLEANUP_LABEL_ALIGN "center"
+!define PROFILE_CLEANUP_CHECKBOX_LEFT "center"
+!define PROFILE_CLEANUP_CHECKBOX_WIDTH "100%"
+!define PROFILE_CLEANUP_BUTTON_LEFT "center"
+!define INSTALL_BLURB_TOP "137u"
+!define INSTALL_BLURB_WIDTH "60u"
+!define INSTALL_FOOTER_TOP "-48u"
+!define INSTALL_FOOTER_WIDTH "250u"
+!define INSTALL_INSTALLING_TOP "70u"
+!define INSTALL_INSTALLING_LEFT "0"
+!define INSTALL_INSTALLING_WIDTH "100%"
+!define INSTALL_PROGRESS_BAR_TOP "112u"
+!define INSTALL_PROGRESS_BAR_LEFT "20%"
+!define INSTALL_PROGRESS_BAR_WIDTH "60%"
+!define INSTALL_PROGRESS_BAR_HEIGHT "12u"
+
+!define PROFILE_CLEANUP_CHECKBOX_TOP_MARGIN "20u"
+!define PROFILE_CLEANUP_BUTTON_TOP_MARGIN "20u"
+!define PROFILE_CLEANUP_BUTTON_X_PADDING "40u"
+!define PROFILE_CLEANUP_BUTTON_Y_PADDING "4u"
+
+# Font settings that can be customized for each channel
+!define INSTALL_HEADER_FONT_SIZE 28
+!define INSTALL_HEADER_FONT_WEIGHT 400
+!define INSTALL_INSTALLING_FONT_SIZE 28
+!define INSTALL_INSTALLING_FONT_WEIGHT 400
 
 # UI Colors that can be customized for each channel
-!define FOOTER_CONTROL_TEXT_COLOR_NORMAL 0x000000
-!define FOOTER_CONTROL_TEXT_COLOR_FADED 0x999999
-!define FOOTER_BKGRD_COLOR 0xFFFFFF
-!define INSTALL_FOOTER_TEXT_COLOR 0xFFFFFF
-!define INTRO_BLURB_TEXT_COLOR 0xFFFFFF
-!define INSTALL_BLURB_TEXT_COLOR 0xFFFFFF
-!define INSTALL_PROGRESS_TEXT_COLOR_NORMAL 0xFFFFFF
-!define COMMON_TEXT_COLOR_NORMAL 0xFFFFFF
-!define COMMON_TEXT_COLOR_FADED 0xA1AAB3
-!define COMMON_BKGRD_COLOR 0x0F1B26
+!define COMMON_TEXT_COLOR 0xFFFFFF
+!define COMMON_BACKGROUND_COLOR 0x000000
+!define INSTALL_INSTALLING_TEXT_COLOR 0xFFFFFF
--- a/browser/installer/windows/nsis/defines.nsi.in
+++ b/browser/installer/windows/nsis/defines.nsi.in
@@ -143,23 +143,13 @@ VIAddVersionKey "ProductVersion"  "${App
 # VIAddVersionKey "Comments"        "Comments"
 
 # It isn't possible to get the size of the installation prior to downloading
 # so the stub installer uses an estimate. The size is derived from the size of
 # the complete installer, the size of the extracted complete installer, and at
 # least 15 MB additional for working room.
 !define APPROXIMATE_REQUIRED_SPACE_MB "145"
 
-# Control positions in Dialog Units so they are placed correctly with
-# non-default DPI settings
-!define PROFILE_CLEANUP_LABEL_TOP_DU 39u
-!define NOW_INSTALLING_TOP_DU 70u
-!define INSTALL_BLURB_TOP_DU 137u
-!define INSTALL_FOOTER_WIDTH_DU 250u
-!define PROGRESS_BAR_TOP_DU 112u
-!define APPNAME_BMP_EDGE_DU 19u
-!define APPNAME_BMP_TOP_DU 12u
-
 # Constants for parts of the telemetry submission URL
 !define TELEMETRY_BASE_URL https://incoming.telemetry.mozilla.org/submit
 !define TELEMETRY_NAMESPACE firefox-installer
 !define TELEMETRY_INSTALL_PING_VERSION 1
 !define TELEMETRY_INSTALL_PING_DOCTYPE install
--- a/browser/installer/windows/nsis/stub.nsi
+++ b/browser/installer/windows/nsis/stub.nsi
@@ -253,19 +253,16 @@ Var ArchToInstall
 !define URLStubDownloadAArch64 "https://download.mozilla.org/?os=win64-aarch64&lang=${AB_CD}&product=firefox-beta-latest"
 !undef URLManualDownload
 !define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=beta&installer_lang=${AB_CD}"
 !undef Channel
 !define Channel "beta"
 !endif
 !endif
 
-!undef INSTALL_BLURB_TEXT_COLOR
-!define INSTALL_BLURB_TEXT_COLOR 0xFFFFFF
-
 !include "common.nsh"
 
 !insertmacro ElevateUAC
 !insertmacro GetLongPath
 !insertmacro GetPathFromString
 !insertmacro GetParent
 !insertmacro GetSingleInstallPath
 !insertmacro GetTextWidthHeight