Skip to content

Commit be25eb1

Browse files
committed
fix: fix incorrect colors and modify strings
1 parent a93e748 commit be25eb1

File tree

5 files changed

+22
-7
lines changed

5 files changed

+22
-7
lines changed

app/src/main/java/org/nsh07/pomodoro/ui/ClickableListItem.kt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Copyright (c) 2025 Nishant Mishra
3+
*
4+
* This file is part of Tomato - a minimalist pomodoro timer for Android.
5+
*
6+
* Tomato is free software: you can redistribute it and/or modify it under the terms of the GNU
7+
* General Public License as published by the Free Software Foundation, either version 3 of the
8+
* License, or (at your option) any later version.
9+
*
10+
* Tomato is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
11+
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
12+
* Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License along with Tomato.
15+
* If not, see <https://www.gnu.org/licenses/>.
16+
*/
17+
118
package org.nsh07.pomodoro.ui
219

320
import androidx.compose.animation.core.animateDpAsState
@@ -17,6 +34,7 @@ import androidx.compose.ui.Modifier
1734
import androidx.compose.ui.draw.clip
1835
import androidx.compose.ui.unit.Dp
1936
import androidx.compose.ui.unit.dp
37+
import org.nsh07.pomodoro.ui.theme.CustomColors.listItemColors
2038

2139
@OptIn(ExperimentalMaterial3ExpressiveApi::class)
2240
@Composable
@@ -27,7 +45,7 @@ fun ClickableListItem(
2745
supportingContent: @Composable (() -> Unit)? = null,
2846
leadingContent: @Composable (() -> Unit)? = null,
2947
trailingContent: @Composable (() -> Unit)? = null,
30-
colors: ListItemColors = ListItemDefaults.colors(),
48+
colors: ListItemColors = listItemColors,
3149
tonalElevation: Dp = ListItemDefaults.Elevation,
3250
shadowElevation: Dp = ListItemDefaults.Elevation,
3351
items: Int,

app/src/main/java/org/nsh07/pomodoro/ui/settingsScreen/components/ColorSchemePickerListItem.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import androidx.compose.ui.res.painterResource
3232
import androidx.compose.ui.res.stringResource
3333
import org.nsh07.pomodoro.R
3434
import org.nsh07.pomodoro.ui.ClickableListItem
35-
import org.nsh07.pomodoro.ui.theme.CustomColors.listItemColors
3635

3736
@Composable
3837
fun ColorSchemePickerListItem(
@@ -67,7 +66,6 @@ fun ColorSchemePickerListItem(
6766
else stringResource(R.string.color)
6867
)
6968
},
70-
colors = listItemColors,
7169
items = items,
7270
index = index,
7371
modifier = modifier.fillMaxWidth()

app/src/main/java/org/nsh07/pomodoro/ui/settingsScreen/components/ThemePickerListItem.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import androidx.compose.ui.res.painterResource
3030
import androidx.compose.ui.res.stringResource
3131
import org.nsh07.pomodoro.R
3232
import org.nsh07.pomodoro.ui.ClickableListItem
33-
import org.nsh07.pomodoro.ui.theme.CustomColors.listItemColors
3433

3534
@Composable
3635
fun ThemePickerListItem(
@@ -65,7 +64,6 @@ fun ThemePickerListItem(
6564
supportingContent = {
6665
Text(stringResource(themeMap[theme]!!.second))
6766
},
68-
colors = listItemColors,
6967
items = items,
7068
index = index,
7169
modifier = modifier.fillMaxWidth()

app/src/main/java/org/nsh07/pomodoro/ui/settingsScreen/screens/AlarmSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fun AlarmSettings(
134134
SettingsSwitchItem(
135135
checked = alarmEnabled,
136136
icon = R.drawable.alarm_on,
137-
label = R.string.alarm,
137+
label = R.string.sound,
138138
description = R.string.alarm_desc,
139139
onClick = onAlarmEnabledChange
140140
),

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@
7373
<string name="today">Today</string>
7474
<string name="up_next">Up next</string>
7575
<string name="up_next_notification">Up next: %1$s (%2$s)</string>
76-
<string name="vibrate">Vibrate</string>
76+
<string name="vibrate">Vibration</string>
7777
<string name="vibrate_desc">Vibrate when a timer completes</string>
7878
<string name="weekly_productivity_analysis">Weekly productivity analysis</string>
7979
<string name="appearance">Appearance</string>
8080
<string name="durations">Durations</string>
81+
<string name="sound">Sound</string>
8182
</resources>

0 commit comments

Comments
 (0)