@@ -41,134 +41,44 @@ PreferencesPage {
4141
4242 Column {
4343 anchors .fill : parent
44- spacing: 24
44+ spacing: root . sectionsSpacing
4545
46- Column {
47- anchors . left : parent . left
48- anchors . right : parent . right
49- spacing : 18
46+ ZoomSection {
47+ defaultZoom : preferencesModel . defaultZoom
48+ zoomTypes : preferencesModel . zoomTypes ()
49+ mouseZoomPrecision : preferencesModel . mouseZoomPrecision
5050
51- StyledTextLabel {
52- text: qsTrc (" appshell" , " Zoom" )
53- font: ui .theme .bodyBoldFont
54- }
55-
56- Column {
57- spacing: 8
58-
59- Row {
60- spacing: 12
61-
62- ComboBoxWithTitle {
63- title: qsTrc (" appshell" , " Default zoom:" )
64- titleWidth: 210
65-
66- control .textRole : " title"
67- control .valueRole : " value"
68-
69- currentIndex: control .indexOfValue (preferencesModel .defaultZoom .type )
70-
71- model: preferencesModel .zoomTypes ()
72-
73- onValueEdited: {
74- preferencesModel .setDefaultZoomType (newValue)
75- }
76- }
77-
78- IncrementalPropertyControl {
79- id: defaultZoomControl
80- width: 64
81-
82- maxValue: 1600
83- minValue: 10
84- step: 10
85- decimals: 0
86-
87- measureUnitsSymbol: " %"
88-
89- currentValue: preferencesModel .defaultZoom .level
90- enabled: preferencesModel .defaultZoom .isPercentage
91-
92- onValueEdited: {
93- preferencesModel .setDefaultZoomLevel (newValue)
94- }
95- }
96- }
97-
98- IncrementalPropertyControlWithTitle {
99- title: qsTrc (" appshell" , " Mouse zoom precision:" )
51+ navigation .section : root .navigationSection
52+ navigation .order : root .navigationOrderStart + 1
10053
101- titleWidth: 208
102- control .width : 60
54+ onDefaultZoomTypeChangeRequested: {
55+ preferencesModel .setDefaultZoomType (zoomType)
56+ }
10357
104- minValue : 1
105- maxValue : 16
106- currentValue : preferencesModel . mouseZoomPrecision
58+ onDefaultZoomLevelChangeRequested : {
59+ preferencesModel . setDefaultZoomLevel (zoomLevel)
60+ }
10761
108- onValueEdited: {
109- preferencesModel .mouseZoomPrecision = newValue
110- }
111- }
62+ onMouseZoomPrecisionChangeRequested: {
63+ preferencesModel .mouseZoomPrecision = zoomPrecision
11264 }
11365 }
11466
11567 SeparatorLine { }
11668
117- Column {
118- anchors .left : parent .left
119- anchors .right : parent .right
120- spacing: 18
121-
122- StyledTextLabel {
123- text: qsTrc (" appshell" , " Scroll pages" )
124- font: ui .theme .bodyBoldFont
125- }
126-
127- Column {
128- spacing: 16
129-
130- RadioButtonGroup {
131- id: radioButtonList
132-
133- width: 100
134- height: implicitHeight
69+ ScrollPagesSection {
70+ orientation: preferencesModel .scrollPagesOrientation
71+ limitScrollArea: preferencesModel .limitScrollArea
13572
136- spacing : 12
137- orientation : ListView . Vertical
73+ navigation . section : root . navigationSection
74+ navigation . order : root . navigationOrderStart + 2
13875
139- model: [
140- { title: qsTrc (" appshell" , " Horizontal" ), value: Qt .Horizontal },
141- { title: qsTrc (" appshell" , " Vertical" ), value: Qt .Vertical }
142- ]
143-
144- delegate: RoundedRadioButton {
145- width: parent .width
146- leftPadding: 0
147- spacing: 6
148-
149- ButtonGroup .group : radioButtonList .radioButtonGroup
150-
151- checked: preferencesModel .scrollPagesOrientation === modelData[" value" ]
152-
153- StyledTextLabel {
154- text: modelData[" title" ]
155- horizontalAlignment: Text .AlignLeft
156- }
157-
158- onToggled: {
159- preferencesModel .scrollPagesOrientation = modelData[" value" ]
160- }
161- }
162- }
163-
164- CheckBox {
165- text: qsTrc (" appshell" , " Limit scroll area to page borders" )
166- checked: preferencesModel .limitScrollArea
76+ onOrientationChangeRequested: {
77+ preferencesModel .scrollPagesOrientation = orientation
78+ }
16779
168- onClicked: {
169- preferencesModel .limitScrollArea = ! preferencesModel .limitScrollArea
170- }
171- }
80+ onLimitScrollAreaChangeRequested: {
81+ preferencesModel .limitScrollArea = limit
17282 }
17383 }
17484 }
0 commit comments