From 26bef3aa4100ededb5bd5eae687f63cdf8ebaa8c Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 16 Nov 2022 17:33:45 +0000 Subject: [PATCH] added primary and secondary font colors --- src/bar/Bar.cpp | 2 +- src/config/ConfigManager.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bar/Bar.cpp b/src/bar/Bar.cpp index fdb0b1a..d51c5ca 100644 --- a/src/bar/Bar.cpp +++ b/src/bar/Bar.cpp @@ -551,7 +551,7 @@ int CStatusBar::drawWorkspacesModule(SBarModule* mod, int off) { drawCairoRectangle(Vector2D(off + m_vecSize.y * drawnWorkspaces, 0), Vector2D(m_vecSize.y, m_vecSize.y), WORKSPACE == MOUSEWORKSPACEID ? ConfigManager::getInt("bar:col.high") : ConfigManager::getInt("bar:col.bg")); drawText(Vector2D(off + m_vecSize.y * drawnWorkspaces + m_vecSize.y / 2.f - getTextWidth(workspaceName, ConfigManager::getString("bar:font.main"), ConfigManager::getFloat("bar:font.size")) / 2.f, getTextHalfY()), - workspaceName, WORKSPACE == MOUSEWORKSPACEID ? 0xFF111111 : 0xFFFFFFFF, ConfigManager::getString("bar:font.main"), ConfigManager::getFloat("bar:font.size")); + workspaceName, WORKSPACE == MOUSEWORKSPACEID ? ConfigManager::getInt("bar:col.font_secondary") : ConfigManager::getInt("bar:col.font_main"), ConfigManager::getString("bar:font.main"), ConfigManager::getFloat("bar:font.size")); drawnWorkspaces++; } diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index b574b34..18f209b 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -34,6 +34,8 @@ void ConfigManager::init() { configValues["bar:height"].intValue = 15; configValues["bar:col.bg"].intValue = 0xFF111111; configValues["bar:col.high"].intValue = 0xFFFF3333; + configValues["bar:col.font_main"].intValue = 0xFFFFFFFF; + configValues["bar:col.font_secondary"].intValue = 0xFF111111; configValues["bar:font.size"].floatValue = 12; configValues["bar:font.main"].strValue = "Noto Sans"; configValues["bar:font.secondary"].strValue = "Noto Sans";