Skip to content
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

Text/icons are slightly moved when hovering buttons if Draw Extra Borders editor setting is enabled #88644

Closed
Calinou opened this issue Feb 21, 2024 · 1 comment · Fixed by #88652

Comments

@Calinou
Copy link
Member

Calinou commented Feb 21, 2024

Tested versions

  • Reproducible in: 4.3.dev 652438a
  • Not reproducible in: 4.2.1.stable, 4.3.dev 8f0c20e

System information

Godot v4.3.dev (652438a) - Fedora Linux 39 (KDE Plasma) - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (nvidia; 545.29.06) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)

Issue description

Text/icons are slightly moved when hovering buttons if Draw Extra Borders editor setting is enabled. This editor setting is automatically enabled by the Black (OLED) editor theme preset, but you can also enable it separately.

This is likely a regression from #86378. cc @RobProductions

Draw Extra Borders disabled

simplescreenrecorder-2024-02-21_19.35.23.mp4

Draw Extra Borders enabled

simplescreenrecorder-2024-02-21_19.35.01.mp4

Steps to reproduce

  • Switch to the Black (OLED) editor theme preset or enable the Draw Extra Borders editor setting.
  • Hover the MenuButtons at the top-left corner of the editor.

Minimal reproduction project (MRP)

N/A

@RobProductions
Copy link
Contributor

RobProductions commented Feb 21, 2024

Whoops, apologies for missing the extra borders setting. Is this a result of mismatch in border width between the "hover" and "non-hovered" styleboxes as set here? Or is it possible some other margin/alignment variable wasn't defined right for the new styles? I can do some experiments later today to narrow it down and will try to whip up a fix unless someone else spots the issue first

Update: It's definitely margin related and after a test I was able to get it back to normal by mimicking this:

style_flat_button->set_content_margin((Side)i, p_config.button_style->get_margin((Side)i) + p_config.button_style->get_border_width((Side)i));

for the new styleboxes as well. Will have a PR up shortly, thanks for catching this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants