mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-20 11:59:26 +02:00
LCL-Win32: Take caption of an autosized GroupBox into account when calculating width. Issue #20447, patch from Henry Vermaak
git-svn-id: trunk@45795 -
This commit is contained in:
parent
bcb2f4643e
commit
634b35e8e6
@ -54,6 +54,9 @@ type
|
||||
const AParams: TCreateParams): HWND; override;
|
||||
class procedure SetBiDiMode(const AWinControl: TWinControl; UseRightToLeftAlign,
|
||||
UseRightToLeftReading, UseRightToLeftScrollBar : Boolean); override;
|
||||
class procedure GetPreferredSize(const AWinControl: TWinControl;
|
||||
var PreferredWidth, PreferredHeight: integer;
|
||||
WithThemeSpace: Boolean); override;
|
||||
end;
|
||||
|
||||
{ TWin32WSGroupBox }
|
||||
@ -560,6 +563,17 @@ begin
|
||||
RecreateWnd(AWinControl);
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomGroupBox.GetPreferredSize(
|
||||
const AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer;
|
||||
WithThemeSpace: Boolean);
|
||||
begin
|
||||
if MeasureText(AWinControl, AWinControl.Caption, PreferredWidth,
|
||||
PreferredHeight) then begin
|
||||
PreferredWidth += 19;
|
||||
PreferredHeight += 4;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TWin32WSCustomListBox }
|
||||
|
||||
function ListBoxWindowProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
|
||||
|
Loading…
Reference in New Issue
Block a user