diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-10-16 02:35:49 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-10-16 02:35:49 +0200 |
commit | 8574d6c7da09f5d5929df8ff8c35cb4d82389459 (patch) | |
tree | 0ff6f173a199db293a1223a6efb3f21dc188a3ef /src/gui | |
parent | c35d035e22822515545edc2587d0d29871fad01c (diff) |
Scale roundness with dpi, use XGetDefault instead of x db
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/Button.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/Button.cpp b/src/gui/Button.cpp index 63850d5..e44843d 100644 --- a/src/gui/Button.cpp +++ b/src/gui/Button.cpp @@ -1,5 +1,6 @@ #include "../../include/gui/Button.hpp" #include "../../include/Theme.hpp" +#include "../../include/Config.hpp" #include <SFML/Graphics/RenderTarget.hpp> #include <SFML/Window/Event.hpp> #include <cmath> @@ -9,7 +10,7 @@ namespace QuickMedia { Button::Button(const std::string &label, sf::Font *font, unsigned int character_size, float width, sf::Shader *rounded_rectangle_shader, float scale) : label(label, *font, character_size * scale), - background(sf::Vector2f(1.0f, 1.0f), 10.0f, get_theme().shade_color, rounded_rectangle_shader), + background(sf::Vector2f(1.0f, 1.0f), 10.0f * get_config().scale, get_theme().shade_color, rounded_rectangle_shader), scale(scale) { background.set_size(sf::Vector2f(std::floor(width * scale), get_height())); |