summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/tabs/tab.cpp5
-rw-r--r--src/gui/widgets/tabs/tab.h7
2 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index 5a4b4f5dc..26f58e83b 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -234,7 +234,9 @@ void Tab::draw(Graphics *graphics)
mode = TAB_HIGHLIGHTED;
}
- if (labelMode != mLabelMode)
+ // mRedraw need here because no other way to say label to change color
+ // +++ text from label must be moved to tab itself
+ if (labelMode != mLabelMode && mRedraw)
{
mLabelMode = labelMode;
switch (labelMode)
@@ -409,6 +411,7 @@ void Tab::setLabelFont(Font *const font)
mLabel->setFont(font);
mLabel->adjustSize();
adjustSize();
+ mRedraw = true;
}
diff --git a/src/gui/widgets/tabs/tab.h b/src/gui/widgets/tabs/tab.h
index f4644df08..1bc225ee1 100644
--- a/src/gui/widgets/tabs/tab.h
+++ b/src/gui/widgets/tabs/tab.h
@@ -121,7 +121,8 @@ class Tab notfinal : public BasicContainer,
{
mTabColor = color1;
mTabOutlineColor = color2;
- }
+ mRedraw = true;
+ }
/**
* Set the highlighted color for the tab's text.
@@ -131,6 +132,7 @@ class Tab notfinal : public BasicContainer,
{
mTabHighlightedColor = color1;
mTabHighlightedOutlineColor = color2;
+ mRedraw = true;
}
/**
@@ -141,6 +143,7 @@ class Tab notfinal : public BasicContainer,
{
mTabSelectedColor = color1;
mTabSelectedOutlineColor = color2;
+ mRedraw = true;
}
/**
@@ -151,6 +154,7 @@ class Tab notfinal : public BasicContainer,
{
mFlashColor = color1;
mFlashOutlineColor = color2;
+ mRedraw = true;
}
/**
@@ -161,6 +165,7 @@ class Tab notfinal : public BasicContainer,
{
mPlayerFlashColor = color1;
mPlayerFlashOutlineColor = color2;
+ mRedraw = true;
}
/**