mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add steppers on web prefs dialog
This commit is contained in:
parent
41e5d3000b
commit
86337d5d01
1 changed files with 62 additions and 1 deletions
|
|
@ -1,9 +1,16 @@
|
|||
package app.omnivore.omnivore.ui.reader
|
||||
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Add
|
||||
import androidx.compose.material3.Divider
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.Dialog
|
||||
|
|
@ -22,7 +29,61 @@ fun WebPreferencesDialog(onDismiss: () -> Unit) {
|
|||
|
||||
@Composable
|
||||
fun WebPreferencesView() {
|
||||
Text("Web Prefs")
|
||||
Column {
|
||||
Text("Web Preferences")
|
||||
// Font Size: Stepper
|
||||
Stepper(
|
||||
label = "Font Size:",
|
||||
onIncrease = {},
|
||||
onDecrease = {}
|
||||
)
|
||||
|
||||
// Margin: Slider
|
||||
Stepper(
|
||||
label = "Margin:",
|
||||
onIncrease = {},
|
||||
onDecrease = {}
|
||||
)
|
||||
|
||||
// Line Spacing: Slider
|
||||
Stepper(
|
||||
label = "Line Spacing:",
|
||||
onIncrease = {},
|
||||
onDecrease = {}
|
||||
)
|
||||
|
||||
// High Contrast Text: Switch
|
||||
// Reader Font: List of Fonts
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun Stepper(label: String, onIncrease: () -> Unit, onDecrease: () -> Unit) {
|
||||
Row {
|
||||
Text(text = label)
|
||||
Spacer(modifier = Modifier.weight(1.0F))
|
||||
|
||||
IconButton(onClick = { onDecrease() }) {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.Add,
|
||||
contentDescription = null
|
||||
)
|
||||
}
|
||||
|
||||
Divider(
|
||||
color = Color.Black,
|
||||
modifier = Modifier
|
||||
.height(40.dp)
|
||||
.width(1.dp)
|
||||
)
|
||||
|
||||
IconButton(onClick = { onIncrease() }) {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.Add,
|
||||
contentDescription = null
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data class WebPreferences(
|
||||
|
|
|
|||
Loading…
Reference in a new issue