initial scroll position saving
This commit is contained in:
3 files changed
+88
-25
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Asteria
|
||||
|
||||
Rectangle {
|
||||
@@ -6,4 +7,73 @@ Rectangle {
|
||||
GradientStop { position: 0.0; color: Theme.gradientTop }
|
||||
GradientStop { position: 1.0; color: Theme.gradientBottom }
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 32
|
||||
contentWidth: availableWidth
|
||||
|
||||
Column {
|
||||
width: parent.width
|
||||
spacing: 24
|
||||
|
||||
// Section header
|
||||
Text {
|
||||
text: "Reading"
|
||||
font.pixelSize: 13
|
||||
font.weight: Font.Medium
|
||||
color: Theme.dimText
|
||||
leftPadding: 4
|
||||
}
|
||||
|
||||
// Page flip mode selector
|
||||
Column {
|
||||
width: parent.width
|
||||
spacing: 0
|
||||
|
||||
Text {
|
||||
text: "Page flip"
|
||||
font.pixelSize: 15
|
||||
color: Theme.uiText
|
||||
bottomPadding: 12
|
||||
leftPadding: 4
|
||||
}
|
||||
|
||||
Row {
|
||||
spacing: 8
|
||||
|
||||
Repeater {
|
||||
model: [
|
||||
{ label: "Scroll", value: "scroll" },
|
||||
{ label: "Page", value: "page" }
|
||||
]
|
||||
|
||||
delegate: Rectangle {
|
||||
width: 100
|
||||
height: 40
|
||||
radius: 6
|
||||
color: window.pageFlipMode === modelData.value
|
||||
? Theme.primaryAccent
|
||||
: Theme.surface
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: modelData.label
|
||||
font.pixelSize: 14
|
||||
color: window.pageFlipMode === modelData.value
|
||||
? Theme.readingText
|
||||
: Theme.uiText
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: window.pageFlipMode = modelData.value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user