Skip to content

Commit 0dce8e7

Browse files
committed
fix(sonar/ui): give DPAPI help-text label enough height for two lines
The 8pt help-text under 'Bearer Token:' wrapped to two lines and the second line ('Only this Windows user on this machine can decrypt it.') was clipped by the bottom edge of the Authentication groupbox at Hi-DPI. Bumped lblTokenInfo.Height from 26 to 40 and grpAuth from 100 to 116 so the second line fits inside the box. Total content height now 12 + 168 + 12 + 116 + 12 + 200 = 520, matches the frame's .dfm Height. Memo inside grpActions adapts via the existing formula. Hi-DPI note: this is a fixed-pixel layout, so 150% / 200% scaling still clips eventually. A proper Anchors-based refactor with TPanel containers would solve it for good - tracked but out of scope for the immediate visual fix.
1 parent 528c69c commit 0dce8e7

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

StaticCodeAnalyserIDE/uIDESonarOptions.pas

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,14 @@ procedure TSonarOptionsFrame.BuildControls;
173173
chkInsecure.Caption := 'Accept self-signed TLS certificates';
174174

175175
// ============== Auth ==============
176+
// Hoehe 116 (vorher 100): bei Hi-DPI wickelt der 8pt-Help-Text auf 2
177+
// Zeilen und die zweite Zeile lag unter der GroupBox-Unterkante.
176178
grpAuth := TGroupBox.Create(Self);
177179
grpAuth.Parent := Self;
178180
grpAuth.Left := MARGIN_LEFT;
179181
grpAuth.Top := Y;
180182
grpAuth.Width := GROUP_W;
181-
grpAuth.Height := 100;
183+
grpAuth.Height := 116;
182184
grpAuth.Caption := 'Authentication';
183185
Inc(Y, grpAuth.Height + 12);
184186

@@ -201,9 +203,11 @@ procedure TSonarOptionsFrame.BuildControls;
201203
lblTokenInfo := TLabel.Create(Self); lblTokenInfo.Parent := grpAuth;
202204
lblTokenInfo.AutoSize := False;
203205
lblTokenInfo.Left := INNER_LEFT + LBL_W;
204-
lblTokenInfo.Top := edToken.Top + 26;
206+
lblTokenInfo.Top := edToken.Top + 28;
205207
lblTokenInfo.Width := EDIT_W;
206-
lblTokenInfo.Height := 26;
208+
// 40px statt 26: Hi-DPI 8pt mit WordWrap braucht ~18-20px pro Zeile.
209+
// 26 hatte die zweite Zeile angeschnitten.
210+
lblTokenInfo.Height := 40;
207211
lblTokenInfo.WordWrap := True;
208212
lblTokenInfo.Font.Color := clGrayText;
209213
// 8pt statt Default 9pt - Hilfe-Text soll subtler als die Field-Labels

0 commit comments

Comments
 (0)