From 914edc9aa7c485a69c834c077b7e6e766eb9dad0 Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Sat, 6 Aug 2022 02:14:19 +0200 Subject: [PATCH] Removed decimals from calculated scale --- src/main/kotlin/app/ui/dialogs/settings/SettingsDialog.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/app/ui/dialogs/settings/SettingsDialog.kt b/src/main/kotlin/app/ui/dialogs/settings/SettingsDialog.kt index ac3f16d..cb2ad59 100644 --- a/src/main/kotlin/app/ui/dialogs/settings/SettingsDialog.kt +++ b/src/main/kotlin/app/ui/dialogs/settings/SettingsDialog.kt @@ -205,9 +205,9 @@ fun UiSettings(settingsViewModel: SettingsViewModel) { var matchingOption = options.firstOrNull { it.value == scaleUi } - if (matchingOption == null) { // Scale that we haven't taken in considerations + if (matchingOption == null) { // Scale that we haven't taken in consideration // Create a new scale and add it to the options list - matchingOption = ScaleDropDown(scaleUi, "${scaleUi * 100}%") + matchingOption = ScaleDropDown(scaleUi, "${(scaleUi * 100).toInt()}%") val newOptions = options.toMutableList() newOptions.add(matchingOption) newOptions.sortBy { it.value }