From e7caed2208893723181892d5e197b924311373fb Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 29 Apr 2018 09:31:06 +0200 Subject: Improve scaling, start implementing color scheme --- src/ChannelSidePanel.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/ChannelSidePanel.cpp') diff --git a/src/ChannelSidePanel.cpp b/src/ChannelSidePanel.cpp index 18b581c..cbda247 100644 --- a/src/ChannelSidePanel.cpp +++ b/src/ChannelSidePanel.cpp @@ -3,6 +3,7 @@ #include "../include/ResourceCache.hpp" #include "../include/Settings.hpp" #include "../include/Channel.hpp" +#include "../include/ColorScheme.hpp" #include #include #include @@ -32,9 +33,9 @@ namespace dchat { float posY = ChannelTopPanel::getHeight(); auto windowSize = window.getSize(); - sf::RectangleShape rect(sf::Vector2f(WIDTH, windowSize.y)); + sf::RectangleShape rect(sf::Vector2f(getWidth(), windowSize.y)); rect.setPosition(0.0f, posY); - rect.setFillColor(sf::Color(35, 35, 35)); + rect.setFillColor(ColorScheme::getPanelColor()); window.draw(rect); //posY += 10.0f; @@ -48,8 +49,8 @@ namespace dchat { if(channel == Channel::getCurrent()) { - rect.setFillColor(sf::Color(50, 50, 50)); - rect.setSize(sf::Vector2f(WIDTH, channelBoxHeight)); + rect.setFillColor(ColorScheme::getPanelColor() + sf::Color(15, 15, 15)); + rect.setSize(sf::Vector2f(getWidth(), channelBoxHeight)); rect.setPosition(sf::Vector2f(0.0f, position.y)); window.draw(rect); } @@ -66,6 +67,6 @@ namespace dchat float ChannelSidePanel::getWidth() { - return WIDTH; + return WIDTH * Settings::getScaling(); } } -- cgit v1.2.3