зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1562115 - Prevent cutting off long stub installer text strings. r=agashlin
This patch copies over the same fix that was used for the profile cleanup page to the installing page, since in some locales it can run into the same problem of the header string being so long that it causes the next control to get cut off by the bottom of the window. Differential Revision: https://phabricator.services.mozilla.com/D36523 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
704cb5ef71
Коммит
a05a0ad780
|
@ -45,6 +45,7 @@
|
||||||
!define INSTALL_HEADER_TOP "70u"
|
!define INSTALL_HEADER_TOP "70u"
|
||||||
!define INSTALL_HEADER_LEFT "22u"
|
!define INSTALL_HEADER_LEFT "22u"
|
||||||
!define INSTALL_HEADER_WIDTH "180u"
|
!define INSTALL_HEADER_WIDTH "180u"
|
||||||
|
!define INSTALL_HEADER_HEIGHT "100u"
|
||||||
!define INSTALL_BODY_LEFT "22u"
|
!define INSTALL_BODY_LEFT "22u"
|
||||||
!define INSTALL_BODY_WIDTH "180u"
|
!define INSTALL_BODY_WIDTH "180u"
|
||||||
!define INSTALL_INSTALLING_TOP "115u"
|
!define INSTALL_INSTALLING_TOP "115u"
|
||||||
|
|
|
@ -845,10 +845,21 @@ Function createInstall
|
||||||
${DialogUnitsToPixels} ${INSTALL_HEADER_WIDTH} X $0
|
${DialogUnitsToPixels} ${INSTALL_HEADER_WIDTH} X $0
|
||||||
${GetTextWidthHeight} "$(STUB_INSTALLING_HEADLINE)" $FontHeader $0 $R1 $R2
|
${GetTextWidthHeight} "$(STUB_INSTALLING_HEADLINE)" $FontHeader $0 $R1 $R2
|
||||||
${ConvertLeftCoordForRTL} ${INSTALL_HEADER_LEFT} $0 $9
|
${ConvertLeftCoordForRTL} ${INSTALL_HEADER_LEFT} $0 $9
|
||||||
|
; If this text is over the maximum height, drop the font size until it fits.
|
||||||
|
StrCpy $4 $FontHeader
|
||||||
|
!ifdef INSTALL_HEADER_HEIGHT
|
||||||
|
${DialogUnitsToPixels} ${INSTALL_HEADER_HEIGHT} Y $2
|
||||||
|
StrCpy $3 ${INSTALL_HEADER_FONT_SIZE}
|
||||||
|
${While} $R2 > $2
|
||||||
|
IntOp $3 $3 - 2
|
||||||
|
CreateFont $4 "$FontFamilyName" $3 ${INSTALL_HEADER_FONT_WEIGHT}
|
||||||
|
${GetTextWidthHeight} "$(STUB_INSTALLING_HEADLINE)" $4 $0 $R1 $R2
|
||||||
|
${EndWhile}
|
||||||
|
!endif
|
||||||
${NSD_CreateLabel} $9 ${INSTALL_HEADER_TOP} $0 $R2 \
|
${NSD_CreateLabel} $9 ${INSTALL_HEADER_TOP} $0 $R2 \
|
||||||
"$(STUB_INSTALLING_HEADLINE)"
|
"$(STUB_INSTALLING_HEADLINE)"
|
||||||
Pop $0
|
Pop $0
|
||||||
SendMessage $0 ${WM_SETFONT} $FontHeader 0
|
SendMessage $0 ${WM_SETFONT} $4 0
|
||||||
SetCtlColors $0 ${COMMON_TEXT_COLOR} transparent
|
SetCtlColors $0 ${COMMON_TEXT_COLOR} transparent
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче