aboutsummaryrefslogtreecommitdiff
path: root/src/SearchBar.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-12-09 19:45:19 +0100
committerdec05eba <dec05eba@protonmail.com>2019-12-09 19:45:19 +0100
commit5ef35784af24e5fcaa0f8570c23299d01b46412a (patch)
tree5c0a6c11743990975360518ebec32e8788e8edcc /src/SearchBar.cpp
parent5e29715201f3b67648728a0cd048fd1b3e1dbcf7 (diff)
Show title of posts on 4chan
Diffstat (limited to 'src/SearchBar.cpp')
-rw-r--r--src/SearchBar.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp
index 985f931..2008447 100644
--- a/src/SearchBar.cpp
+++ b/src/SearchBar.cpp
@@ -67,14 +67,15 @@ namespace QuickMedia {
draw_logo = false;
}
- float font_height = text.getLocalBounds().height + 8.0f;
+ float font_height = text.getLocalBounds().height + 12.0f;
float rect_height = std::floor(font_height + background_margin_vertical * 2.0f);
float offset_x = padding_horizontal;
if(draw_logo) {
+ float one_line_height = std::floor(text.getCharacterSize() + 8.0f + background_margin_vertical * 2.0f);
auto texture_size = plugin_logo_sprite.getTexture()->getSize();
sf::Vector2f texture_size_f(texture_size.x, texture_size.y);
- sf::Vector2f new_size = wrap_to_size(texture_size_f, sf::Vector2f(200.0f, text.getCharacterSize() + 8.0f));
+ sf::Vector2f new_size = wrap_to_size(texture_size_f, sf::Vector2f(200.0f, one_line_height));
plugin_logo_sprite.setScale(get_ratio(texture_size_f, new_size));
plugin_logo_sprite.setPosition(25.0f, padding_vertical);
offset_x = 25.0f + new_size.x + 25.0f;