From 9cde35c64c9f569055b101a80419d900f58806a9 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 3 May 2018 07:35:39 +0200 Subject: Adding theming, add new theme 'simple' --- src/Chatbar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Chatbar.cpp') 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)); -- cgit v1.2.3