From c803830c02fb573582cd848185460ba65b4529e5 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 18 Jun 2015 14:35:54 +0200 Subject: Frame, GroupBox, ToolBar: restore contentWidth & contentHeight Change-Id: I79a974c64f6ec57ebfa83cea0857b2a1590af61f Reviewed-by: J-P Nurmi --- examples/quick/controls/mirroring/main.qml | 117 +++++++++++++++++------------ 1 file changed, 67 insertions(+), 50 deletions(-) (limited to 'examples') diff --git a/examples/quick/controls/mirroring/main.qml b/examples/quick/controls/mirroring/main.qml index 5a351993..cf691486 100644 --- a/examples/quick/controls/mirroring/main.qml +++ b/examples/quick/controls/mirroring/main.qml @@ -106,43 +106,49 @@ ApplicationWindow { GroupBox { title: "CheckBox" readonly property real preferredWidth: (flow.width - 12) / 2 - width: window.width > window.height || implicitWidth > preferredWidth ? flow.width : preferredWidth - CheckBox { + width: window.width > window.height || contentWidth > preferredWidth ? flow.width : preferredWidth + ColumnLayout { width: parent.width - text: "E-mail" - checked: true - } - CheckBox { - width: parent.width - text: "Calendar" - checked: true - } - CheckBox { - width: parent.width - text: "Contacts" + CheckBox { + width: parent.width + text: "E-mail" + checked: true + } + CheckBox { + width: parent.width + text: "Calendar" + checked: true + } + CheckBox { + width: parent.width + text: "Contacts" + } } } GroupBox { title: "RadioButton" readonly property real preferredWidth: (flow.width - 12) / 2 - width: window.width > window.height || implicitWidth > preferredWidth ? flow.width : preferredWidth + width: window.width > window.height || contentWidth > preferredWidth ? flow.width : preferredWidth ExclusiveGroup { id: eg } - RadioButton { + ColumnLayout { width: parent.width - text: "Portrait" - Exclusive.group: eg - } - RadioButton { - width: parent.width - text: "Landscape" - Exclusive.group: eg - } - RadioButton { - width: parent.width - text: "Automatic" - checked: true - Exclusive.group: eg + RadioButton { + width: parent.width + text: "Portrait" + Exclusive.group: eg + } + RadioButton { + width: parent.width + text: "Landscape" + Exclusive.group: eg + } + RadioButton { + width: parent.width + text: "Automatic" + checked: true + Exclusive.group: eg + } } } @@ -171,43 +177,54 @@ ApplicationWindow { GroupBox { title: "Switch" width: flow.width - Switch { + Column { width: parent.width - text: "Wifi" - checked: true - } - Switch { - width: parent.width - text: "Bluetooth" + Switch { + width: parent.width + text: "Wifi" + checked: true + } + Switch { + width: parent.width + text: "Bluetooth" + } } } GroupBox { title: "ProgressBar" width: flow.width - ProgressBar { + Column { width: parent.width - indeterminate: true - } - ProgressBar { - width: parent.width - value: slider.position + spacing: Theme.spacing + ProgressBar { + width: parent.width + indeterminate: true + } + ProgressBar { + width: parent.width + value: slider.position + } } } GroupBox { title: "Slider" width: flow.width - Slider { - id: slider - value: 0.4 - width: parent.width - } - Slider { + Column { width: parent.width - snapMode: AbstractSlider.SnapAlways - stepSize: 0.2 - value: 0.8 + spacing: Theme.spacing + Slider { + id: slider + value: 0.4 + width: parent.width + } + Slider { + width: parent.width + snapMode: AbstractSlider.SnapAlways + stepSize: 0.2 + value: 0.8 + } } } } -- cgit v1.2.3