From 40e0f8f5d8c3e480f01a2d71b6a493247adcb77f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 21 Sep 2020 03:49:17 +0200 Subject: Initial matrix support --- src/SearchBar.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/SearchBar.cpp') 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 { -- cgit v1.2.3