Skip to content

Reimplement toolbar with regular boxes and buttons#166

Merged
mvo5 merged 1 commit intomvo5:masterfrom
andy128k:toolbar
Feb 28, 2026
Merged

Reimplement toolbar with regular boxes and buttons#166
mvo5 merged 1 commit intomvo5:masterfrom
andy128k:toolbar

Conversation

@andy128k
Copy link
Contributor

GtkToolbar and its family does not exist in Gtk4, hence the change.

This PR is a continuation of #164 and includes those changes too.

@mvo5
Copy link
Owner

mvo5 commented Jan 26, 2026

I merged your other PR, can you please rebase ?

@andy128k
Copy link
Contributor Author

@mvo5 ping

Copy link
Owner

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks you! Sorry for the long delay. I will merge but one quick question about the primary-toolbar style change

</packing>
</child>
<style>
<class name="primary-toolbar"/>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a silly question(sorry!) but should we keep the primary-toolbar style here? Or is there a deeper reason for removing it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, no specific reasoning. My goal is to port the app to Gtk4 where this class is absent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just checked one more time. This class sets -gtk-icon-shadow: none; in Adwaita theme. Which is just a default value. So, there is no visible effect of this class.

}
g_list_free(box_children);

cb(box, image, label);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm overthinking it, but should we either here or in the callback ensure that image, label is not a nullptr? But its probably fine as gtk_widget_show() is robust against nullptr so fine I guess :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally yes, but these buttons are predefined in ui file and all have nested image and label.

@mvo5 mvo5 merged commit f30169b into mvo5:master Feb 28, 2026
1 check passed
@andy128k andy128k deleted the toolbar branch February 28, 2026 23:40
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.

2 participants