Skip to content

[Shape tools] Reorder toolbar items and hides stroke width and dash buttons when there is no stroke#2019

Merged
cameronwhite merged 7 commits intoPintaProject:masterfrom
pedropaulosuzuki:shape_stroke
Mar 5, 2026
Merged

[Shape tools] Reorder toolbar items and hides stroke width and dash buttons when there is no stroke#2019
cameronwhite merged 7 commits intoPintaProject:masterfrom
pedropaulosuzuki:shape_stroke

Conversation

@pedropaulosuzuki
Copy link
Contributor

@pedropaulosuzuki pedropaulosuzuki commented Mar 2, 2026

On shape tools, like the Rectangle, Rounded Rectangle, Ellipse and Freeform Shape, the "Brush width" parameter only changes the stroke size. Thus, this parameter, as well as the "Dash" parameter, are only applied when there is a stroke. This MR reorders these buttons to the end of the list and hides them when there is no stroke applied. Also renames "Brush width" to "Outline width" for clarity and consistency with the Text Tool.

Fixes #2012

Please squash the commits before merging

Probably would be better to create a setter instead of a raw method, but this works. Also, this should probably be refactored in the future anyway, as it's counterintuitive to work with, in comparison to other widgets.
@pedropaulosuzuki
Copy link
Contributor Author

pedropaulosuzuki commented Mar 2, 2026

Pending implementing the same changes to the Freeform Shape tool.

Edit: As the Freeform Shape tool inherits from BaseBrushTool, this would require a bigger refactor. Thus, I'm leaving it for a future MR.

Copy link
Member

@cameronwhite cameronwhite left a comment

Choose a reason for hiding this comment

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

Thanks! Trying it out, the rearrangement and hiding of the buttons feels good to me

@cameronwhite cameronwhite merged commit af7943f into PintaProject:master Mar 5, 2026
7 checks passed
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.

[Shape tools] Brush width should be hidden when Fill Style is set to "Fill Shape"

2 participants