Skip to content

Keep file dialogs within the app window - #39

Draft
yashranaway wants to merge 1 commit into
omacom:masterfrom
yashranaway:fix/high-dpi-file-dialog
Draft

Keep file dialogs within the app window#39
yashranaway wants to merge 1 commit into
omacom:masterfrom
yashranaway:fix/high-dpi-file-dialog

Conversation

@yashranaway

Copy link
Copy Markdown

<<<< AI wording below >>>>

Problem

Under the GTK platform theme, Qt Quick Dialogs uses a native GTK file chooser. On a 2x Wayland display, that chooser can restore a 1231x903 GTK geometry and open beyond the 1280x832 logical work area.

Reported in omacom/omarchy#9046.

Fix

Force Omawrite Open and Save dialogs to use Qt Quick Dialogs built-in implementation. Its Material dialog has a 600x400 logical default and stays inside the application window instead of restoring GTK window geometry.

Add object names and a unit check that both dialogs set DontUseNativeDialog.

Verification

  • git diff --check
  • Compared the dialog behavior with the Qt 6.11.2 FileDialog documentation and Material implementation
  • Added usesQuickFileDialogs coverage
  • The test suite was not run because this environment lacks qmake and Qt development packages
  • Live verification on the reported 2x display is still needed

@yuzuwoeser

Copy link
Copy Markdown

I reproduced this outside Omawrite with a standalone GTK 3 file chooser. GTK converts an already-computed CSS pixel font size by resolution / 72 a second time. That produces the 1203×902 default; removing the leftover conversion gives 880×660, and Omawrite's Qt+GTK path drops from 1231×950 to 908×707.

DontUseNativeDialog bypasses the faulty GTK path by replacing the native picker, so it should not be merged as the fix for this issue. A focused GTK fix is prepared and locally verified against GTK issue #4891. Please close this PR; I’ll link the upstream MR after it is submitted.

@yuzuwoeser

Copy link
Copy Markdown

The upstream GTK fix is now available as GNOME/gtk!10311, with its full CI pipeline passing. The recommendation to close this draft in favor of addressing the GTK root cause is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants