aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-30 09:24:54 +0200
committerdec05eba <dec05eba@protonmail.com>2018-05-30 09:24:57 +0200
commit551fa4d1e90d8f197bfd2ef6f06f933592dd2450 (patch)
tree51d2bc01142e9a230062150e36f3ec029b567a74
parent4aecbda252b71eff9480d73fd8ec5100819da63b (diff)
Change top and side panel font size
-rw-r--r--src/ChannelTopPanel.cpp5
-rw-r--r--src/UsersSidePanel.cpp2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/ChannelTopPanel.cpp b/src/ChannelTopPanel.cpp
index 541d333..df69a17 100644
--- a/src/ChannelTopPanel.cpp
+++ b/src/ChannelTopPanel.cpp
@@ -16,9 +16,9 @@ namespace dchat
sf::Color sideColor, centerColor;
};
- const float FONT_SIZE = 40.0f;
+ const float FONT_SIZE = 30.0f;
const float BOTTOM_LINE_HEIGHT = 2.0f;
- const float PADDING_TOP = 20.0f;
+ const float PADDING_TOP = 15.0f;
const float PADDING_BOTTOM = PADDING_TOP;
const float PADDING_SIDE = 20.0f;
@@ -67,7 +67,6 @@ namespace dchat
str += sf::String::fromUtf8(currentChannel->getName().begin(), currentChannel->getName().end());
float fontSize = FONT_SIZE * Settings::getScaling();
sf::Text text(str, *ResourceCache::getFont("fonts/Nunito-Regular.ttf"), fontSize);
- auto textBounds = text.getLocalBounds();
text.setPosition(floor(ChannelSidePanel::getWidth() + PADDING_SIDE * Settings::getScaling()), PADDING_TOP);
text.setFillColor(ColorScheme::getTextRegularColor());
window.draw(text);
diff --git a/src/UsersSidePanel.cpp b/src/UsersSidePanel.cpp
index dcfd1dd..3e078cd 100644
--- a/src/UsersSidePanel.cpp
+++ b/src/UsersSidePanel.cpp
@@ -109,7 +109,7 @@ namespace dchat
// TODO: Remove this shit
sf::String str = "Online - ";
str += to_string(numOnlineUsers);
- sf::Text text(str, *font, textHeight * 1.0f);
+ sf::Text text(str, *font, FONT_SIZE * Settings::getScaling());
text.setPosition(position);
text.setFillColor(ColorScheme::getTextRegularColor() * sf::Color(255, 255, 255, 100));
window.draw(text);