-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Fix buttonset items' layout calculations and painting (fix #3554) #3565
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
Conversation
a56e5f0
to
0d98798
Compare
@Gasparoken Don't review this yet, because I will add some styles to make the buttonset a bit customizable. I will reassign you when done. |
94361dc
to
99d7531
Compare
I can see the difference in the 1pixel case, but I don't see any difference with the 16px brush. Also, I think that any even brush size is displayed the same as before. For the odd cases I will investigate a bit, but I would suggest comparing how all the other buttonset items look now. |
That's right. Without this patch, the last column of buttons in a buttonset are one pixel smaller in its width. Look at the 3 buttons after the lock in the original image you posted, the last one has a width 1 pixel smaller than the other two, which by the way have the same width that when using this patch. |
The one at the top looks better IMO...I think that I could try to make it look like that with a minor change. I will try it and let you know. |
…are not a multiple of the gui scale
…orrectly for big brushes As now the BrushType button has an odd number width (15px), it's better to limit the brush size to an odd number size (9px instead of 10px). In previous versions the BrushType button had an even number width (16px) so the 10px brush size was correctly centered.
The icon/stylus was inverted. We've also moved the icon for each state to the theme xml (so we don't need to use setIcon() manually anymore for this button).
…in tiles mode It was planned to use this color for this button when it's on.
Now these buttons look more like the previous version, where the special background color is painted to the edges. To achieve this the "buttonset_item_normal" part has less border to fill the background with "edit_pal_face" color in "pal_edit_button_unlock" and "edit_tiles_mode" styles.
…nsets We cannot use the fix from 6e2b44c as they contain different slice borders depending on the state (and that generated moving labels/icons in RGBA/Grayscale/Indexed buttons when we hover the mouse on them), so we had to revert it and use a new "buttonset_item_active" theme part to set the background of Edit Pal/Tiles.
We have to copy all missing <style> into the new theme, so these styles are re-loaded using colors and parts from the new theme (instead of using the data of the default theme).
6e1b3d8
to
0ae8bc9
Compare
Fixes several issues when displaying buttonsets. This required a few changes in the sheet.png file.
To verify the changes see:
Fix #3554