diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-02-27 16:15:04 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-02-27 16:15:29 +0900 |
commit | 94e4d4ddcda36d5a555894fd914579aed757dbf7 (patch) | |
tree | 66cadfe9bd5b6c0fa06639289cf39c11634e21aa /src | |
parent | 64d40d992ecb290a7d395b14e5d3b81e4ed074d2 (diff) | |
download | kvkbd-94e4d4ddcda36d5a555894fd914579aed757dbf7.tar.gz kvkbd-94e4d4ddcda36d5a555894fd914579aed757dbf7.zip |
Simplified code for changing the keys color.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src')
-rw-r--r-- | src/VButton.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/VButton.cpp b/src/VButton.cpp index c5763ab..9dffe26 100644 --- a/src/VButton.cpp +++ b/src/VButton.cpp @@ -71,15 +71,9 @@ void VButton::setColor(const TQColor &color) // Need to set TQColorGroup::Button color as well, otherwise the actual // color of the key does not change until the next restart of the application. TQPalette plt = palette(); - TQColorGroup cg = plt.active(); - cg.setColor(TQColorGroup::Button, color); - plt.setActive(cg); - cg = plt.inactive(); - cg.setColor(TQColorGroup::Button, color); - plt.setInactive(cg); - cg = plt.disabled(); - cg.setColor(TQColorGroup::Button, color); - plt.setDisabled(cg); + plt.setColor(TQPalette::Active, TQColorGroup::Button, color); + plt.setColor(TQPalette::Inactive, TQColorGroup::Button, color); + plt.setColor(TQPalette::Disabled, TQColorGroup::Button, color); setPalette(plt); } |