🚀 Chapters Settings' subcategory
* Moved "Chapter's title alignment" from Text to the new Chapters subcategory
This commit is contained in:
parent
c9832c3183
commit
092bbfd10b
7 changed files with 41 additions and 6 deletions
|
|
@ -23,6 +23,7 @@ import ua.acclorite.book_story.presentation.core.components.common.LazyColumnWit
|
||||||
import ua.acclorite.book_story.presentation.core.components.modal_bottom_sheet.ModalBottomSheet
|
import ua.acclorite.book_story.presentation.core.components.modal_bottom_sheet.ModalBottomSheet
|
||||||
import ua.acclorite.book_story.presentation.core.util.LocalActivity
|
import ua.acclorite.book_story.presentation.core.util.LocalActivity
|
||||||
import ua.acclorite.book_story.presentation.settings.appearance.colors.ColorsSubcategory
|
import ua.acclorite.book_story.presentation.settings.appearance.colors.ColorsSubcategory
|
||||||
|
import ua.acclorite.book_story.presentation.settings.reader.chapters.ChaptersSubcategory
|
||||||
import ua.acclorite.book_story.presentation.settings.reader.font.FontSubcategory
|
import ua.acclorite.book_story.presentation.settings.reader.font.FontSubcategory
|
||||||
import ua.acclorite.book_story.presentation.settings.reader.misc.MiscSubcategory
|
import ua.acclorite.book_story.presentation.settings.reader.misc.MiscSubcategory
|
||||||
import ua.acclorite.book_story.presentation.settings.reader.padding.PaddingSubcategory
|
import ua.acclorite.book_story.presentation.settings.reader.padding.PaddingSubcategory
|
||||||
|
|
@ -120,6 +121,9 @@ fun ReaderSettingsBottomSheet(
|
||||||
TextSubcategory(
|
TextSubcategory(
|
||||||
titleColor = { MaterialTheme.colorScheme.onSurface }
|
titleColor = { MaterialTheme.colorScheme.onSurface }
|
||||||
)
|
)
|
||||||
|
ChaptersSubcategory(
|
||||||
|
titleColor = { MaterialTheme.colorScheme.onSurface }
|
||||||
|
)
|
||||||
TranslatorSubcategory(
|
TranslatorSubcategory(
|
||||||
titleColor = { MaterialTheme.colorScheme.onSurface },
|
titleColor = { MaterialTheme.colorScheme.onSurface },
|
||||||
showDivider = false
|
showDivider = false
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import androidx.compose.foundation.lazy.LazyListScope
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import ua.acclorite.book_story.presentation.settings.reader.chapters.ChaptersSubcategory
|
||||||
import ua.acclorite.book_story.presentation.settings.reader.font.FontSubcategory
|
import ua.acclorite.book_story.presentation.settings.reader.font.FontSubcategory
|
||||||
import ua.acclorite.book_story.presentation.settings.reader.misc.MiscSubcategory
|
import ua.acclorite.book_story.presentation.settings.reader.misc.MiscSubcategory
|
||||||
import ua.acclorite.book_story.presentation.settings.reader.padding.PaddingSubcategory
|
import ua.acclorite.book_story.presentation.settings.reader.padding.PaddingSubcategory
|
||||||
|
|
@ -24,6 +25,9 @@ fun LazyListScope.ReaderSettingsCategory(
|
||||||
TextSubcategory(
|
TextSubcategory(
|
||||||
titleColor = titleColor
|
titleColor = titleColor
|
||||||
)
|
)
|
||||||
|
ChaptersSubcategory(
|
||||||
|
titleColor = titleColor
|
||||||
|
)
|
||||||
ReadingModeSubcategory(
|
ReadingModeSubcategory(
|
||||||
titleColor = titleColor
|
titleColor = titleColor
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
@file:Suppress("FunctionName")
|
||||||
|
|
||||||
|
package ua.acclorite.book_story.presentation.settings.reader.chapters
|
||||||
|
|
||||||
|
import androidx.compose.foundation.lazy.LazyListScope
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.compose.ui.res.stringResource
|
||||||
|
import ua.acclorite.book_story.R
|
||||||
|
import ua.acclorite.book_story.presentation.settings.components.SettingsSubcategory
|
||||||
|
import ua.acclorite.book_story.presentation.settings.reader.chapters.components.ChapterTitleAlignmentOption
|
||||||
|
|
||||||
|
fun LazyListScope.ChaptersSubcategory(
|
||||||
|
titleColor: @Composable () -> Color = { MaterialTheme.colorScheme.primary },
|
||||||
|
title: @Composable () -> String = { stringResource(id = R.string.chapters_reader_settings) },
|
||||||
|
showTitle: Boolean = true,
|
||||||
|
showDivider: Boolean = true,
|
||||||
|
) {
|
||||||
|
SettingsSubcategory(
|
||||||
|
titleColor = titleColor,
|
||||||
|
title = title,
|
||||||
|
showTitle = showTitle,
|
||||||
|
showDivider = showDivider
|
||||||
|
) {
|
||||||
|
item {
|
||||||
|
ChapterTitleAlignmentOption()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ua.acclorite.book_story.presentation.settings.reader.text.components
|
package ua.acclorite.book_story.presentation.settings.reader.chapters.components
|
||||||
|
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
|
@ -9,7 +9,6 @@ import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import ua.acclorite.book_story.R
|
import ua.acclorite.book_story.R
|
||||||
import ua.acclorite.book_story.presentation.settings.components.SettingsSubcategory
|
import ua.acclorite.book_story.presentation.settings.components.SettingsSubcategory
|
||||||
import ua.acclorite.book_story.presentation.settings.reader.text.components.ChapterTitleAlignmentOption
|
|
||||||
import ua.acclorite.book_story.presentation.settings.reader.text.components.LineHeightOption
|
import ua.acclorite.book_story.presentation.settings.reader.text.components.LineHeightOption
|
||||||
import ua.acclorite.book_story.presentation.settings.reader.text.components.ParagraphHeightOption
|
import ua.acclorite.book_story.presentation.settings.reader.text.components.ParagraphHeightOption
|
||||||
import ua.acclorite.book_story.presentation.settings.reader.text.components.ParagraphIndentationOption
|
import ua.acclorite.book_story.presentation.settings.reader.text.components.ParagraphIndentationOption
|
||||||
|
|
@ -31,10 +30,6 @@ fun LazyListScope.TextSubcategory(
|
||||||
TextAlignmentOption()
|
TextAlignmentOption()
|
||||||
}
|
}
|
||||||
|
|
||||||
item {
|
|
||||||
ChapterTitleAlignmentOption()
|
|
||||||
}
|
|
||||||
|
|
||||||
item {
|
item {
|
||||||
LineHeightOption()
|
LineHeightOption()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,7 @@
|
||||||
<string name="reading_speed_reader_settings">Швидкість читання</string>
|
<string name="reading_speed_reader_settings">Швидкість читання</string>
|
||||||
<string name="reading_mode_reader_settings">Режим читання</string>
|
<string name="reading_mode_reader_settings">Режим читання</string>
|
||||||
<string name="system_reader_settings">Система</string>
|
<string name="system_reader_settings">Система</string>
|
||||||
|
<string name="chapters_reader_settings">Розділи</string>
|
||||||
<string name="theme_appearance_settings">Налаштування теми</string>
|
<string name="theme_appearance_settings">Налаштування теми</string>
|
||||||
<string name="colors_appearance_settings">Кольори</string>
|
<string name="colors_appearance_settings">Кольори</string>
|
||||||
<string name="general_browse_settings">Головні</string>
|
<string name="general_browse_settings">Головні</string>
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,7 @@
|
||||||
<string name="reading_speed_reader_settings">Reading speed</string>
|
<string name="reading_speed_reader_settings">Reading speed</string>
|
||||||
<string name="reading_mode_reader_settings">Reading mode</string>
|
<string name="reading_mode_reader_settings">Reading mode</string>
|
||||||
<string name="system_reader_settings">System</string>
|
<string name="system_reader_settings">System</string>
|
||||||
|
<string name="chapters_reader_settings">Chapters</string>
|
||||||
<string name="theme_appearance_settings">Theme preferences</string>
|
<string name="theme_appearance_settings">Theme preferences</string>
|
||||||
<string name="colors_appearance_settings">Colors</string>
|
<string name="colors_appearance_settings">Colors</string>
|
||||||
<string name="general_browse_settings">General</string>
|
<string name="general_browse_settings">General</string>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue