summaryrefslogtreecommitdiffstats
path: root/src/VButton.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2021-07-13 10:22:53 +0900
committerMichele Calgaro <[email protected]>2021-07-13 10:22:53 +0900
commitf519fe9ea297487d95da992a0a77a2ed3aad2cb0 (patch)
treef66a1ada251cd574c11a318d7edc35bf47abf84e /src/VButton.cpp
parent907f3d61aa5cefc1d3768535ef8b9d2ba6d73007 (diff)
downloadkvkbd-f519fe9ea297487d95da992a0a77a2ed3aad2cb0.tar.gz
kvkbd-f519fe9ea297487d95da992a0a77a2ed3aad2cb0.zip
Minor code rework for better consistency.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/VButton.cpp')
-rw-r--r--src/VButton.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/VButton.cpp b/src/VButton.cpp
index c0ce411..46e36ec 100644
--- a/src/VButton.cpp
+++ b/src/VButton.cpp
@@ -85,6 +85,12 @@ void VButton::setupTexts(Display *display)
{
altGrShiftText = c;
}
+
+ // caps + altGr text
+ capsAltGrText = altGrText.upper();
+
+ // caps + altGr + shift text
+ capsAltGrShiftText = altGrShiftText.lower();
}
void VButton::shiftCapsAltGrPressed(bool shift, bool caps, bool altGrState)
@@ -96,11 +102,11 @@ void VButton::shiftCapsAltGrPressed(bool shift, bool caps, bool altGrState)
{
if (shift)
{
- TQPushButton::setText(altGrShiftText.lower());
+ TQPushButton::setText(capsAltGrShiftText);
}
else
{
- TQPushButton::setText(altGrText.upper());
+ TQPushButton::setText(capsAltGrText);
}
}
else if (shift)