Skip to content

Commit

Permalink
Make enter key bigger font
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone committed Mar 19, 2024
1 parent dd7fa00 commit f8a1697
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions app/src/main/java/rs/ruffle/Keyboard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.RectangleShape
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.em
import rs.ruffle.ui.theme.RuffleTheme

val BUTTON_ROWS = arrayOf(
Expand Down Expand Up @@ -77,7 +79,7 @@ val BUTTON_ROWS = arrayOf(
KeyboardButton(keyCode = 66, keyChar = 'b', text = "B"),
KeyboardButton(keyCode = 78, keyChar = 'n', text = "N"),
KeyboardButton(keyCode = 77, keyChar = 'm', text = "M"),
KeyboardButton(keyCode = 13, keyChar = '\u000D', text = "")
KeyboardButton(keyCode = 13, keyChar = '\u000D', text = "", size = 5.em)
),
arrayOf(
KeyboardButton(keyCode = 17, text = "CTRL"),
Expand All @@ -102,10 +104,11 @@ data class KeyboardButton(
val keyCode: Byte,
val keyChar: Char = '\u0000',
val text: String = keyChar.toString(),
val icon: ImageVector? = null
val icon: ImageVector? = null,
val size: TextUnit = TextUnit.Unspecified
)

class ContextMenuItem(
data class ContextMenuItem(
val text: String,
val separatorBefore: Boolean,
val enabled: Boolean,
Expand Down Expand Up @@ -237,7 +240,10 @@ fun TextButton(
if (button.icon != null) {
Icon(button.icon, contentDescription = button.text)
} else {
Text(text = button.text)
Text(
text = button.text,
fontSize = button.size
)
}
}
}
Expand Down

0 comments on commit f8a1697

Please sign in to comment.