Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GTK4] Migrate deprecated FontChooser to FontDialog #1583

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ptziegler
Copy link
Contributor

This moves all native FontChooser bindings from the shared GTK to the GTK3 component and also defines new GTK4 bindings for the FontDialog API.

Note: The FontDialog doesn't seem to remember the initial font that is passed as an argument. This looks like a bug within GTK, given that the same behavior also happens for the FontDialogButton[1].

[1] - https://gitlab.gnome.org/GNOME/gtk/-/issues/6892

This adds a new AsyncReadyCallback class which is used to handle the
asynchronous execution of dialogs. The goal is provide a cleaner and
more readable interface than what is currently available by
SyncDialogUtil.

Note that this class currently simply wraps the call to SyncDialogUtil.
But once all of the remaining dialogs (Color/Font/MessageDialog) have
been migrated, it might make sense to remove this class entirely to
avoid this additional indirection.

Follow-up to 2e61b4b
This moves all native FontChooser bindings from the shared GTK to the
GTK3 component and also defines new GTK4 bindings for the FontDialog
API.

Note: The FontDialog doesn't seem to remember the initial font that is
passed as an argument. This looks like a bug within GTK, given that the
same behavior also happens for the FontDialogButton[1].

[1] - https://gitlab.gnome.org/GNOME/gtk/-/issues/6892
@ptziegler
Copy link
Contributor Author

In terms of appearance, both dialogs are pretty much identical, though I think the old one looks better...

GTK3:
image

GTK4:
image

Note that this PR currently depends on #1582 because I'm using the new AsyncReadyCallback class.

Copy link
Contributor

github-actions bot commented Nov 9, 2024

Test Results

   483 files  ±0     483 suites  ±0   7m 29s ⏱️ -23s
 4 095 tests ±0   4 085 ✅ ±0   7 💤 ±0  3 ❌ ±0 
16 173 runs  ±0  16 080 ✅ ±0  90 💤 ±0  3 ❌ ±0 

For more details on these failures, see this check.

Results for commit 7c29698. ± Comparison against base commit d30571a.

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.

1 participant