Minor code rework for better consistency.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/16/head
Michele Calgaro 3 years ago
parent 907f3d61aa
commit f519fe9ea2
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -85,6 +85,12 @@ void VButton::setupTexts(Display *display)
{ {
altGrShiftText = c; altGrShiftText = c;
} }
// caps + altGr text
capsAltGrText = altGrText.upper();
// caps + altGr + shift text
capsAltGrShiftText = altGrShiftText.lower();
} }
void VButton::shiftCapsAltGrPressed(bool shift, bool caps, bool altGrState) void VButton::shiftCapsAltGrPressed(bool shift, bool caps, bool altGrState)
@ -96,11 +102,11 @@ void VButton::shiftCapsAltGrPressed(bool shift, bool caps, bool altGrState)
{ {
if (shift) if (shift)
{ {
TQPushButton::setText(altGrShiftText.lower()); TQPushButton::setText(capsAltGrShiftText);
} }
else else
{ {
TQPushButton::setText(altGrText.upper()); TQPushButton::setText(capsAltGrText);
} }
} }
else if (shift) else if (shift)

@ -32,10 +32,12 @@ protected:
bool isAlpha; bool isAlpha;
unsigned int keycode; unsigned int keycode;
TQString normalText; TQString normalText;
TQString capsText;
TQString shiftText; TQString shiftText;
TQString altGrText; TQString capsText;
TQString capsShiftText; TQString capsShiftText;
TQString capsAltGrText;
TQString capsAltGrShiftText;
TQString altGrText;
TQString altGrShiftText; TQString altGrShiftText;
TQRect orig_size; TQRect orig_size;

Loading…
Cancel
Save