-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
Add flip X and Flip Y, and Rotation (90, 180, 270) buttons to BaseTool #988
Conversation
hope this was the problem
This is a very nice addition and it seems very helpful! But I am not sure if this is the best way to implement it UI-wise. I am not sure if these options should be there. It might be a good idea to add a new "Brush settings" popup where these settings can be placed. This means that users will have to do more clicks in order to make these changes, but the UI will be more clean, tidy and simple. I fear that the current way may make the UI too bloated. For example, Krita has an "Edit brushes" button at the top of the UI. In Pixelorama, it could be placed in the Global Tool Options (next to mirror, pixel perfect and dynamics buttons). This could also help us in the long run if we decide to make the brush system even more powerful and configurable in the future. Even if we decide that they should remain as they are, I have some notes:
|
I think it's always best to reduce the number of clicks as much as possible, especially in art software, to keep the user in the creative flow.
|
i dont add txt to the Translations.pot bc not sure to understand and dont want to make mistake
back as before
I think the expand button works fine. We may need to reconsider the UI in the future if we add more options, but for now I think it should be fine. By the way, we have a custom As for the radio button, I don't really have a strong opinion. I feel like it makes more sense this way, but I'm not totally against your original implementation, so feel free to choose which implementation you prefer. |
I think as radio buttons seems to be more common we can keep them. |
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.
Okay, changes in the UI look good now I think! Left some nitpick comments about the code, and it should be good to get merged after that.
src/Autoload/Tools.gd
Outdated
@@ -1,6 +1,7 @@ | |||
extends Node | |||
|
|||
signal color_changed(color, button) | |||
signal flip_rotate(flip_x, flip_y, rotate_90, rotate_180, rotate_270) |
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.
The GDScript style guide recommends using past tense for signal names, so this should be flip_rotated
.
src/Tools/BaseDraw.tscn
Outdated
[node name="RotationOptions" type="VBoxContainer" parent="." index="2"] | ||
visible = false | ||
layout_mode = 2 | ||
theme = SubResource("Theme_i7q3e") |
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.
I think adding an entire theme just to remove the CollapsibleContainer's internal button decoration might be a bit overkill. Buttons have a flat
property that does exactly that. In the latest commit on the master branch, I added a flat
property in CollapsibleContainer that updates the flat
status of its internal button. I think this could be used instead of a theme.
signal color_changed(color: Color, button: int)
"signal flip_rotated(flip_x, flip_y, rotate_90, rotate_180, rotate_270) " was not t a conflict before , i dont know why sudenlly it is while nothing has changed in my code |
Nothing to worry about, it's because I made a change to the master branch and it happened to affect that specific line. I fixed the conflict now. |
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.
Should be good to get merged now. Excellent work, thank you very much!
This will be really useful for custom brushes. (rather than creating 8 different brushes, it will be just one) ^^