diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-03-22 23:40:13 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-03-22 23:40:13 +0100 |
commit | fcc3bf3d503ccb8292bd211360a2acf9ad88ff88 (patch) | |
tree | 42f61c24cec92d06202acf2204542ebd96ce7161 /src/gui | |
parent | 2ec59c6812ef2112dde2a7ce8c068d0c8155ed06 (diff) |
Smaller screenshot icon
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/Button.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/Button.cpp b/src/gui/Button.cpp index 476e679..d8cb85b 100644 --- a/src/gui/Button.cpp +++ b/src/gui/Button.cpp @@ -105,6 +105,10 @@ namespace gsr { border_scale = scale; } + void Button::set_icon_padding_scale(float scale) { + icon_padding_scale = scale; + } + void Button::set_bg_hover_color(mgl::Color color) { bg_hover_color = color; } @@ -127,8 +131,8 @@ namespace gsr { const float widget_height = get_button_height(); - const int padding_icon_top = padding_top_icon_scale * widget_height; - const int padding_icon_bottom = padding_bottom_icon_scale * widget_height; + const int padding_icon_top = padding_top_icon_scale * icon_padding_scale * widget_height; + const int padding_icon_bottom = padding_bottom_icon_scale * icon_padding_scale * widget_height; const float desired_height = widget_height - (padding_icon_top + padding_icon_bottom); sprite.set_height((int)desired_height); |