Changeset View
Changeset View
Standalone View
Standalone View
src/core/DialogChooseLevel.qml
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Line(s) | 190 | GCText { | |||
---|---|---|---|---|---|
199 | wrapMode: Text.WordWrap | 199 | wrapMode: Text.WordWrap | ||
200 | } | 200 | } | ||
201 | } | 201 | } | ||
202 | } | 202 | } | ||
203 | 203 | | |||
204 | // Header buttons | 204 | // Header buttons | ||
205 | Row { | 205 | Row { | ||
206 | id: datasetOptionsRow | 206 | id: datasetOptionsRow | ||
207 | height: datasetVisibleButton.height | 207 | height: dialogChooseLevel.height / 12 | ||
jjazeix: just for my information, what do these changes fix? | |||||
These changes fix the Binding loop error qrc:/gcompris/src/core/DialogChooseLevel.qml:211:17: QML Button: Binding loop detected for property "implicitHeight" . Since initially the height of datasetOptionsRow was depended on height of datasetVisibleButton explicitly and height of datasetVisibleButton was depended on height of datasetOptionsRow implicitly which resulted in a binding loop. AkshayCHD: These changes fix the Binding loop error qrc:/gcompris/src/core/DialogChooseLevel.qml:211:17… | |||||
208 | width: parent.width | 208 | width: parent.width | ||
209 | spacing: parent.width / 4 | 209 | spacing: parent.width / 4 | ||
210 | anchors.leftMargin: parent.width / 8 | 210 | anchors.leftMargin: parent.width / 8 | ||
211 | Button { | 211 | Button { | ||
212 | id: datasetVisibleButton | 212 | id: datasetVisibleButton | ||
213 | text: qsTr("Dataset") | 213 | text: qsTr("Dataset") | ||
214 | enabled: hasDataset | 214 | enabled: hasDataset | ||
215 | height: parent.height | ||||
215 | width: parent.width / 3 | 216 | width: parent.width / 3 | ||
216 | property bool selected: true | 217 | property bool selected: true | ||
217 | style: GCButtonStyle { | 218 | style: GCButtonStyle { | ||
218 | selected: datasetVisibleButton.selected | 219 | selected: datasetVisibleButton.selected | ||
219 | } | 220 | } | ||
220 | onClicked: { selected = true; } | 221 | onClicked: { selected = true; } | ||
221 | } | 222 | } | ||
222 | Button { | 223 | Button { | ||
223 | id: optionsVisibleButton | 224 | id: optionsVisibleButton | ||
225 | height: parent.height | ||||
224 | text: qsTr("Options") | 226 | text: qsTr("Options") | ||
225 | enabled: hasConfig | 227 | enabled: hasConfig | ||
226 | width: parent.width / 3 | 228 | width: parent.width / 3 | ||
227 | style: GCButtonStyle { | 229 | style: GCButtonStyle { | ||
228 | selected: !datasetVisibleButton.selected | 230 | selected: !datasetVisibleButton.selected | ||
229 | } | 231 | } | ||
230 | onClicked: { datasetVisibleButton.selected = false; } //showOptions() | 232 | onClicked: { datasetVisibleButton.selected = false; } //showOptions() | ||
231 | } | 233 | } | ||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Line(s) | 314 | GCButtonScroll { | |||
318 | onDown: flick.flick(0, -1400) | 320 | onDown: flick.flick(0, -1400) | ||
319 | upVisible: flick.visibleArea.yPosition <= 0 ? false : true | 321 | upVisible: flick.visibleArea.yPosition <= 0 ? false : true | ||
320 | downVisible: flick.visibleArea.yPosition + flick.visibleArea.heightRatio >= 1 ? false : true | 322 | downVisible: flick.visibleArea.yPosition + flick.visibleArea.heightRatio >= 1 ? false : true | ||
321 | } | 323 | } | ||
322 | } | 324 | } | ||
323 | // Footer buttons | 325 | // Footer buttons | ||
324 | Row { | 326 | Row { | ||
325 | id: saveAndPlayRow | 327 | id: saveAndPlayRow | ||
326 | height: cancelButton.height | 328 | height: dialogChooseLevel.height / 12 | ||
327 | width: parent.width | 329 | width: parent.width | ||
328 | spacing: parent.width / 16 | 330 | spacing: parent.width / 16 | ||
329 | Button { | 331 | Button { | ||
330 | id: cancelButton | 332 | id: cancelButton | ||
333 | height: parent.height | ||||
331 | text: qsTr("Cancel") | 334 | text: qsTr("Cancel") | ||
332 | width: parent.width / 4 | 335 | width: parent.width / 4 | ||
333 | property bool selected: true | 336 | property bool selected: true | ||
334 | style: GCButtonStyle {} | 337 | style: GCButtonStyle {} | ||
335 | onClicked: dialogChooseLevel.close() | 338 | onClicked: dialogChooseLevel.close() | ||
336 | } | 339 | } | ||
337 | Button { | 340 | Button { | ||
338 | id: saveButton | 341 | id: saveButton | ||
342 | height: parent.height | ||||
339 | text: qsTr("Save") | 343 | text: qsTr("Save") | ||
340 | width: parent.width / 4 | 344 | width: parent.width / 4 | ||
341 | property bool selected: true | 345 | property bool selected: true | ||
342 | style: GCButtonStyle { } | 346 | style: GCButtonStyle { } | ||
343 | onClicked: { | 347 | onClicked: { | ||
344 | saveData(); | 348 | saveData(); | ||
345 | } | 349 | } | ||
346 | } | 350 | } | ||
347 | Button { | 351 | Button { | ||
348 | id: saveAndStartButton | 352 | id: saveAndStartButton | ||
353 | height: parent.height | ||||
349 | text: qsTr("Save and start") | 354 | text: qsTr("Save and start") | ||
350 | width: parent.width / 3 | 355 | width: parent.width / 3 | ||
351 | style: GCButtonStyle { } | 356 | style: GCButtonStyle { } | ||
352 | onClicked: { | 357 | onClicked: { | ||
353 | saveData(); | 358 | saveData(); | ||
354 | startActivity(); | 359 | startActivity(); | ||
355 | } | 360 | } | ||
356 | } | 361 | } | ||
Show All 18 Lines |
just for my information, what do these changes fix?