View Issue Details

IDProjectCategoryView StatusLast Update
0038121LazarusWidgetsetpublic2020-12-07 10:10
ReporterAndrea Mauri Assigned ToDmitry Boyarintsev  
Status closedResolutionfixed 
Product Version2.0.10 
Summary0038121: OpenDialog with filters is getting bigger and bigger [cocoa]
DescriptionI have an issue with TOpenDialog when I set the Filter property under cocoa.

If I set the filter option with my own filters every time I open the dialog it gets bigger and bigger, with no chance to resize it.

You can check it directly with Lazarus, just Click on 'File' --> 'Open' menu several times. The opendialog is getting bigger and bigger.

You can test also the attached project. (one button and one opendialog).

How can I fix it? There is a workaround? There is a file including the opendialog information that I can edit to restore original size?

I am using macOS Big Sur.
TagsNo tags attached.
Fixed in Revision64175
Attached Files


Andrea Mauri

2020-11-23 11:56


David Gray

2020-12-01 18:39

reporter   ~0127306

This also affects TOpenPictureDialog, which has image filters by default. On Big Sur.

It looks to me like the final preview box keeps increasing width, and the dialog just resizes to accommodate it.

There's an old post online about an OSX bug that makes a save dialog get taller by 22 pixels each time it's opened, maybe this is similar:

David Gray

2020-12-06 19:49

reporter   ~0127382

Can this issue be elevated please? There doesn't seem to be a limit to how wide the TOpenPictureDialog gets and it soon becomes multiple widths of the screen. My users reports having to drag it left multiple times to get to the Cancel and Ok buttons. It's a very bad user experience!

I confirm this only appears to be an issue in Big Sur. I also confirm the following is a temporary workaround for users:

In a terminal type:
defaults delete 'com.mycompany.My BundleID' NSNavPanelExpandedSizeForOpenMode

and this resets the OpenDialog and OpenPictureDialog to the default width. But it soon increases again...

Does anyone know how to do that programmatically? That would be a better workaround.

I spent some time looking through the code in CocoaWSDialog . CreateAccessoryView but it didn't seem like the issue was there and I couldn't figure out where it was.

Dmitry Boyarintsev

2020-12-07 01:01

developer   ~0127389

please test and close if ok

Andrea Mauri

2020-12-07 10:10

reporter   ~0127395

Tested on lazarus trunk (Lazarus 2.1.0 r64175 FPC 3.2.0 x86_64-darwin-cocoa).
It works.

Issue History

Date Modified Username Field Change
2020-11-23 11:56 Andrea Mauri New Issue
2020-11-23 11:56 Andrea Mauri File Added:
2020-11-24 21:36 Dmitry Boyarintsev Assigned To => Dmitry Boyarintsev
2020-11-24 21:36 Dmitry Boyarintsev Status new => assigned
2020-12-01 18:39 David Gray Note Added: 0127306
2020-12-06 19:49 David Gray Note Added: 0127382
2020-12-07 01:01 Dmitry Boyarintsev Status assigned => resolved
2020-12-07 01:01 Dmitry Boyarintsev Resolution open => fixed
2020-12-07 01:01 Dmitry Boyarintsev Fixed in Revision => 64175
2020-12-07 01:01 Dmitry Boyarintsev LazTarget => -
2020-12-07 01:01 Dmitry Boyarintsev Widgetset Cocoa => Cocoa
2020-12-07 01:01 Dmitry Boyarintsev Note Added: 0127389
2020-12-07 10:10 Andrea Mauri Status resolved => closed
2020-12-07 10:10 Andrea Mauri Note Added: 0127395