Skip to content

Use AdwWrapBox instead of FlowBox in ToolBoxWidget - #2266

Merged
cameronwhite merged 3 commits into
PintaProject:masterfrom
Tech-Tac:toolwrapbox
Aug 29, 2026
Merged

Use AdwWrapBox instead of FlowBox in ToolBoxWidget#2266
cameronwhite merged 3 commits into
PintaProject:masterfrom
Tech-Tac:toolwrapbox

Conversation

@Tech-Tac

Copy link
Copy Markdown
Contributor

Description of Changes

Use Adw.WrapBox instead of Gtk.FlowBox as the basis of ToolBoxWidget, this

Tool insertion order logic has been simplified though which may cause regressions, but the order seems the same as before with the default set of tools.

Checklist

@cameronwhite

Copy link
Copy Markdown
Member

Thanks for looking into this! I don't mind the more compact layout :)

allows for functional keyboard navigation in the tool box

How does the keyboard navigation work? I tried a few keypresses but didn't get anything to happen

the order seems the same as before with the default set of tools

This is probably just because the tools are registered in that same order, but if you install the demo extension (which has a custom variant of the Pencil tool) you can see the button being added at the end instead of at its requested location.

I think we'd want to keep supporting the same ordering as before if that's possible with this widget? In the long run we might want something like #1219 which requires even more control over the layout

@Tech-Tac

Copy link
Copy Markdown
Contributor Author

How does the keyboard navigation work? I tried a few keypresses but didn't get anything to happen

Using tab, where previously it would focus the FlowBoxChild and not the button which made it impossible to activate a tool with keyboard, now the focus goes through the buttons themselves which allows them to be pressed with enter.

Admittedly not very practical for a mouse painting program but might help accessibility somehow.

I think we'd want to keep supporting the same ordering as before if that's possible with this widget?

I will look into it, I think it can work.

@Tech-Tac

Copy link
Copy Markdown
Contributor Author

Check 6fa538b, I tested it with the demo add-in and it placed the new tool after paint bucket, as before.

@cameronwhite

Copy link
Copy Markdown
Member

Thanks, those changes look good 👍

@cameronwhite
cameronwhite merged commit b51b319 into PintaProject:master Aug 29, 2026
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