mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 00:35:26 +02:00
fix: Fix size
Signed-off-by: Myzel394 <50424412+Myzel394@users.noreply.github.com>
This commit is contained in:
parent
5a694ea5c8
commit
305744f9d5
@ -97,7 +97,7 @@ internal fun DefaultKeyboard(
|
|||||||
) {
|
) {
|
||||||
val fractionalIcon = remember(fractional) { if (fractional == Token.PERIOD) IconPack.Dot else IconPack.Comma }
|
val fractionalIcon = remember(fractional) { if (fractional == Token.PERIOD) IconPack.Dot else IconPack.Comma }
|
||||||
val fractionalIconDescription = remember(fractional) { if (fractional == Token.PERIOD) R.string.keyboard_dot else R.string.comma }
|
val fractionalIconDescription = remember(fractional) { if (fractional == Token.PERIOD) R.string.keyboard_dot else R.string.comma }
|
||||||
val height: Float =
|
val contentHeight: Float =
|
||||||
if (LocalWindowSize.current.heightSizeClass < WindowHeightSizeClass.Medium) KeyboardButtonToken.CONTENT_HEIGHT_SHORT else KeyboardButtonToken.CONTENT_HEIGHT_TALL
|
if (LocalWindowSize.current.heightSizeClass < WindowHeightSizeClass.Medium) KeyboardButtonToken.CONTENT_HEIGHT_SHORT else KeyboardButtonToken.CONTENT_HEIGHT_TALL
|
||||||
|
|
||||||
KeypadFlow(
|
KeypadFlow(
|
||||||
@ -114,114 +114,114 @@ internal fun DefaultKeyboard(
|
|||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Clear,
|
IconPack.Clear,
|
||||||
stringResource(R.string.delete_label),
|
stringResource(R.string.delete_label),
|
||||||
height,
|
contentHeight,
|
||||||
) { clearInput() }
|
) { clearInput() }
|
||||||
KeyboardButtonFilled(
|
KeyboardButtonFilled(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Brackets,
|
IconPack.Brackets,
|
||||||
stringResource(R.string.keyboard_brackets),
|
stringResource(R.string.keyboard_brackets),
|
||||||
height,
|
contentHeight,
|
||||||
) { addBracket() }
|
) { addBracket() }
|
||||||
} else {
|
} else {
|
||||||
KeyboardButtonFilled(
|
KeyboardButtonFilled(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.LeftBracket,
|
IconPack.LeftBracket,
|
||||||
stringResource(R.string.keyboard_left_bracket),
|
stringResource(R.string.keyboard_left_bracket),
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Operator.leftBracket) }
|
) { addDigit(Token.Operator.leftBracket) }
|
||||||
KeyboardButtonFilled(
|
KeyboardButtonFilled(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.RightBracket,
|
IconPack.RightBracket,
|
||||||
stringResource(R.string.keyboard_right_bracket),
|
stringResource(R.string.keyboard_right_bracket),
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Operator.rightBracket) }
|
) { addDigit(Token.Operator.rightBracket) }
|
||||||
}
|
}
|
||||||
KeyboardButtonFilled(
|
KeyboardButtonFilled(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Power,
|
IconPack.Power,
|
||||||
stringResource(R.string.keyboard_power),
|
stringResource(R.string.keyboard_power),
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Operator.power) }
|
) { addDigit(Token.Operator.power) }
|
||||||
KeyboardButtonFilled(
|
KeyboardButtonFilled(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Root,
|
IconPack.Root,
|
||||||
stringResource(R.string.keyboard_root),
|
stringResource(R.string.keyboard_root),
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Operator.sqrt) }
|
) { addDigit(Token.Operator.sqrt) }
|
||||||
|
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Key7,
|
IconPack.Key7,
|
||||||
Token.Digit._7,
|
Token.Digit._7,
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit._7) }
|
) { addDigit(Token.Digit._7) }
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Key8,
|
IconPack.Key8,
|
||||||
Token.Digit._8,
|
Token.Digit._8,
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit._8) }
|
) { addDigit(Token.Digit._8) }
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Key9,
|
IconPack.Key9,
|
||||||
Token.Digit._9,
|
Token.Digit._9,
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit._9) }
|
) { addDigit(Token.Digit._9) }
|
||||||
KeyboardButtonFilled(
|
KeyboardButtonFilled(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Divide,
|
IconPack.Divide,
|
||||||
stringResource(R.string.keyboard_divide),
|
stringResource(R.string.keyboard_divide),
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Operator.divide) }
|
) { addDigit(Token.Operator.divide) }
|
||||||
|
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Key4,
|
IconPack.Key4,
|
||||||
Token.Digit._4,
|
Token.Digit._4,
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit._4) }
|
) { addDigit(Token.Digit._4) }
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Key5,
|
IconPack.Key5,
|
||||||
Token.Digit._5,
|
Token.Digit._5,
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit._5) }
|
) { addDigit(Token.Digit._5) }
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Key6,
|
IconPack.Key6,
|
||||||
Token.Digit._6,
|
Token.Digit._6,
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit._6) }
|
) { addDigit(Token.Digit._6) }
|
||||||
KeyboardButtonFilled(
|
KeyboardButtonFilled(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Multiply,
|
IconPack.Multiply,
|
||||||
stringResource(R.string.keyboard_multiply),
|
stringResource(R.string.keyboard_multiply),
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Operator.multiply) }
|
) { addDigit(Token.Operator.multiply) }
|
||||||
|
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Key1,
|
IconPack.Key1,
|
||||||
Token.Digit._1,
|
Token.Digit._1,
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit._1) }
|
) { addDigit(Token.Digit._1) }
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Key2,
|
IconPack.Key2,
|
||||||
Token.Digit._2,
|
Token.Digit._2,
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit._2) }
|
) { addDigit(Token.Digit._2) }
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Key3,
|
IconPack.Key3,
|
||||||
Token.Digit._3,
|
Token.Digit._3,
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit._3) }
|
) { addDigit(Token.Digit._3) }
|
||||||
KeyboardButtonFilled(
|
KeyboardButtonFilled(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Minus,
|
IconPack.Minus,
|
||||||
stringResource(R.string.keyboard_minus),
|
stringResource(R.string.keyboard_minus),
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Operator.minus) }
|
) { addDigit(Token.Operator.minus) }
|
||||||
|
|
||||||
if (middleZero) {
|
if (middleZero) {
|
||||||
@ -229,40 +229,40 @@ internal fun DefaultKeyboard(
|
|||||||
bModifier,
|
bModifier,
|
||||||
fractionalIcon,
|
fractionalIcon,
|
||||||
stringResource(fractionalIconDescription),
|
stringResource(fractionalIconDescription),
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit.dot) }
|
) { addDigit(Token.Digit.dot) }
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Key0,
|
IconPack.Key0,
|
||||||
Token.Digit._0,
|
Token.Digit._0,
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit._0) }
|
) { addDigit(Token.Digit._0) }
|
||||||
} else {
|
} else {
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Key0,
|
IconPack.Key0,
|
||||||
Token.Digit._0,
|
Token.Digit._0,
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit._0) }
|
) { addDigit(Token.Digit._0) }
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
fractionalIcon,
|
fractionalIcon,
|
||||||
stringResource(fractionalIconDescription),
|
stringResource(fractionalIconDescription),
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Digit.dot) }
|
) { addDigit(Token.Digit.dot) }
|
||||||
}
|
}
|
||||||
KeyboardButtonLight(
|
KeyboardButtonLight(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Backspace,
|
IconPack.Backspace,
|
||||||
stringResource(R.string.delete_label),
|
stringResource(R.string.delete_label),
|
||||||
height,
|
contentHeight,
|
||||||
onLongClick = clearInput,
|
onLongClick = clearInput,
|
||||||
) { deleteDigit() }
|
) { deleteDigit() }
|
||||||
KeyboardButtonFilled(
|
KeyboardButtonFilled(
|
||||||
bModifier,
|
bModifier,
|
||||||
IconPack.Plus,
|
IconPack.Plus,
|
||||||
stringResource(R.string.keyboard_plus),
|
stringResource(R.string.keyboard_plus),
|
||||||
height,
|
contentHeight,
|
||||||
) { addDigit(Token.Operator.plus) }
|
) { addDigit(Token.Operator.plus) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user