aboutsummaryrefslogtreecommitdiff
path: root/src/gui/Button.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-07 21:27:36 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-07 21:27:36 +0200
commit1a49f86e9841035fe670f6b42a3c988f737267d2 (patch)
tree9059935a17d2599ae9f366975472314a9c89e052 /src/gui/Button.cpp
parentb709805cfac4d1fe1bfe28e497a3e48e224372a8 (diff)
Add settings icon, close window when pressing the close button
Diffstat (limited to 'src/gui/Button.cpp')
-rw-r--r--src/gui/Button.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/Button.cpp b/src/gui/Button.cpp
index d2c4a2c..e36d07b 100644
--- a/src/gui/Button.cpp
+++ b/src/gui/Button.cpp
@@ -46,7 +46,7 @@ namespace gsr {
const bool mouse_inside = mgl::FloatRect(draw_pos, item_size).contains(window.get_mouse_position().to_vec2f()) && !has_parent_with_selected_child_widget();
if(mouse_inside)
- draw_rectangle_outline(window, draw_pos, item_size, get_theme().tint_color, border_scale * get_theme().window_height);
+ draw_rectangle_outline(window, draw_pos, item_size, get_theme().tint_color, std::max(1.0f, border_scale * get_theme().window_height));
}
mgl::vec2f Button::get_size() {