aboutsummaryrefslogtreecommitdiff
path: root/src/ChannelSidePanel.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-04-29 09:31:06 +0200
committerdec05eba <dec05eba@protonmail.com>2018-04-29 09:31:10 +0200
commite7caed2208893723181892d5e197b924311373fb (patch)
tree1a92cd65f23537eb57b4d80646e84bd359bc0ee2 /src/ChannelSidePanel.cpp
parentf90a5705bd65a4ebb5edc9df003a383039fec555 (diff)
Improve scaling, start implementing color scheme
Diffstat (limited to 'src/ChannelSidePanel.cpp')
-rw-r--r--src/ChannelSidePanel.cpp11
1 files changed, 6 insertions, 5 deletions
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 <SFML/Graphics/RectangleShape.hpp>
#include <SFML/Graphics/Text.hpp>
#include <vector>
@@ -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();
}
}