aboutsummaryrefslogtreecommitdiff
path: root/src/Chatbar.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-03 07:35:39 +0200
committerdec05eba <dec05eba@protonmail.com>2018-05-03 07:35:42 +0200
commit9cde35c64c9f569055b101a80419d900f58806a9 (patch)
treecc94d0b5e7dab9c95e702905e4d5fc42f0253103 /src/Chatbar.cpp
parent09080c571dbc959ab073aa6aa6598e6e447b0435 (diff)
Adding theming, add new theme 'simple'
Diffstat (limited to 'src/Chatbar.cpp')
-rw-r--r--src/Chatbar.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Chatbar.cpp b/src/Chatbar.cpp
index 7f50153..cd2daa4 100644
--- a/src/Chatbar.cpp
+++ b/src/Chatbar.cpp
@@ -277,18 +277,18 @@ namespace dchat
text.setCharacterSize(FONT_SIZE * Settings::getScaling());
const float fontHeight = text.getFont()->getLineSpacing(text.getCharacterSize());
- sf::RectangleShape lineShape(sf::Vector2f(floor(windowSize.x - ChannelSidePanel::getWidth() - UsersSidePanel::getWidth() - LINE_PADDING_SIDE * 2.0f), LINE_HEIGHT));
+ sf::RectangleShape lineShape(sf::Vector2f(floor(windowSize.x - ChannelSidePanel::getWidth() - UsersSidePanel::getWidth() - LINE_PADDING_SIDE * Settings::getScaling() * 2.0f), LINE_HEIGHT));
lineShape.setFillColor(ColorScheme::getBackgroundColor() + sf::Color(10, 10, 10));
- lineShape.setPosition(ChannelSidePanel::getWidth() + LINE_PADDING_SIDE, floor(windowSize.y - getHeight()));
+ lineShape.setPosition(ChannelSidePanel::getWidth() + LINE_PADDING_SIDE * Settings::getScaling(), floor(windowSize.y - getHeight()));
window.draw(lineShape);
- sf::Vector2f inputBackgroundSize(floor(windowSize.x - ChannelSidePanel::getWidth() - UsersSidePanel::getWidth() - PADDING_SIDE * 2.0f), floor(fontHeight * 1.7f + BOX_PADDING_Y * Settings::getScaling() * 2.0f));
+ sf::Vector2f inputBackgroundSize(floor(windowSize.x - ChannelSidePanel::getWidth() - UsersSidePanel::getWidth() - PADDING_SIDE * Settings::getScaling() * 2.0f), floor(fontHeight * 1.7f + BOX_PADDING_Y * Settings::getScaling() * 2.0f));
sf::Vector2f backgroundSize(floor(windowSize.x - ChannelSidePanel::getWidth() - UsersSidePanel::getWidth()), floor(getHeight() - LINE_HEIGHT));
background.setSize(backgroundSize);
background.setPosition(ChannelSidePanel::getWidth(), floor(windowSize.y - backgroundSize.y));
window.draw(background);
- sf::Vector2f inputBackgroundPos(floor(ChannelSidePanel::getWidth() + PADDING_SIDE), floor(windowSize.y - inputBackgroundSize.y - PADDING_BOTTOM * Settings::getScaling()));
+ sf::Vector2f inputBackgroundPos(floor(ChannelSidePanel::getWidth() + PADDING_SIDE * Settings::getScaling()), floor(windowSize.y - inputBackgroundSize.y - PADDING_BOTTOM * Settings::getScaling()));
inputBackground.setSize(inputBackgroundSize);
inputBackground.setPosition(inputBackgroundPos);
text.setPosition(floor(inputBackgroundPos.x + BOX_PADDING_X), floor(inputBackgroundPos.y + inputBackgroundSize.y * 0.5f - fontHeight * 0.5f));