From 84d0d0e63d8e46187f81fdbd241062f942f5e54f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 9 Dec 2013 19:30:29 +0300 Subject: Add text colors for job bar. New theme colors: JOB_BAR, JOB_BAR_OUTLINE --- src/gui/theme.cpp | 4 +++- src/gui/theme.h | 2 ++ src/gui/windows/ministatuswindow.cpp | 2 +- src/gui/windows/statuswindow.cpp | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 281f5b37f..b7510dc9f 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -968,7 +968,9 @@ static int readColorType(const std::string &type) "ARROWS_BAR", "ARROWS_BAR_OUTLINE", "STATUS_BAR", - "STATUS_BAR_OUTLINE" + "STATUS_BAR_OUTLINE", + "JOB_BAR", + "JOB_BAR_OUTLINE" }; if (type.empty()) diff --git a/src/gui/theme.h b/src/gui/theme.h index 9e022dfcb..049e7e04b 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -412,6 +412,8 @@ class Theme final : public Palette, public ConfigListener ARROWS_BAR_OUTLINE, STATUS_BAR, STATUS_BAR_OUTLINE, + JOB_BAR, + JOB_BAR_OUTLINE, THEME_COLORS_END }; diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index fb1805f22..412b1b730 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -112,7 +112,7 @@ MiniStatusWindow::MiniStatusWindow() : if (job) { - mJobBar = createBar(0, 100, 0, Theme::PROGRESS_BAR, Theme::PROG_JOB, + mJobBar = createBar(0, 100, 0, Theme::JOB_BAR, Theme::PROG_JOB, // TRANSLATORS: status bar name "job bar", _("job bar")); StatusWindow::updateJobBar(mJobBar); diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 2f3d5f1e0..e08483f5d 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -255,6 +255,8 @@ StatusWindow::StatusWindow() : // TRANSLATORS: status window label mJobLabel = new Label(this, _("Job:")); mJobBar = new ProgressBar(this, 0.0F, 80, 0, Theme::PROG_JOB); + mJobBar->setColor(Theme::getThemeColor(Theme::JOB_BAR), + Theme::getThemeColor(Theme::JOB_BAR_OUTLINE)); place(3, 0, mJobLvlLabel, 3); place(5, 2, mJobLabel).setPadding(3); -- cgit v1.2.3-70-g09d2