doublecmd icon indicating copy to clipboard operation
doublecmd copied to clipboard

Wrong file mask in Search dialog

Open Andreas0602 opened this issue 1 year ago • 14 comments

Version

Double Commander Version: 1.2.0 alpha Revision: 11212 Commit: 3d3263897 Build date: 2024/01/28 Lazarus: 3.99.0.0 FPC: 3.2.2 Platform: aarch64-Darwin-cocoa OS version: Mac OS X 14.3.1

Description

When you follow the steps shown in the video below, the file mask field in the Search dialog will be drawn wrong.

https://github.com/doublecmd/doublecmd/assets/79788982/ff1cb7b7-456c-4c3f-a5dd-44eb49f65cb8

Andreas0602 avatar Feb 11 '24 21:02 Andreas0602

@Andreas0602

the issue cannot be reproduced on macOS 12.7 and macOS 13.6.

does it only appear on macOS 14?

can you test on other computers?

rich2014 avatar Feb 18 '24 16:02 rich2014

@rich2014, I tested it on my wife's Mac running macOS 14.2.1 and the issue didn't occur. I then upgraded my wife's Mac to macOS 14.3.1 and the issue still didn't occur. So, the problem doesn't seem to depend on the macOS version, but on the machine. I have no idea what could be wrong with my machine. One more info: On my machine, the issue still occurs after deleting the folder ~/Library/Preferences/doublecmd, i.e. when running DC with its default settings.

Andreas0602 avatar Feb 18 '24 19:02 Andreas0602

I've made a new video of the issue. Basically it's the same as the first video, with one new thing: At the end of the video, after the issue has occurred, I drag the left edge of the dialog to make it a bit wider, and then the issue disappears.

https://github.com/doublecmd/doublecmd/assets/79788982/1fbb690e-9dea-4412-8abf-c1f89cedb539

Andreas0602 avatar Feb 18 '24 19:02 Andreas0602

Making the dialog more narrow also makes the issue disappear. But only until the next restart of DC. Then the issue occurs again.

Andreas0602 avatar Feb 18 '24 19:02 Andreas0602

@Andreas0602

is this issue related to the initial width and height of the Dialog?

rich2014 avatar Feb 19 '24 14:02 rich2014

@alexx2000

Alex, do you have any ideas?

rich2014 avatar Feb 19 '24 14:02 rich2014

I was able to reproduce this problem some time ago. But I cannot reproduce it now. I don't know how TComboBox is implemented under LCL-COCOA. But looks like a TComboBox consists of two controls: edit field and combobox. And sometimes their position is not synchronized. We can see that manual window resize recalculates positions.

alexx2000 avatar Feb 19 '24 15:02 alexx2000

@rich2014

is this issue related to the initial width and height of the Dialog?

No, the initial width and height of the dialog are irrelevant.

Andreas0602 avatar Feb 19 '24 17:02 Andreas0602

@Andreas0602

have you set the fonts?

rich2014 avatar Feb 20 '24 16:02 rich2014

TComboBox corresponds one-to-one to NSComboBox in LCL- Cocoa.

however, in macOS itself, the internal implementation of NSComboBox does correspond to two controls, but this cannot be controlled by the APP.

I was able to reproduce this problem some time ago. But I cannot reproduce it now. I don't know how TComboBox is implemented under LCL-COCOA. But looks like a TComboBox consists of two controls: edit field and combobox. And sometimes their position is not synchronized. We can see that manual window resize recalculates positions.

rich2014 avatar Feb 20 '24 16:02 rich2014

@rich2014

have you set the fonts?

Yes, but changing the fonts doesn't help. For testing, I changed all fonts to Courier New, and the issue still occurred. By the way, after that change, the font in the dialog was still not Courier New, but some other, proportional font.

Also please note what I have already written:

the issue still occurs after deleting the folder ~/Library/Preferences/doublecmd, i.e. when running DC with its default settings.

Andreas0602 avatar Feb 20 '24 18:02 Andreas0602

Changing the screen resolution doesn't help either. (I have an Apple Studio display.)

Andreas0602 avatar Feb 20 '24 18:02 Andreas0602

In general, the spacing in this dialog doesn't look quite right. For example, in the screenshot below, there's not enough vertical space between "Search subdirectories" and "all (unlimited depth)".

Spacing

Andreas0602 avatar Feb 20 '24 18:02 Andreas0602

The "unpack files" dialog is not okay either. It has horizontal and vertical scrollbars. The screenshot below has been taken while DC was using its default settings.

unpack_files

Andreas0602 avatar Feb 23 '24 13:02 Andreas0602

The issue with the Search dialog is no longer reproducible with MacOS 14.6.1.

Andreas0602 avatar Aug 08 '24 10:08 Andreas0602