Bug 1375013 - Fix stub footer text for RTL locales, and adjust width to prevent running over logo image. r=rstrong, a=jcristau
authorMatt Howell <mhowell@mozilla.com>
Thu, 22 Jun 2017 15:18:52 -0700
changeset 414132 9c661a8902fabed6c8c7fe93e5548e22efbf67df
parent 414131 67c173e36b9e19b66bceb4015c82d6efb5746df7
child 414133 fbd7e0cbfc7779484f59512d95e45658a0b5d8d8
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong, jcristau
bugs1375013
milestone55.0
Bug 1375013 - Fix stub footer text for RTL locales, and adjust width to prevent running over logo image. r=rstrong, a=jcristau MozReview-Commit-ID: 7UyK9SKV17D
browser/installer/windows/nsis/defines.nsi.in
browser/installer/windows/nsis/stub.nsi
--- a/browser/installer/windows/nsis/defines.nsi.in
+++ b/browser/installer/windows/nsis/defines.nsi.in
@@ -123,12 +123,12 @@ VIAddVersionKey "ProductVersion"  "${App
 # non-default DPI settings
 !define OPTIONS_ITEM_EDGE_DU 90u
 !define OPTIONS_ITEM_WIDTH_DU 356u
 !define OPTIONS_SUBITEM_EDGE_DU 119u
 !define OPTIONS_SUBITEM_WIDTH_DU 327u
 !define NOW_INSTALLING_TOP_DU 70u
 !define INSTALL_BLURB_TOP_DU 137u
 !define INSTALL_FOOTER_TOP_DU -48u
-!define INSTALL_FOOTER_WIDTH_DU 300u
+!define INSTALL_FOOTER_WIDTH_DU 250u
 !define PROGRESS_BAR_TOP_DU 112u
 !define APPNAME_BMP_EDGE_DU 19u
 !define APPNAME_BMP_TOP_DU 12u
--- a/browser/installer/windows/nsis/stub.nsi
+++ b/browser/installer/windows/nsis/stub.nsi
@@ -828,25 +828,27 @@ Function createInstall
   Pop $LabelBlurb
   SendMessage $LabelBlurb ${WM_SETFONT} $FontBlurb 0
   SetCtlColors $LabelBlurb ${INSTALL_BLURB_TEXT_COLOR} transparent
 
   StrCpy $CurrentBlurbIdx "0"
 
   ; In some locales, the footer message may be too long to fit on one line.
   ; Figure out how much height it needs and give it that much.
-  ${GetTextExtent} "$(STUB_BLURB_FOOTER)" $FontFooter $R1 $R2
-  StrCpy $1 0
-  ${While} $R1 > 0
-    IntOp $1 $1 + $R2
-    IntOp $R1 $R1 - ${INSTALL_FOOTER_WIDTH_DU}
-  ${EndWhile}
-  nsDialogs::CreateControl STATIC ${DEFAULT_STYLES}|${SS_NOTIFY}|${SS_RIGHT} \
-    ${WS_EX_TRANSPARENT} -320u ${INSTALL_FOOTER_TOP_DU} \
-    ${INSTALL_FOOTER_WIDTH_DU} "$1u" "$(STUB_BLURB_FOOTER)"
+  ${GetTextWidthHeight} "$(STUB_BLURB_FOOTER)" $FontFooter \
+    ${INSTALL_FOOTER_WIDTH_DU} $R1 $R2
+  !ifdef ${AB_CD}_rtl
+    nsDialogs::CreateControl STATIC ${DEFAULT_STYLES}|${SS_NOTIFY} \
+      ${WS_EX_TRANSPARENT} 30u ${INSTALL_FOOTER_TOP_DU} ${INSTALL_FOOTER_WIDTH_DU} "$R2u" \
+      "$(STUB_BLURB_FOOTER)"
+  !else
+    nsDialogs::CreateControl STATIC ${DEFAULT_STYLES}|${SS_NOTIFY}|${SS_RIGHT} \
+      ${WS_EX_TRANSPARENT} 175u ${INSTALL_FOOTER_TOP_DU} ${INSTALL_FOOTER_WIDTH_DU} "$R2u" \
+      "$(STUB_BLURB_FOOTER)"
+  !endif
   Pop $0
   SendMessage $0 ${WM_SETFONT} $FontFooter 0
   SetCtlColors $0 ${INSTALL_BLURB_TEXT_COLOR} transparent
 
   ${NSD_CreateProgressBar} 20% ${PROGRESS_BAR_TOP_DU} 60% 12u ""
   Pop $Progressbar
   ${NSD_AddStyle} $Progressbar ${PBS_MARQUEE}
   SendMessage $Progressbar ${PBM_SETMARQUEE} 1 \