From f30e3d1e2ec038ca32df35f261cc2685ba4209b8 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 13 Jun 2021 07:44:17 +0200 Subject: misc cleanup --- include/RoundedRectangle.hpp | 2 -- src/QuickMedia.cpp | 2 +- src/SearchBar.cpp | 1 - src/Tabs.cpp | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/include/RoundedRectangle.hpp b/include/RoundedRectangle.hpp index 42ffbad..2106634 100644 --- a/include/RoundedRectangle.hpp +++ b/include/RoundedRectangle.hpp @@ -20,8 +20,6 @@ namespace QuickMedia { void set_band(sf::Vector2f pos, sf::Vector2f size); void set_band_color(sf::Color color); void draw(sf::RenderTarget &target); - - bool drop_shadow_enabled = true; private: float radius; sf::Vector2f pos; diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 2e2ad6d..1251663 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -3905,7 +3905,7 @@ namespace QuickMedia { captcha_sprite.setPosition(std::floor(content_size.x * 0.5f - image_size.x * 0.5f), std::floor(challenge_description_height + content_size.y * 0.5f - image_size.y * 0.5f)); window.draw(captcha_sprite); - challenge_description_text.setPosition(captcha_sprite.getPosition() + sf::Vector2f(image_size.x * 0.5f, 0.0f) - sf::Vector2f(challenge_description_text.getLocalBounds().width * 0.5f, challenge_description_height)); + challenge_description_text.setPosition(captcha_sprite.getPosition() + sf::Vector2f(std::floor(image_size.x * 0.5f), 0.0f) - sf::Vector2f(std::floor(challenge_description_text.getLocalBounds().width * 0.5f), challenge_description_height)); window.draw(challenge_description_text); for(size_t column = 0; column < captcha_num_columns; ++column) { diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp index cb168a9..3fd2296 100644 --- a/src/SearchBar.cpp +++ b/src/SearchBar.cpp @@ -42,7 +42,6 @@ namespace QuickMedia { pos(0.0f, 0.0f), prev_size(0.0f, 0.0f) { - //background.drop_shadow_enabled = false; padding_top = padding_top_default; padding_bottom = padding_bottom_default; text.setFillColor(text_placeholder_color); diff --git a/src/Tabs.cpp b/src/Tabs.cpp index 1224d81..b943615 100644 --- a/src/Tabs.cpp +++ b/src/Tabs.cpp @@ -26,7 +26,6 @@ namespace QuickMedia { } Tabs::Tabs(sf::Shader *rounded_rectangle_shader, sf::Color shade_color) : background(sf::Vector2f(1.0f, 1.0f), 10.0f, tab_selected_color, rounded_rectangle_shader), shade_color(shade_color) { - //background.drop_shadow_enabled = false; shade.setFillColor(shade_color); } -- cgit v1.2.3