aboutsummaryrefslogtreecommitdiff
path: root/src/gui/Entry.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-06 08:22:42 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-06 08:22:42 +0200
commit520c61ec64c001d2c9c9d953051aa58715831731 (patch)
tree2c0e10995d1a85374f628e78a53321f727013bf3 /src/gui/Entry.cpp
parent9b6033e2b97f6f572cb69a393d4d1d1ea41b5d72 (diff)
Add checkbox, scale more sizes by window scale
Diffstat (limited to 'src/gui/Entry.cpp')
-rw-r--r--src/gui/Entry.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/Entry.cpp b/src/gui/Entry.cpp
index bf0f1ad..a8a521b 100644
--- a/src/gui/Entry.cpp
+++ b/src/gui/Entry.cpp
@@ -13,6 +13,7 @@ namespace gsr {
static const float padding_bottom = 10.0f;
static const float padding_left = 10.0f;
static const float padding_right = 10.0f;
+ static const float border_scale = 0.0015f;
Entry::Entry(mgl::Font *font, const char *text, float max_width) : text("", *font), max_width(max_width) {
this->text.set_color(get_theme().text_color);
@@ -46,7 +47,7 @@ namespace gsr {
window.draw(background);
if(selected) {
- const int border_size = 3;
+ const int border_size = border_scale * gsr::get_theme().window_height;
draw_rectangle_outline(window, draw_pos.floor(), get_size().floor(), get_theme().tint_color, border_size);
const int caret_width = 2;