Closed CodedOre closed 2 years ago
Of those, maximising seems to be the worst case. Opening the inspector is a "well, if you're going to play with the inspector then we presume you know what you're doing" moment!
Is there not a work-around? Maybe detecting maximising and re-trigger a layout/recalculate? I'm just thinking that our current image size calculation is⦠ugly. But you had the Twitter-style three image layouts working with the constraint layout.
What I was thinking about was to throw out Gtk.ConstraintLayout
and replace it with an Gtk.BinLayout
(the layout manager used by Gtk.Overlay
) and then putting the UI over the image in a Gtk.Box
. Done something similar in UserCard
, which at first also used constraints.
The main issue is input. When I experimented with this before a click would only activate the top-most child of the bin layout, but we need to allow input on the lower widgets as well (for now only to hide the UI, but later also for zooming controls). It's probably only a case of setting the right property to allow this, but I haven't taken the time to look into this in detail as of now.
Turns out I missed the simple solution: halign
and valign
...
So, I moved MediaDisplay
to Gtk.BinLayout
, so closing this.
Ah, yeah, that makes more sense π Because you mentioned constraint layouts then I assumed it was for the 1-4 images on a tweet in the timeline π
As of now,
MediaDisplay
is build with anGtk.ConstraintLayout
, which allows for great flexibility in how the UI is build.However, this specific layout also "forgets" it minimum size sometimes, resulting in an window that can't be made small again.
For this reason I think we should look into how we could replace this layout manager with an more conventional one.