diff options
author | Michele Calgaro <[email protected]> | 2021-02-27 16:15:04 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2021-02-27 16:16:12 +0900 |
commit | d26a127b89bffffbec97c64a526fc0ceaad79855 (patch) | |
tree | 8cc08d05bd62a27094cec8f6ef88a51f61a5f325 /src | |
parent | 4918c52f39ab6459d1c48e9456a7fbd01a4e91f6 (diff) | |
download | kvkbd-d26a127b89bffffbec97c64a526fc0ceaad79855.tar.gz kvkbd-d26a127b89bffffbec97c64a526fc0ceaad79855.zip |
Simplified code for changing the keys color.
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit 94e4d4ddcda36d5a555894fd914579aed757dbf7)
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); } |