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

Fix LineEdit minimum width #45923

Merged
merged 1 commit into from
Feb 12, 2021

Conversation

reduz
Copy link
Member

@reduz reduz commented Feb 12, 2021

-Changed theme setting name to make more sense of what it does
-Reduced amount of minimum characters, so minimum size is smaller.

As a reference, small LineEdit properties now look fixed:
image

Supersedes #45922 (which should likely be reverted). Done on top of it, as tab changes were correct.

@@ -394,7 +394,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("clear_button_color", "LineEdit", control_font_color);
theme->set_color("clear_button_color_pressed", "LineEdit", control_font_pressed_color);

theme->set_constant("minimum_spaces", "LineEdit", 12 * scale);
theme->set_constant("minimum_character_width", "LineEdit", 4);
Copy link
Member Author

Choose a reason for hiding this comment

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

For reference, this is multiplied by the font, which is usually multiplied by the editor (or theme) scale, so multiplication for scale here was not needed.

scene/gui/line_edit.cpp Outdated Show resolved Hide resolved
@reduz
Copy link
Member Author

reduz commented Feb 12, 2021

@akien-mga ok should be good to merge once it passes CI.

-Changed theme setting name to make more sense of what it does
-Reduced amount of minimum characters, so minimum size is smaller.
@akien-mga
Copy link
Member

Force pushed a rebase for you.

@reduz
Copy link
Member Author

reduz commented Feb 12, 2021

ah I messed up, thanks!

@akien-mga akien-mga merged commit 45c6d3c into godotengine:master Feb 12, 2021
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants