-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Port to GTK4 #542
Port to GTK4 #542
Conversation
1d9d476
to
c782dac
Compare
Something I was thinking about is if we should take this opportunity to only port things one at a time as we need them and rethink some old APIs. Some of the old APIs make it a pain to assign actions to widgets. For example, I really hate the Welcome page API. I also wonder if ModeButton can't be replaced with a style class for Gtk.RadioButton? |
@danrabbit Do as you wish 🙂 I'm just doing a naive port for now and trying to keep the API as consistent as possible. I'm most of the way through now, so I've already sunk the effort on porting stuff that may get thrown away later, which is fine as we can at least mark it as deprecated for a while first. I already threw out a bunch of stuff that was already marked as deprecated. As for fixing API, that's fine too. I'm just trying to get the thing to build and be mostly feature complete. We don't have to offer any guarantees of API stability just yet. |
Greetings @davidmhewitt! I see that there will be api changes, like for example the Welcome widget. I got a bit excited so I tried to make a proposal for the new welcome api, which I think is much simpler and more spot-on. Feel free to tell me what you think :). This is the link https://github.com/ZenitsuDev/new-welcome-design-proposal |
@danrabbit This should now happily install alongside the existing version of Granite. If you're happy with how this currently is (missing widgets and known regressions as above), then I would suggest merging this into the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do it! 🚀
Opening for visibility. Not even close to finished or working.
This currently targets a
granite-7
branch which just tracksmaster
for now. Once we're happy with this, we can set up packaging correctly and have two versions of Granite install alongside each other so apps can target either while they're porting to GTK4.Things to port:
DatePicker
ModeButton
ModeSwitch
SwitchModelButton
TimePicker
ValidatedEntry
HyperTextView
Dialog
MessageDialog
DynamicNotebook
(could in theory be deprecated and replaced by the Hdy widget?)OverlayBar
SourceList
StorageBar
WelcomeView
SeekBar
AsyncImage
Known Regressions:
DatePicker
andTimePicker
popovers don't work because you can't (easily?) attach a popover to aGtk.Entry
SwitchModelButton
Granite.Widgets.Utils.set_color_primary
HeaderLabel
was dropped asGtkLabel
is sealed, so it's not easy to subclass, so we have all these labels we now have to add the extra properties and style classes too, is there an alternative?HyperTextView
doesn't always reliably detect CTRL key press, haven't tested this onmaster
to see if this is actually a regressionHyperTextView
no longer spawns error dialog as I haven't portedMessageDialog
yet.MessageDialog
is commented out for now, should this be done in the stylesheet?get_parent ().get_parent ().get_parent ()
inDynamicNotebook
DynamicNotebook
for nowDynamicNotebook
may be broken in many ways