mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 10:35:58 +02:00
cocoa: using only fixed width for filters in Big Sur and later. This prevents contant resizing of the dialog. bug #38121
git-svn-id: trunk@64175 -
This commit is contained in:
parent
4e0d02024d
commit
aa83422093
@ -248,6 +248,7 @@ const
|
||||
NSAppKitVersionNumber10_13 = 1561;
|
||||
//NSAppKitVersionNumber10_14 = 1641.10; // Mojave's beta?
|
||||
NSAppKitVersionNumber10_14 = 1671;
|
||||
NSAppKitVersionNumber11_0 = 2022; // 2000 starts with beta?
|
||||
|
||||
|
||||
|
||||
|
@ -291,7 +291,12 @@ var
|
||||
lDialogView := NSView(ASaveOwner.contentView);
|
||||
if lDialogView <> nil then
|
||||
begin
|
||||
if lDialogView.frame.size.width > INT_MIN_ACCESSORYVIEW_WIDTH then
|
||||
if (NSAppkitVersionNumber >= NSAppKitVersionNumber11_0) then
|
||||
// starting with Big Sur, the dialog retains the last openned size
|
||||
// causing the width to be increased on every openning of the dialog
|
||||
// we'd simply force the lAccessoryWidth to start with the minimum width
|
||||
lAccessoryWidth := INT_MIN_ACCESSORYVIEW_WIDTH
|
||||
else if lDialogView.frame.size.width > INT_MIN_ACCESSORYVIEW_WIDTH then
|
||||
lAccessoryWidth := Round(lDialogView.frame.size.width);
|
||||
end;
|
||||
lRect := GetNSRect(0, 0, lAccessoryWidth, 30);
|
||||
|
Loading…
Reference in New Issue
Block a user