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 port #284

Merged
merged 17 commits into from
Sep 17, 2023
Merged

Gtk4 port #284

merged 17 commits into from
Sep 17, 2023

Conversation

jwahlstrand
Copy link
Collaborator

@jwahlstrand jwahlstrand commented Jul 3, 2023

I think this is ready to be tried out. Tests pass for me.

Ran into a new bug related to getting the screen size from the default Gdk display.
screen_size() works early in the tests but fails later on. It looks like the
GListModel of monitors is being unreferenced somewhere, whereas it should be left
alone if we are respecting the introspection annotations (which it looks like we are).
seeing a freeze in the tests that needs looking into
@jwahlstrand
Copy link
Collaborator Author

Argh, sorry for triggering CI again -- I meant to add a [skip ci] to prevent that. I guess it's freezing because it's using the registered version of GtkObservables, which depends on Gtk (?)

I've made some progress on the port of GtkObservables -- scroll-zoom now works. The missing piece is simulating mouse events with keyboard modifiers, which we need for testing and precompiling. I may need to add GdkEvent support to Gtk4.

@timholy
Copy link
Member

timholy commented Jul 25, 2023

No worries. If there's any way that commit privileges here and in GtkObservables would help your work, just ask and it will be granted.

@jwahlstrand
Copy link
Collaborator Author

If there's any way that commit privileges here and in GtkObservables would help your work, just ask and it will be granted.

I'll take you up on that for GtkObservables. I'd like to run the CI tests for all platforms. It's working well for me locally now.

@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Patch coverage: 97.61% and project coverage change: +0.03% 🎉

Comparison is base (0087262) 84.72% compared to head (53774fa) 84.76%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #284      +/-   ##
==========================================
+ Coverage   84.72%   84.76%   +0.03%     
==========================================
  Files           6        6              
  Lines         838      840       +2     
==========================================
+ Hits          710      712       +2     
  Misses        128      128              
Files Changed Coverage Δ
src/link.jl 100.00% <ø> (ø)
src/ImageView.jl 89.79% <96.42%> (+0.08%) ⬆️
src/annotations.jl 75.34% <100.00%> (ø)
src/contrast_gui.jl 86.76% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/ImageView.jl Outdated Show resolved Hide resolved
When the canvas is put in a window such that it receives no allocated space, it is
never realized, and this causes everything to freeze. It would be good to solve
the underlying issue, but setting a small minimum size (10 by 10 pixels here) prevents
it from ever happening.
@jwahlstrand
Copy link
Collaborator Author

All tests now pass, including the ones that were commented out before. I am going through the README and trying everything to make sure things work as advertised. I'm seeing a few things I want to fix before this is merged.

@timholy
Copy link
Member

timholy commented Sep 12, 2023

I took a brief look and everything seems uncontroversial. You can merge whenever you feel comfortable. Many thanks, I've been moving my lab and its so kind for you to carry this forward!

@jwahlstrand
Copy link
Collaborator Author

Great, thanks! One pesky issue remains -- when you zoom in on the pointer (control-scroll), it doesn't stay centered on the pointer. It zooms in and out and stays in the same general region as the pointer, but it's not as nice as before, and I haven't figured out why. I will give it another try this weekend, but if I can't fix it I may just merge and we can figure it out later. I generally have more time on weekends for Julia BTW.

As someone who moved my lab a few years ago, I feel your pain!

@jwahlstrand jwahlstrand marked this pull request as ready for review September 17, 2023 22:37
@jwahlstrand
Copy link
Collaborator Author

I did fix the zooming bug I mentioned, which was in GtkObservables.

@jwahlstrand jwahlstrand merged commit b9c78e6 into JuliaImages:master Sep 17, 2023
17 checks passed
@ashwani-rathee
Copy link
Member

Amazing Job @jwahlstrand!!, Can you please make the new release?

@jwahlstrand
Copy link
Collaborator Author

Sure, 0.12.0 I guess? I'll have time to do it tomorrow morning.

@ashwani-rathee
Copy link
Member

Yep, 0.12.0 would work

@jwahlstrand jwahlstrand deleted the gtk4 branch October 5, 2023 01:19
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