Skip to content

Commit

Permalink
move ThemePreviewPanel and ColorButton to ui-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
StageGuard committed Feb 2, 2025
1 parent a27edcd commit a4493ee
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fun PreviewColorButton() {
FlowRow {
var currentColor by remember { mutableStateOf(AniThemeDefaults.themeColorOptions[0]) }
AniThemeDefaults.themeColorOptions.forEach {
ColorButton(
me.him188.ani.app.ui.settings.tabs.theme.ColorButton(
onClick = { currentColor = it },
baseColor = it,
selected = currentColor == it,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ import me.him188.ani.app.ui.foundation.theme.appColorScheme
fun PreviewThemePreviewPanel() {
ProvideFoundationCompositionLocalsForPreview {
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
ThemePreviewPanel(
me.him188.ani.app.ui.settings.tabs.theme.ThemePreviewPanel(
colorScheme = appColorScheme(isDark = false),
modifier = Modifier.size(96.dp, 146.dp),
)
ThemePreviewPanel(
me.him188.ani.app.ui.settings.tabs.theme.ThemePreviewPanel(
colorScheme = appColorScheme(isDark = true),
modifier = Modifier.size(96.dp, 146.dp),
)
DiagonalMixedThemePreviewPanel(
me.him188.ani.app.ui.settings.tabs.theme.DiagonalMixedThemePreviewPanel(
leftTopColorScheme = appColorScheme(isDark = false),
rightBottomColorScheme = appColorScheme(isDark = true),
modifier = Modifier.size(96.dp, 146.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* https://github.com/open-ani/ani/blob/main/LICENSE
*/

package me.him188.ani.app.ui.theme
package me.him188.ani.app.ui.settings.tabs.theme

import androidx.compose.animation.core.animateDpAsState
import androidx.compose.foundation.layout.Box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import me.him188.ani.app.ui.settings.framework.SettingsState
import me.him188.ani.app.ui.settings.framework.components.DropdownItem
import me.him188.ani.app.ui.settings.framework.components.SettingsScope
import me.him188.ani.app.ui.settings.framework.components.SwitchItem
import me.him188.ani.app.ui.theme.ColorButton
import me.him188.ani.app.ui.theme.themeColorOptions
import me.him188.ani.utils.platform.isAndroid
import me.him188.ani.utils.platform.isDesktop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* https://github.com/open-ani/ani/blob/main/LICENSE
*/

package me.him188.ani.app.ui.theme
package me.him188.ani.app.ui.settings.tabs.theme

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ import me.him188.ani.app.ui.foundation.theme.AniThemeDefaults
import me.him188.ani.app.ui.foundation.theme.appColorScheme
import me.him188.ani.app.ui.settings.SettingsTab
import me.him188.ani.app.ui.settings.framework.components.TextItem
import me.him188.ani.app.ui.theme.ColorButton
import me.him188.ani.app.ui.theme.DiagonalMixedThemePreviewPanel
import me.him188.ani.app.ui.theme.ThemePreviewPanel
import me.him188.ani.app.ui.settings.tabs.theme.ColorButton
import me.him188.ani.app.ui.settings.tabs.theme.DiagonalMixedThemePreviewPanel
import me.him188.ani.app.ui.settings.tabs.theme.ThemePreviewPanel
import me.him188.ani.app.ui.theme.themeColorOptions
import me.him188.ani.app.ui.wizard.WizardLayoutParams
import me.him188.ani.utils.platform.isAndroid
Expand Down

0 comments on commit a4493ee

Please sign in to comment.