aboutsummaryrefslogtreecommitdiff
path: root/src/SearchBar.cpp
diff options
context:
space:
mode:
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 {