From 8b526e1b14af0452d27b2d06c2c396a52f8d7c3e Mon Sep 17 00:00:00 2001 From: Sad Ellie Date: Sun, 21 Jan 2024 21:27:36 +0300 Subject: [PATCH] Rename to Euler --- .../common/icons/iconpack/{Exponent.kt => Euler.kt} | 12 ++++++------ .../calculator/components/CalculatorKeyboard.kt | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) rename core/ui/src/main/java/com/sadellie/unitto/core/ui/common/icons/iconpack/{Exponent.kt => Euler.kt} (94%) diff --git a/core/ui/src/main/java/com/sadellie/unitto/core/ui/common/icons/iconpack/Exponent.kt b/core/ui/src/main/java/com/sadellie/unitto/core/ui/common/icons/iconpack/Euler.kt similarity index 94% rename from core/ui/src/main/java/com/sadellie/unitto/core/ui/common/icons/iconpack/Exponent.kt rename to core/ui/src/main/java/com/sadellie/unitto/core/ui/common/icons/iconpack/Euler.kt index d164566f..c545eabe 100644 --- a/core/ui/src/main/java/com/sadellie/unitto/core/ui/common/icons/iconpack/Exponent.kt +++ b/core/ui/src/main/java/com/sadellie/unitto/core/ui/common/icons/iconpack/Euler.kt @@ -30,12 +30,12 @@ import androidx.compose.ui.unit.dp import com.sadellie.unitto.core.ui.common.icons.IconPack @Suppress("UnusedReceiverParameter") -val IconPack.Exponent: ImageVector +val IconPack.Euler: ImageVector get() { - if (_exponent != null) { - return _exponent!! + if (_euler != null) { + return _euler!! } - _exponent = Builder(name = "Exponent", defaultWidth = 24.0.dp, defaultHeight = 24.0.dp, + _euler = Builder(name = "Euler", defaultWidth = 24.0.dp, defaultHeight = 24.0.dp, viewportWidth = 24.0f, viewportHeight = 24.0f).apply { path(fill = SolidColor(Color(0xFF000000)), stroke = null, strokeLineWidth = 0.0f, strokeLineCap = Butt, strokeLineJoin = Miter, strokeLineMiter = 4.0f, @@ -83,7 +83,7 @@ val IconPack.Exponent: ImageVector } } .build() - return _exponent!! + return _euler!! } -private var _exponent: ImageVector? = null +private var _euler: ImageVector? = null diff --git a/feature/calculator/src/main/java/com/sadellie/unitto/feature/calculator/components/CalculatorKeyboard.kt b/feature/calculator/src/main/java/com/sadellie/unitto/feature/calculator/components/CalculatorKeyboard.kt index 9b8e22e0..a0ca58c2 100644 --- a/feature/calculator/src/main/java/com/sadellie/unitto/feature/calculator/components/CalculatorKeyboard.kt +++ b/feature/calculator/src/main/java/com/sadellie/unitto/feature/calculator/components/CalculatorKeyboard.kt @@ -81,7 +81,7 @@ import com.sadellie.unitto.core.ui.common.icons.iconpack.Divide import com.sadellie.unitto.core.ui.common.icons.iconpack.Dot import com.sadellie.unitto.core.ui.common.icons.iconpack.Equal import com.sadellie.unitto.core.ui.common.icons.iconpack.Ex -import com.sadellie.unitto.core.ui.common.icons.iconpack.Exponent +import com.sadellie.unitto.core.ui.common.icons.iconpack.Euler import com.sadellie.unitto.core.ui.common.icons.iconpack.Factorial import com.sadellie.unitto.core.ui.common.icons.iconpack.Inv import com.sadellie.unitto.core.ui.common.icons.iconpack.Key0 @@ -234,7 +234,7 @@ private fun PortraitKeyboard( KeyboardButtonAdditional(buttonModifier, IconPack.AcTan, stringResource(R.string.keyboard_actan), allowVibration, KeyboardButtonContentHeightTallAdditional) { addSymbol(Token.Func.actanBracket) } KeyboardButtonAdditional(buttonModifier, IconPack.Inv, stringResource(R.string.keyboard_inverse), allowVibration, KeyboardButtonContentHeightTallAdditional) { toggleInvMode() } - KeyboardButtonAdditional(buttonModifier, IconPack.Exponent, stringResource(R.string.keyboard_euler), allowVibration, KeyboardButtonContentHeightTallAdditional) { addSymbol(Token.Const.e) } + KeyboardButtonAdditional(buttonModifier, IconPack.Euler, stringResource(R.string.keyboard_euler), allowVibration, KeyboardButtonContentHeightTallAdditional) { addSymbol(Token.Const.e) } KeyboardButtonAdditional(buttonModifier, IconPack.Ex, stringResource(R.string.keyboard_exp), allowVibration, KeyboardButtonContentHeightTallAdditional) { addSymbol(Token.Func.expBracket) } KeyboardButtonAdditional(buttonModifier, IconPack.Power10, stringResource(R.string.keyboard_power_10), allowVibration, KeyboardButtonContentHeightTallAdditional) { addSymbol(Token.Digit._1 + Token.Digit._0 + Token.Operator.power) } } @@ -257,7 +257,7 @@ private fun PortraitKeyboard( KeyboardButtonAdditional(buttonModifier, IconPack.Tan, stringResource(R.string.keyboard_tan), allowVibration, KeyboardButtonContentHeightTallAdditional) { addSymbol(Token.Func.tanBracket) } KeyboardButtonAdditional(buttonModifier, IconPack.Inv, stringResource(R.string.keyboard_inverse), allowVibration, KeyboardButtonContentHeightTallAdditional) { toggleInvMode() } - KeyboardButtonAdditional(buttonModifier, IconPack.Exponent, stringResource(R.string.keyboard_exp), allowVibration, KeyboardButtonContentHeightTallAdditional) { addSymbol(Token.Const.e) } + KeyboardButtonAdditional(buttonModifier, IconPack.Euler, stringResource(R.string.keyboard_exp), allowVibration, KeyboardButtonContentHeightTallAdditional) { addSymbol(Token.Const.e) } KeyboardButtonAdditional(buttonModifier, IconPack.Ln, stringResource(R.string.keyboard_ln), allowVibration, KeyboardButtonContentHeightTallAdditional) { addSymbol(Token.Func.lnBracket) } KeyboardButtonAdditional(buttonModifier, IconPack.Log, stringResource(R.string.keyboard_log), allowVibration, KeyboardButtonContentHeightTallAdditional) { addSymbol(Token.Func.logBracket) } } @@ -469,7 +469,7 @@ private fun LandscapeKeyboard( KeyboardButtonFilled(buttonModifier, IconPack.Minus, stringResource(R.string.keyboard_minus), allowVibration, KeyboardButtonContentHeightShort) { addSymbol(Token.Operator.minus) } KeyboardButtonFilled(buttonModifier, IconPack.Percent, stringResource(R.string.keyboard_percent), allowVibration, KeyboardButtonContentHeightShort) { addSymbol(Token.Operator.percent) } - KeyboardButtonAdditional(buttonModifier, IconPack.Exponent, stringResource(R.string.keyboard_euler), allowVibration, KeyboardButtonContentHeightShortAdditional) { addSymbol(Token.Const.e) } + KeyboardButtonAdditional(buttonModifier, IconPack.Euler, stringResource(R.string.keyboard_euler), allowVibration, KeyboardButtonContentHeightShortAdditional) { addSymbol(Token.Const.e) } KeyboardButtonAdditional(buttonModifier, IconPack.Ex, stringResource(R.string.keyboard_exp), allowVibration, KeyboardButtonContentHeightShortAdditional) { addSymbol(Token.Func.expBracket) } KeyboardButtonAdditional(buttonModifier, IconPack.Power10, stringResource(R.string.keyboard_power_10), allowVibration, KeyboardButtonContentHeightShortAdditional) { addSymbol(Token.Digit._1 + Token.Digit._0 + Token.Operator.power) } if (middleZero) { @@ -525,7 +525,7 @@ private fun LandscapeKeyboard( KeyboardButtonFilled(buttonModifier, IconPack.Minus, stringResource(R.string.keyboard_minus), allowVibration, KeyboardButtonContentHeightShort) { addSymbol(Token.Operator.minus) } KeyboardButtonFilled(buttonModifier, IconPack.Percent, stringResource(R.string.keyboard_percent), allowVibration, KeyboardButtonContentHeightShort) { addSymbol(Token.Operator.percent) } - KeyboardButtonAdditional(buttonModifier, IconPack.Exponent, stringResource(R.string.keyboard_euler), allowVibration, KeyboardButtonContentHeightShortAdditional) { addSymbol(Token.Const.e) } + KeyboardButtonAdditional(buttonModifier, IconPack.Euler, stringResource(R.string.keyboard_euler), allowVibration, KeyboardButtonContentHeightShortAdditional) { addSymbol(Token.Const.e) } KeyboardButtonAdditional(buttonModifier, IconPack.Ln, stringResource(R.string.keyboard_ln), allowVibration, KeyboardButtonContentHeightShortAdditional) { addSymbol(Token.Func.lnBracket) } KeyboardButtonAdditional(buttonModifier, IconPack.Log, stringResource(R.string.keyboard_log), allowVibration, KeyboardButtonContentHeightShortAdditional) { addSymbol(Token.Func.logBracket) } if (middleZero) {