aboutsummaryrefslogtreecommitdiff
path: root/src/SearchBar.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-21 03:49:17 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-21 03:49:17 +0200
commit40e0f8f5d8c3e480f01a2d71b6a493247adcb77f (patch)
treeccc3c0a7c82be8f5dbe86dfc712cce3da7e2ad59 /src/SearchBar.cpp
parent5c72463c029804c85479d2c4426397d932c88ee1 (diff)
Initial matrix support
Diffstat (limited to 'src/SearchBar.cpp')
-rw-r--r--src/SearchBar.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp
index 62a0196..f790de8 100644
--- a/src/SearchBar.cpp
+++ b/src/SearchBar.cpp
@@ -20,6 +20,7 @@ namespace QuickMedia {
onAutocompleteRequestCallback(nullptr),
text_autosearch_delay(0),
autocomplete_search_delay(0),
+ caret_visible(true),
text(placeholder, font, 18),
autocomplete_text("", font, 18),
placeholder_str(placeholder),
@@ -29,7 +30,6 @@ namespace QuickMedia {
draw_logo(false),
needs_update(true),
input_masked(input_masked),
- caret_visible(true),
vertical_pos(0.0f)
{
text.setFillColor(text_placeholder_color);
@@ -273,11 +273,12 @@ namespace QuickMedia {
}
float SearchBar::getBottom() const {
- return shade.getSize().y + background_shadow.getSize().y;
+ return getBottomWithoutShadow() + 5.0f;//background_shadow.getSize().y;
}
float SearchBar::getBottomWithoutShadow() const {
- return shade.getSize().y;
+ float font_height = text.getCharacterSize() + 7.0f;
+ return std::floor(font_height + background_margin_vertical * 2.0f) + padding_vertical + padding_vertical;
}
std::string SearchBar::get_text() const {