|
|
@@ -9,18 +9,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
import androidx.compose.foundation.layout.padding
|
|
|
import androidx.compose.foundation.rememberScrollState
|
|
|
import androidx.compose.foundation.verticalScroll
|
|
|
-import androidx.compose.material.icons.Icons
|
|
|
-import androidx.compose.material.icons.automirrored.filled.Sort
|
|
|
-import androidx.compose.material.icons.automirrored.filled.ViewList
|
|
|
-import androidx.compose.material.icons.filled.BlurOn
|
|
|
-import androidx.compose.material.icons.filled.History
|
|
|
-import androidx.compose.material.icons.filled.Info
|
|
|
-import androidx.compose.material.icons.filled.Menu
|
|
|
-import androidx.compose.material.icons.filled.Notifications
|
|
|
-import androidx.compose.material.icons.filled.SortByAlpha
|
|
|
-import androidx.compose.material.icons.filled.Style
|
|
|
-import androidx.compose.material.icons.filled.TextFormat
|
|
|
-import androidx.compose.material.icons.filled.ViewCompact
|
|
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
|
|
import androidx.compose.material3.MaterialTheme
|
|
|
import androidx.compose.runtime.Composable
|
|
|
@@ -67,7 +55,6 @@ fun BookshelfConfigSheet(
|
|
|
selectedValue = BookshelfConfig.bookGroupStyle.toString(),
|
|
|
displayEntries = stringArrayResource(R.array.group_style),
|
|
|
entryValues = Array(stringArrayResource(R.array.group_style).size) { it.toString() },
|
|
|
- imageVector = Icons.Default.Style,
|
|
|
onValueChange = { BookshelfConfig.bookGroupStyle = it.toInt() }
|
|
|
)
|
|
|
|
|
|
@@ -77,7 +64,6 @@ fun BookshelfConfigSheet(
|
|
|
selectedValue = BookshelfConfig.bookshelfSort.toString(),
|
|
|
displayEntries = stringArrayResource(R.array.bookshelf_px_array),
|
|
|
entryValues = Array(stringArrayResource(R.array.bookshelf_px_array).size) { it.toString() },
|
|
|
- imageVector = Icons.AutoMirrored.Filled.Sort,
|
|
|
onValueChange = { BookshelfConfig.bookshelfSort = it.toInt() }
|
|
|
)
|
|
|
|
|
|
@@ -90,7 +76,6 @@ fun BookshelfConfigSheet(
|
|
|
stringResource(R.string.descending_order)
|
|
|
),
|
|
|
entryValues = arrayOf("0", "1"),
|
|
|
- imageVector = Icons.Default.SortByAlpha,
|
|
|
onValueChange = { BookshelfConfig.bookshelfSortOrder = it.toInt() }
|
|
|
)
|
|
|
|
|
|
@@ -105,7 +90,6 @@ fun BookshelfConfigSheet(
|
|
|
selectedValue = layoutMode.toString(),
|
|
|
displayEntries = arrayOf("列表", "网格"),
|
|
|
entryValues = arrayOf("0", "1"),
|
|
|
- imageVector = Icons.AutoMirrored.Filled.ViewList,
|
|
|
onValueChange = {
|
|
|
if (isLandscape) BookshelfConfig.bookshelfLayoutModeLandscape = it.toInt()
|
|
|
else BookshelfConfig.bookshelfLayoutModePortrait = it.toInt()
|
|
|
@@ -123,7 +107,6 @@ fun BookshelfConfigSheet(
|
|
|
selectedValue = BookshelfConfig.bookshelfGridLayout.toString(),
|
|
|
displayEntries = stringArrayResource(R.array.bookshelf_grid_layout),
|
|
|
entryValues = Array(stringArrayResource(R.array.bookshelf_grid_layout).size) { it.toString() },
|
|
|
- imageVector = Icons.Default.ViewCompact,
|
|
|
onValueChange = { BookshelfConfig.bookshelfGridLayout = it.toInt() }
|
|
|
)
|
|
|
|
|
|
@@ -144,7 +127,6 @@ fun BookshelfConfigSheet(
|
|
|
CompactSwitchSettingItem(
|
|
|
title = "标题小字体",
|
|
|
checked = BookshelfConfig.bookshelfTitleSmallFont,
|
|
|
- imageVector = Icons.Default.TextFormat,
|
|
|
color = MaterialTheme.colorScheme.surface,
|
|
|
onCheckedChange = { BookshelfConfig.bookshelfTitleSmallFont = it }
|
|
|
)
|
|
|
@@ -167,7 +149,6 @@ fun BookshelfConfigSheet(
|
|
|
CompactSwitchSettingItem(
|
|
|
title = "紧凑模式",
|
|
|
checked = BookshelfConfig.bookshelfLayoutCompact,
|
|
|
- imageVector = Icons.Default.ViewCompact,
|
|
|
color = MaterialTheme.colorScheme.surface,
|
|
|
onCheckedChange = { BookshelfConfig.bookshelfLayoutCompact = it }
|
|
|
)
|
|
|
@@ -175,7 +156,6 @@ fun BookshelfConfigSheet(
|
|
|
CompactSwitchSettingItem(
|
|
|
title = "显示分隔线",
|
|
|
checked = BookshelfConfig.bookshelfShowDivider,
|
|
|
- imageVector = Icons.Default.ViewCompact,
|
|
|
color = MaterialTheme.colorScheme.surface,
|
|
|
onCheckedChange = { BookshelfConfig.bookshelfShowDivider = it }
|
|
|
)
|
|
|
@@ -207,7 +187,6 @@ fun BookshelfConfigSheet(
|
|
|
CompactSwitchSettingItem(
|
|
|
title = "封面阴影",
|
|
|
checked = BookshelfConfig.bookshelfCoverShadow,
|
|
|
- imageVector = Icons.Default.BlurOn,
|
|
|
color = MaterialTheme.colorScheme.surface,
|
|
|
onCheckedChange = { BookshelfConfig.bookshelfCoverShadow = it }
|
|
|
)
|
|
|
@@ -216,7 +195,6 @@ fun BookshelfConfigSheet(
|
|
|
CompactSwitchSettingItem(
|
|
|
title = stringResource(R.string.show_unread),
|
|
|
checked = BookshelfConfig.showUnread,
|
|
|
- imageVector = Icons.Default.Notifications,
|
|
|
color = MaterialTheme.colorScheme.surface,
|
|
|
onCheckedChange = { BookshelfConfig.showUnread = it }
|
|
|
)
|
|
|
@@ -231,15 +209,20 @@ fun BookshelfConfigSheet(
|
|
|
CompactSwitchSettingItem(
|
|
|
title = stringResource(R.string.show_tip),
|
|
|
checked = BookshelfConfig.showTip,
|
|
|
- imageVector = Icons.Default.Info,
|
|
|
color = MaterialTheme.colorScheme.surface,
|
|
|
onCheckedChange = { BookshelfConfig.showTip = it }
|
|
|
)
|
|
|
|
|
|
+ CompactSwitchSettingItem(
|
|
|
+ title = stringResource(R.string.show_book_count),
|
|
|
+ checked = BookshelfConfig.showBookCount,
|
|
|
+ color = MaterialTheme.colorScheme.surface,
|
|
|
+ onCheckedChange = { BookshelfConfig.showBookCount = it }
|
|
|
+ )
|
|
|
+
|
|
|
CompactSwitchSettingItem(
|
|
|
title = stringResource(R.string.show_last_update_time),
|
|
|
checked = BookshelfConfig.showLastUpdateTime,
|
|
|
- imageVector = Icons.Default.History,
|
|
|
color = MaterialTheme.colorScheme.surface,
|
|
|
onCheckedChange = { BookshelfConfig.showLastUpdateTime = it }
|
|
|
)
|
|
|
@@ -261,7 +244,6 @@ fun BookshelfConfigSheet(
|
|
|
CompactSwitchSettingItem(
|
|
|
title = stringResource(R.string.show_bookshelf_tab_menu),
|
|
|
checked = BookshelfConfig.shouldShowExpandButton,
|
|
|
- imageVector = Icons.Default.Menu,
|
|
|
color = MaterialTheme.colorScheme.surface,
|
|
|
onCheckedChange = { BookshelfConfig.shouldShowExpandButton = it }
|
|
|
)
|