Skip to content

Commit ca8bdb8

Browse files
committed
installer: fix rendering of red text and links
According to https://jrsoftware.github.io/issrc/whatsnew.htm, the default `DialogFontBaseScaleHeight` (which used to be 13) has changed. We need to accommodate for that change so that the red text and the links overlay the unstyled text again. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 2c65551 commit ca8bdb8

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

installer/install.iss

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,7 @@ function CreateItemDescription(Page:TWizardPage;const Description:String;var Top
14591459
var
14601460
SubLabel:TLabel;
14611461
Untagged,RowPrefix,Link:String;
1462-
RowStart,RowCount,i,j:Integer;
1462+
RowStart,RowCount,RowHeight,i,j:Integer;
14631463
begin
14641464
Untagged:='';
14651465
Result:=TLabel.Create(Page);
@@ -1474,21 +1474,22 @@ begin
14741474
Labels[GetArrayLength(Labels)-1]:=Result;
14751475
RowPrefix:='';
14761476
RowCount:=1;
1477+
RowHeight:=15;
14771478
while True do begin
14781479
case Pos3(Description,#13,'<RED>','<A HREF=',i) of
14791480
'': begin
14801481
Untagged:=Untagged+Description;
14811482
Result.Caption:=Untagged;
1482-
Result.Height:=ScaleY(13*RowCount);
1483-
Top:=Top+13+18;
1483+
Result.Height:=ScaleY(RowHeight*RowCount);
1484+
Top:=Top+RowHeight+18;
14841485
Exit;
14851486
end;
14861487
''+#13: begin
14871488
Untagged:=Untagged+SubString(Description,1,i);
14881489
Description:=SubString(Description,i+1,-1);
14891490
RowCount:=RowCount+1;
14901491
RowPrefix:='';
1491-
Top:=Top+13;
1492+
Top:=Top+RowHeight;
14921493
end;
14931494
'<RED>': begin
14941495
Untagged:=Untagged+SubString(Description,1,i-1);
@@ -1507,14 +1508,14 @@ begin
15071508
SubLabel.Top:=ScaleY(Top);
15081509
SubLabel.Left:=GetTextWidth(RowPrefix,Result.Font)+ScaleX(Left+24);
15091510
SubLabel.Width:=ScaleX(405);
1510-
SubLabel.Height:=ScaleY(13);
1511+
SubLabel.Height:=ScaleY(RowHeight);
15111512
SubLabel.Font.Color:=clRed;
15121513
SubLabel.Visible:=Visible;
15131514
Untagged:=Untagged+SubString(Description,1,j);
15141515
Description:=SubString(Description,j+1,-1);
15151516
i:=i-j;
15161517
RowPrefix:='';
1517-
Top:=Top+13;
1518+
Top:=Top+RowHeight;
15181519
RowCount:=RowCount+1;
15191520
SetArrayLength(Labels,GetArrayLength(Labels)+1);
15201521
Labels[GetArrayLength(Labels)-1]:=SubLabel;
@@ -1525,7 +1526,7 @@ begin
15251526
SubLabel.Top:=ScaleY(Top);
15261527
SubLabel.Left:=GetTextWidth(RowPrefix,Result.Font)+ScaleX(Left+24);
15271528
SubLabel.Width:=ScaleX(405);
1528-
SubLabel.Height:=ScaleY(13*CountLines(SubLabel.Caption));
1529+
SubLabel.Height:=ScaleY(RowHeight*CountLines(SubLabel.Caption));
15291530
SubLabel.Font.Color:=clRed;
15301531
SubLabel.Visible:=Visible;
15311532
Untagged:=Untagged+SubString(Description,1,i-1);
@@ -1563,7 +1564,7 @@ begin
15631564
SubLabel.Top:=ScaleY(Top);
15641565
SubLabel.Left:=GetTextWidth(RowPrefix,Result.Font)+ScaleX(Left+24);
15651566
SubLabel.Width:=ScaleX(405);
1566-
SubLabel.Height:=ScaleY(13);
1567+
SubLabel.Height:=ScaleY(RowHeight);
15671568
SubLabel.Font.Color:=clBlue;
15681569
SubLabel.Font.Style:=[fsUnderline];
15691570
SubLabel.Cursor:=crHand;
@@ -1573,7 +1574,7 @@ begin
15731574
Description:=SubString(Description,j+1,-1);
15741575
i:=i-j;
15751576
RowPrefix:='';
1576-
Top:=Top+13;
1577+
Top:=Top+RowHeight;
15771578
RowCount:=RowCount+1;
15781579
SetArrayLength(Labels,GetArrayLength(Labels)+1);
15791580
Labels[GetArrayLength(Labels)-1]:=SubLabel;
@@ -1585,7 +1586,7 @@ begin
15851586
SubLabel.Top:=ScaleY(Top);
15861587
SubLabel.Left:=GetTextWidth(RowPrefix,Result.Font)+ScaleX(Left+24);
15871588
SubLabel.Width:=ScaleX(405);
1588-
SubLabel.Height:=ScaleY(13*CountLines(SubLabel.Caption));
1589+
SubLabel.Height:=ScaleY(RowHeight*CountLines(SubLabel.Caption));
15891590
SubLabel.Font.Color:=clBlue;
15901591
SubLabel.Font.Style:=[fsUnderline];
15911592
SubLabel.Cursor:=crHand;

0 commit comments

Comments
 (0)