Added more settings
This commit is contained in:
6 files changed
+268
-74
No files matched your search
+137
-38
@@ -26,52 +26,151 @@ Rectangle {
|
||||
leftPadding: 4
|
||||
}
|
||||
|
||||
// Page flip mode selector
|
||||
// Horizontal margin slider
|
||||
Column {
|
||||
width: parent.width
|
||||
spacing: 0
|
||||
spacing: 8
|
||||
|
||||
Text {
|
||||
text: "Page flip"
|
||||
font.pixelSize: 15
|
||||
color: Theme.uiText
|
||||
bottomPadding: 12
|
||||
leftPadding: 4
|
||||
Item {
|
||||
width: parent.width
|
||||
height: Math.max(labelH.implicitHeight, valueH.implicitHeight)
|
||||
Text {
|
||||
id: labelH
|
||||
text: "Horizontal margin"
|
||||
font.pixelSize: 15
|
||||
color: Theme.uiText
|
||||
leftPadding: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
Text {
|
||||
id: valueH
|
||||
text: appState.horizontalMargin + " px"
|
||||
font.pixelSize: 13
|
||||
color: Theme.dimText
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
spacing: 8
|
||||
Slider {
|
||||
width: parent.width
|
||||
from: 0
|
||||
to: 120
|
||||
stepSize: 1
|
||||
value: appState.horizontalMargin
|
||||
onValueChanged: appState.horizontalMargin = value
|
||||
}
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: [
|
||||
{ label: "Scroll", value: "scroll" },
|
||||
{ label: "Page", value: "page" }
|
||||
]
|
||||
// Vertical margin slider
|
||||
Column {
|
||||
width: parent.width
|
||||
spacing: 8
|
||||
|
||||
delegate: Rectangle {
|
||||
width: 100
|
||||
height: 40
|
||||
radius: 6
|
||||
color: appState.pageFlipMode === modelData.value
|
||||
? Theme.primaryAccent
|
||||
: Theme.surface
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: modelData.label
|
||||
font.pixelSize: 14
|
||||
color: appState.pageFlipMode === modelData.value
|
||||
? Theme.readingText
|
||||
: Theme.uiText
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: appState.pageFlipMode = modelData.value
|
||||
}
|
||||
}
|
||||
Item {
|
||||
width: parent.width
|
||||
height: Math.max(labelV.implicitHeight, valueV.implicitHeight)
|
||||
Text {
|
||||
id: labelV
|
||||
text: "Vertical margin"
|
||||
font.pixelSize: 15
|
||||
color: Theme.uiText
|
||||
leftPadding: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
Text {
|
||||
id: valueV
|
||||
text: appState.verticalMargin + " px"
|
||||
font.pixelSize: 13
|
||||
color: Theme.dimText
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Slider {
|
||||
width: parent.width
|
||||
from: 0
|
||||
to: 80
|
||||
stepSize: 1
|
||||
value: appState.verticalMargin
|
||||
onValueChanged: appState.verticalMargin = value
|
||||
}
|
||||
}
|
||||
|
||||
// Font size slider
|
||||
Column {
|
||||
width: parent.width
|
||||
spacing: 8
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: Math.max(labelF.implicitHeight, valueF.implicitHeight)
|
||||
Text {
|
||||
id: labelF
|
||||
text: "Font size"
|
||||
font.pixelSize: 15
|
||||
color: Theme.uiText
|
||||
leftPadding: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
Text {
|
||||
id: valueF
|
||||
text: appState.fontSize + " px"
|
||||
font.pixelSize: 13
|
||||
color: Theme.dimText
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Slider {
|
||||
width: parent.width
|
||||
from: 10
|
||||
to: 32
|
||||
stepSize: 1
|
||||
value: appState.fontSize
|
||||
onValueChanged: appState.fontSize = value
|
||||
}
|
||||
}
|
||||
|
||||
// Line spacing slider
|
||||
Column {
|
||||
width: parent.width
|
||||
spacing: 8
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: Math.max(labelL.implicitHeight, valueL.implicitHeight)
|
||||
Text {
|
||||
id: labelL
|
||||
text: "Line spacing"
|
||||
font.pixelSize: 15
|
||||
color: Theme.uiText
|
||||
leftPadding: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
Text {
|
||||
id: valueL
|
||||
text: appState.lineSpacing.toFixed(1) + "×"
|
||||
font.pixelSize: 13
|
||||
color: Theme.dimText
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Slider {
|
||||
width: parent.width
|
||||
from: 0.5
|
||||
to: 3.0
|
||||
stepSize: 0.1
|
||||
value: appState.lineSpacing
|
||||
onValueChanged: appState.lineSpacing = value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user