More fixes
This commit is contained in:
@@ -35,7 +35,8 @@ char KeyboardEntryActivity::getSelectedChar() const {
|
||||
if (selectedCol < 0 || selectedCol >= COLS) return '\0';
|
||||
|
||||
const KeyDef& key = layout[selectedRow][selectedCol];
|
||||
return (shiftState > 0 && key.secondary != '\0') ? key.secondary : key.primary;
|
||||
const bool useSecondary = !symMode && shiftState > 0 && key.secondary != '\0';
|
||||
return useSecondary ? key.secondary : key.primary;
|
||||
}
|
||||
|
||||
char KeyboardEntryActivity::getAlternativeChar() const {
|
||||
|
||||
@@ -56,7 +56,6 @@ class KeyboardEntryActivity : public Activity {
|
||||
static constexpr int COLS = 10;
|
||||
static constexpr int ABC_ROWS = 4;
|
||||
static constexpr int SYM_ROWS = 4;
|
||||
static constexpr int BOTTOM_KEY_COUNT = 5;
|
||||
|
||||
static constexpr KeyDef abcLayout[ABC_ROWS][COLS] = {
|
||||
{{'0', ')'},
|
||||
|
||||
@@ -800,7 +800,8 @@ void LyraTheme::drawKeyboardKey(const GfxRenderer& renderer, Rect rect, const ch
|
||||
const char* secondaryLabel, const KeyboardKeyType keyType) const {
|
||||
if (isSelected) {
|
||||
renderer.fillRoundedRect(rect.x, rect.y, rect.width, rect.height, cornerRadius, Color::Black);
|
||||
} else if (keyType == KeyboardKeyType::Shift || keyType == KeyboardKeyType::Mode || keyType == KeyboardKeyType::Del ||
|
||||
} else if (keyType == KeyboardKeyType::Shift || keyType == KeyboardKeyType::Mode ||
|
||||
keyType == KeyboardKeyType::Reveal || keyType == KeyboardKeyType::Del ||
|
||||
keyType == KeyboardKeyType::Space || keyType == KeyboardKeyType::Ok) {
|
||||
renderer.drawRoundedRect(rect.x, rect.y, rect.width, rect.height, 1, cornerRadius, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user