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

apprt/gtk: subscribe to AdwStyleManager::dark for ColorScheme #6007

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

tristan957
Copy link
Collaborator

No description provided.

@tristan957 tristan957 requested a review from jcollie February 26, 2025 18:13
@tristan957 tristan957 requested a review from a team as a code owner February 26, 2025 18:13
@tristan957
Copy link
Collaborator Author

I couldn't figure out how to get zig-gir variant to compile. Got a compilation error that notify wasn't a signal on adw.StyleManager

@tristan957
Copy link
Collaborator Author

tristan957 commented Feb 26, 2025

Oops I get it. notify is on gobject.Object. But still, the app has a c.GtkApplication pointer, so I'm not sure it is possible to convert that to an adw.Application pointer.

@jcollie
Copy link
Member

jcollie commented Feb 26, 2025

Will we get an initial notification at app startup, or only when the style changes?

@jcollie
Copy link
Member

jcollie commented Feb 26, 2025

Oops I get it. notify is on gobject.Object. But still, the app has a c.GtkApplication pointer, so I'm not sure it is possible to convert that to an adw.Application pointer.

Yeah until we're fully switched over you have to manually cast c.GtkApplication to gtk.Application, then you can use app.as(gobject.Object).

@tristan957
Copy link
Collaborator Author

Good question. Just if it changes. Seems like I need to do the equivalent of the dbus code. One sec.

@tristan957
Copy link
Collaborator Author

Oops I get it. notify is on gobject.Object. But still, the app has a c.GtkApplication pointer, so I'm not sure it is possible to convert that to an adw.Application pointer.

Yeah until we're fully switched over you have to manually cast c.GtkApplication to gtk.Application, then you can use app.as(gobject.Object).

Would you like me to use zig-gir code in this PR?

@jcollie
Copy link
Member

jcollie commented Feb 26, 2025

Would you like me to use zig-gir code in this PR?

I think that we probably should.

@pluiedev pluiedev merged commit 12ba5d8 into ghostty-org:main Feb 26, 2025
29 checks passed
@github-actions github-actions bot added this to the 1.2.0 milestone Feb 26, 2025
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.

3 participants