diff options
Diffstat (limited to 'src/imports/controls')
137 files changed, 1495 insertions, 551 deletions
diff --git a/src/imports/controls/BusyIndicator.qml b/src/imports/controls/BusyIndicator.qml index 44c61355..9be1f046 100644 --- a/src/imports/controls/BusyIndicator.qml +++ b/src/imports/controls/BusyIndicator.qml @@ -47,7 +47,6 @@ T.BusyIndicator { padding: 6 - //! [contentItem] contentItem: BusyRing { id: ring implicitWidth: 48 @@ -61,5 +60,4 @@ T.BusyIndicator { running: control.visible && control.running } } - //! [contentItem] } diff --git a/src/imports/controls/Button.qml b/src/imports/controls/Button.qml index f875a97a..1a974eed 100644 --- a/src/imports/controls/Button.qml +++ b/src/imports/controls/Button.qml @@ -50,7 +50,6 @@ T.Button { leftPadding: padding + 2 rightPadding: padding + 2 - //! [contentItem] contentItem: Text { text: control.text font: control.font @@ -60,13 +59,10 @@ T.Button { verticalAlignment: Text.AlignVCenter elide: Text.ElideRight } - //! [contentItem] - //! [background] background: Rectangle { implicitWidth: 100 implicitHeight: 40 - opacity: enabled ? 1 : 0.3 visible: !control.flat || control.down || control.checked || control.highlighted color: control.checked || control.highlighted ? (control.visualFocus ? (control.down ? "#599bff" : "#0066ff") : (control.down ? "#585a5c" : "#353637")) : @@ -74,5 +70,4 @@ T.Button { border.color: "#0066ff" border.width: control.visualFocus ? 2 : 0 } - //! [background] } diff --git a/src/imports/controls/CheckBox.qml b/src/imports/controls/CheckBox.qml index 3615948a..632097b1 100644 --- a/src/imports/controls/CheckBox.qml +++ b/src/imports/controls/CheckBox.qml @@ -51,17 +51,13 @@ T.CheckBox { padding: 6 spacing: 6 - opacity: enabled ? 1 : 0.2 - //! [indicator] indicator: CheckIndicator { x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 y: control.topPadding + (control.availableHeight - height) / 2 control: control } - //! [indicator] - //! [contentItem] contentItem: Text { leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0 rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0 @@ -73,6 +69,6 @@ T.CheckBox { visible: control.text horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter + opacity: enabled ? 1 : 0.3 } - //! [contentItem] } diff --git a/src/imports/controls/CheckDelegate.qml b/src/imports/controls/CheckDelegate.qml index dcef7f77..96cb48e0 100644 --- a/src/imports/controls/CheckDelegate.qml +++ b/src/imports/controls/CheckDelegate.qml @@ -52,7 +52,6 @@ T.CheckDelegate { padding: 12 spacing: 12 - //! [contentItem] contentItem: Text { leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0 rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0 @@ -65,23 +64,18 @@ T.CheckDelegate { horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } - //! [contentItem] - //! [indicator] indicator: CheckIndicator { x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding y: control.topPadding + (control.availableHeight - height) / 2 control: control } - //! [indicator] - //! [background] background: Rectangle { implicitWidth: 100 implicitHeight: 40 visible: control.down || control.highlighted color: control.down ? "#bdbebf" : "#eeeeee" } - //! [background] } diff --git a/src/imports/controls/CheckIndicator.qml b/src/imports/controls/CheckIndicator.qml index d78e9e30..5aad92ef 100644 --- a/src/imports/controls/CheckIndicator.qml +++ b/src/imports/controls/CheckIndicator.qml @@ -47,6 +47,7 @@ Rectangle { color: control.enabled ? (control.down ? (control.visualFocus ? "#cce0ff" : "#f6f6f6") : "#ffffff") : "#353637" border.width: control.visualFocus ? 2 : 1 border.color: control.enabled ? (control.visualFocus ? "#0066ff" : (control.down ? "#808080" : "#909090")) : "transparent" + opacity: enabled ? 1 : 0.3 Image { x: (parent.width - width) / 2 diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml index 09930aad..31f2e5d9 100644 --- a/src/imports/controls/ComboBox.qml +++ b/src/imports/controls/ComboBox.qml @@ -54,28 +54,22 @@ T.ComboBox { leftPadding: padding + 6 rightPadding: padding + 6 - opacity: enabled ? 1 : 0.3 - - //! [delegate] delegate: ItemDelegate { width: control.popup.width text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal highlighted: control.highlightedIndex == index } - //! [delegate] - //! [indicator] indicator: Image { x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding y: control.topPadding + (control.availableHeight - height) / 2 source: "image://default/double-arrow/" + (control.visualFocus ? "#0066ff" : "#353637") sourceSize.width: width sourceSize.height: height + opacity: enabled ? 1 : 0.3 } - //! [indicator] - //! [contentItem] contentItem: Text { leftPadding: control.mirrored && control.indicator ? control.indicator.width + control.spacing : 0 rightPadding: !control.mirrored && control.indicator ? control.indicator.width + control.spacing : 0 @@ -86,10 +80,9 @@ T.ComboBox { horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter elide: Text.ElideRight + opacity: enabled ? 1 : 0.3 } - //! [contentItem] - //! [background] background: Rectangle { implicitWidth: 120 implicitHeight: 40 @@ -99,9 +92,7 @@ T.ComboBox { border.color: "#0066ff" border.width: control.visualFocus ? 2 : 0 } - //! [background] - //! [popup] popup: T.Popup { y: control.height - (control.visualFocus ? 0 : 1) width: control.width @@ -132,5 +123,4 @@ T.ComboBox { background: Rectangle { } } - //! [popup] } diff --git a/src/imports/controls/Dial.qml b/src/imports/controls/Dial.qml index aa138126..cd4d6ba2 100644 --- a/src/imports/controls/Dial.qml +++ b/src/imports/controls/Dial.qml @@ -45,7 +45,6 @@ T.Dial { implicitWidth: 184 implicitHeight: 184 - //! [background] background: DialRing { width: control.availableWidth height: control.availableHeight @@ -53,9 +52,7 @@ T.Dial { progress: control.position opacity: control.enabled ? 1 : 0.3 } - //! [background] - //! [handle] handle: Image { id: handleItem x: background.x + background.width / 2 - handle.width / 2 @@ -78,5 +75,4 @@ T.Dial { } ] } - //! [handle] } diff --git a/src/imports/controls/Drawer.qml b/src/imports/controls/Drawer.qml index 9791bf0c..6e9ab71f 100644 --- a/src/imports/controls/Drawer.qml +++ b/src/imports/controls/Drawer.qml @@ -53,19 +53,11 @@ T.Drawer { rightPadding: control.edge === Qt.LeftEdge bottomPadding: control.edge === Qt.TopEdge - //! [enter] enter: Transition { SmoothedAnimation { velocity: 5 } } - //! [enter] - - //! [exit] exit: Transition { SmoothedAnimation { velocity: 5 } } - //! [exit] - //! [contentItem] contentItem: Item { } - //! [contentItem] - //! [background] background: Rectangle { Rectangle { readonly property bool horizontal: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge @@ -76,5 +68,4 @@ T.Drawer { y: control.edge === Qt.TopEdge ? parent.height - 1 : 0 } } - //! [background] } diff --git a/src/imports/controls/Frame.qml b/src/imports/controls/Frame.qml index cb2ffd35..b7968cb4 100644 --- a/src/imports/controls/Frame.qml +++ b/src/imports/controls/Frame.qml @@ -48,14 +48,10 @@ T.Frame { padding: 12 - //! [contentItem] contentItem: Item { } - //! [contentItem] - //! [background] background: Rectangle { color: "transparent" border.color: "#bdbebf" } - //! [background] } diff --git a/src/imports/controls/GroupBox.qml b/src/imports/controls/GroupBox.qml index 0e9d79fc..31f4963f 100644 --- a/src/imports/controls/GroupBox.qml +++ b/src/imports/controls/GroupBox.qml @@ -52,11 +52,8 @@ T.GroupBox { padding: 12 topPadding: padding + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0) - //! [contentItem] contentItem: Item { } - //! [contentItem] - //! [label] label: Text { x: control.leftPadding width: control.availableWidth @@ -68,9 +65,7 @@ T.GroupBox { horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } - //! [label] - //! [background] background: Rectangle { y: control.topPadding - control.padding width: parent.width @@ -79,5 +74,4 @@ T.GroupBox { color: "transparent" border.color: "#bdbebf" } - //! [background] } diff --git a/src/imports/controls/ItemDelegate.qml b/src/imports/controls/ItemDelegate.qml index d884a328..519ef3bf 100644 --- a/src/imports/controls/ItemDelegate.qml +++ b/src/imports/controls/ItemDelegate.qml @@ -50,7 +50,6 @@ T.ItemDelegate { padding: 12 spacing: 12 - //! [contentItem] contentItem: Text { leftPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0 rightPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0 @@ -63,14 +62,11 @@ T.ItemDelegate { horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } - //! [contentItem] - //! [background] background: Rectangle { implicitWidth: 100 implicitHeight: 40 visible: control.down || control.highlighted || control.visualFocus color: control.visualFocus ? (control.pressed ? "#cce0ff" : "#e5efff") : (control.down ? "#bdbebf" : "#eeeeee") } - //! [background] } diff --git a/src/imports/controls/Menu.qml b/src/imports/controls/Menu.qml index e349a89d..d9a97cee 100644 --- a/src/imports/controls/Menu.qml +++ b/src/imports/controls/Menu.qml @@ -48,7 +48,6 @@ T.Menu { margins: 0 - //! [contentItem] contentItem: ListView { implicitHeight: contentHeight model: control.contentModel @@ -60,14 +59,11 @@ T.Menu { ScrollIndicator.vertical: ScrollIndicator {} } - //! [contentItem] - //! [background] background: Rectangle { implicitWidth: 200 implicitHeight: 40 color: "#ffffff" border.color: "#353637" } - //! [background] } diff --git a/src/imports/controls/MenuItem.qml b/src/imports/controls/MenuItem.qml index ead943b0..69f00900 100644 --- a/src/imports/controls/MenuItem.qml +++ b/src/imports/controls/MenuItem.qml @@ -49,7 +49,6 @@ T.MenuItem { padding: 6 - //! [contentItem] contentItem: Text { leftPadding: control.checkable && !control.mirrored ? control.indicator.width + control.spacing : 0 rightPadding: control.checkable && control.mirrored ? control.indicator.width + control.spacing : 0 @@ -62,9 +61,7 @@ T.MenuItem { horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } - //! [contentItem] - //! [indicator] indicator: Image { x: control.mirrored ? control.width - width - control.rightPadding : control.leftPadding y: control.topPadding + (control.availableHeight - height) / 2 @@ -72,9 +69,7 @@ T.MenuItem { visible: control.checked source: control.checkable ? "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png" : "" } - //! [indicator] - //! [background] background: Item { implicitWidth: 200 implicitHeight: 40 @@ -87,5 +82,4 @@ T.MenuItem { color: control.visualFocus || control.down ? "#eeeeee" : "transparent" } } - //! [background] } diff --git a/src/imports/controls/Page.qml b/src/imports/controls/Page.qml index 3cbb1569..4ed7efb1 100644 --- a/src/imports/controls/Page.qml +++ b/src/imports/controls/Page.qml @@ -40,13 +40,9 @@ import QtQuick.Templates 2.0 as T T.Page { id: control - //! [contentItem] contentItem: Item { } - //! [contentItem] - //! [background] background: Rectangle { color: "#ffffff" } - //! [background] } diff --git a/src/imports/controls/PageIndicator.qml b/src/imports/controls/PageIndicator.qml index 5b61acd5..933bc839 100644 --- a/src/imports/controls/PageIndicator.qml +++ b/src/imports/controls/PageIndicator.qml @@ -48,7 +48,6 @@ T.PageIndicator { padding: 6 spacing: 6 - //! [delegate] delegate: Rectangle { implicitWidth: 8 implicitHeight: 8 @@ -59,9 +58,7 @@ T.PageIndicator { opacity: index === currentIndex ? 0.95 : pressed ? 0.7 : 0.45 Behavior on opacity { OpacityAnimator { duration: 100 } } } - //! [delegate] - //! [contentItem] contentItem: Row { spacing: control.spacing @@ -70,5 +67,4 @@ T.PageIndicator { delegate: control.delegate } } - //! [contentItem] } diff --git a/src/imports/controls/Pane.qml b/src/imports/controls/Pane.qml index eb79129c..feb8eb58 100644 --- a/src/imports/controls/Pane.qml +++ b/src/imports/controls/Pane.qml @@ -48,13 +48,9 @@ T.Pane { padding: 12 - //! [contentItem] contentItem: Item { } - //! [contentItem] - //! [background] background: Rectangle { color: "#ffffff" } - //! [background] } diff --git a/src/imports/controls/ProgressBar.qml b/src/imports/controls/ProgressBar.qml index fb312b18..45e990ee 100644 --- a/src/imports/controls/ProgressBar.qml +++ b/src/imports/controls/ProgressBar.qml @@ -47,7 +47,6 @@ T.ProgressBar { implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) - //! [contentItem] contentItem: ProgressStrip { id: strip implicitHeight: 6 @@ -61,9 +60,7 @@ T.ProgressBar { running: control.visible && control.indeterminate } } - //! [contentItem] - //! [background] background: Rectangle { implicitWidth: 200 implicitHeight: 6 @@ -74,5 +71,4 @@ T.ProgressBar { color: "#e4e4e4" } - //! [background] } diff --git a/src/imports/controls/RadioButton.qml b/src/imports/controls/RadioButton.qml index 8a2d7c99..1100273a 100644 --- a/src/imports/controls/RadioButton.qml +++ b/src/imports/controls/RadioButton.qml @@ -51,17 +51,13 @@ T.RadioButton { padding: 6 spacing: 6 - opacity: enabled ? 1 : 0.2 - //! [indicator] indicator: RadioIndicator { x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 y: control.topPadding + (control.availableHeight - height) / 2 control: control } - //! [indicator] - //! [contentItem] contentItem: Text { leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0 rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0 @@ -73,6 +69,6 @@ T.RadioButton { visible: control.text horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter + opacity: enabled ? 1 : 0.3 } - //! [contentItem] } diff --git a/src/imports/controls/RadioDelegate.qml b/src/imports/controls/RadioDelegate.qml index d745054a..620417a8 100644 --- a/src/imports/controls/RadioDelegate.qml +++ b/src/imports/controls/RadioDelegate.qml @@ -52,7 +52,6 @@ T.RadioDelegate { padding: 12 spacing: 12 - //! [contentItem] contentItem: Text { leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0 rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0 @@ -65,23 +64,18 @@ T.RadioDelegate { horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } - //! [contentItem] - //! [indicator] indicator: RadioIndicator { x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding y: control.topPadding + (control.availableHeight - height) / 2 control: control } - //! [indicator] - //! [background] background: Rectangle { implicitWidth: 100 implicitHeight: 40 visible: control.down || control.highlighted color: control.down ? "#bdbebf" : "#eeeeee" } - //! [background] } diff --git a/src/imports/controls/RadioIndicator.qml b/src/imports/controls/RadioIndicator.qml index 08c24cc5..05ff6673 100644 --- a/src/imports/controls/RadioIndicator.qml +++ b/src/imports/controls/RadioIndicator.qml @@ -44,6 +44,7 @@ Rectangle { color: control.down ? (control.visualFocus ? "#cce0ff" : "#f6f6f6") : (control.visualFocus ? "#f0f6ff" : "#ffffff") border.width: control.visualFocus ? 2 : 1 border.color: control.visualFocus ? "#0066ff" : (control.down ? "#808080" : "#909090") + opacity: enabled ? 1 : 0.3 property Item control diff --git a/src/imports/controls/RangeSlider.qml b/src/imports/controls/RangeSlider.qml index 7353e2b5..181550a4 100644 --- a/src/imports/controls/RangeSlider.qml +++ b/src/imports/controls/RangeSlider.qml @@ -49,7 +49,6 @@ T.RangeSlider { padding: 6 - //! [firstHandle] first.handle: Rectangle { x: control.leftPadding + (horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2) y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height)) @@ -62,9 +61,7 @@ T.RangeSlider { readonly property bool horizontal: control.orientation === Qt.Horizontal } - //! [firstHandle] - //! [secondHandle] second.handle: Rectangle { x: control.leftPadding + (horizontal ? control.second.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2) y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.second.visualPosition * (control.availableHeight - height)) @@ -77,9 +74,7 @@ T.RangeSlider { readonly property bool horizontal: control.orientation === Qt.Horizontal } - //! [secondHandle] - //! [background] background: Rectangle { x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2) y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0) @@ -88,11 +83,9 @@ T.RangeSlider { width: horizontal ? control.availableWidth : implicitWidth height: horizontal ? implicitHeight : control.availableHeight radius: 3 - opacity: control.enabled ? 1 : 0.3 color: "#e0e0e0" scale: horizontal && control.mirrored ? -1 : 1 readonly property bool horizontal: control.orientation === Qt.Horizontal } - //! [background] } diff --git a/src/imports/controls/ScrollBar.qml b/src/imports/controls/ScrollBar.qml index 8ccbc328..c77463aa 100644 --- a/src/imports/controls/ScrollBar.qml +++ b/src/imports/controls/ScrollBar.qml @@ -47,7 +47,6 @@ T.ScrollBar { padding: 2 - //! [contentItem] contentItem: Rectangle { id: handle @@ -73,5 +72,4 @@ T.ScrollBar { } } } - //! [contentItem] } diff --git a/src/imports/controls/ScrollIndicator.qml b/src/imports/controls/ScrollIndicator.qml index cd7b53fd..c129e5b8 100644 --- a/src/imports/controls/ScrollIndicator.qml +++ b/src/imports/controls/ScrollIndicator.qml @@ -47,7 +47,6 @@ T.ScrollIndicator { padding: 2 - //! [contentItem] contentItem: Rectangle { id: indicator @@ -74,5 +73,4 @@ T.ScrollIndicator { } ] } - //! [contentItem] } diff --git a/src/imports/controls/Slider.qml b/src/imports/controls/Slider.qml index 896dbca0..5e4dc699 100644 --- a/src/imports/controls/Slider.qml +++ b/src/imports/controls/Slider.qml @@ -47,7 +47,6 @@ T.Slider { padding: 6 - //! [handle] handle: Rectangle { x: control.leftPadding + (horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2) y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height)) @@ -60,9 +59,7 @@ T.Slider { readonly property bool horizontal: control.orientation === Qt.Horizontal } - //! [handle] - //! [background] background: Rectangle { x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2) y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0) @@ -71,11 +68,9 @@ T.Slider { width: horizontal ? control.availableWidth : implicitWidth height: horizontal ? implicitHeight : control.availableHeight radius: 3 - opacity: control.enabled ? 1 : 0.3 color: "#e0e0e0" scale: horizontal && control.mirrored ? -1 : 1 readonly property bool horizontal: control.orientation === Qt.Horizontal } - //! [background] } diff --git a/src/imports/controls/SpinBox.qml b/src/imports/controls/SpinBox.qml index 89853116..dee368e2 100644 --- a/src/imports/controls/SpinBox.qml +++ b/src/imports/controls/SpinBox.qml @@ -54,15 +54,12 @@ T.SpinBox { leftPadding: padding + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0)) rightPadding: padding + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0)) - //! [validator] validator: IntValidator { locale: control.locale.name bottom: Math.min(control.from, control.to) top: Math.max(control.from, control.to) } - //! [validator] - //! [contentItem] contentItem: TextInput { z: 2 text: control.textFromValue(control.value, control.locale) @@ -90,9 +87,7 @@ T.SpinBox { border.width: 2 } } - //! [contentItem] - //! [up.indicator] up.indicator: Rectangle { x: control.mirrored ? 0 : parent.width - width height: parent.height @@ -115,9 +110,7 @@ T.SpinBox { color: enabled ? "#353637" : "#bdbebf" } } - //! [up.indicator] - //! [down.indicator] down.indicator: Rectangle { x: control.mirrored ? parent.width - width : 0 height: parent.height @@ -133,13 +126,9 @@ T.SpinBox { color: enabled ? "#353637" : "#bdbebf" } } - //! [down.indicator] - //! [background] background: Rectangle { - opacity: control.enabled ? 1 : 0.3 implicitWidth: 140 border.color: "#e0e0e0" } - //! [background] } diff --git a/src/imports/controls/StackView.qml b/src/imports/controls/StackView.qml index aa95c6a7..f70ecf97 100644 --- a/src/imports/controls/StackView.qml +++ b/src/imports/controls/StackView.qml @@ -41,39 +41,27 @@ import QtQuick.Templates 2.0 as T T.StackView { id: control - //! [popEnter] popEnter: Transition { XAnimator { from: (control.mirrored ? -1 : 1) * -control.width; to: 0; duration: 400; easing.type: Easing.OutCubic } } - //! [popEnter] - //! [popExit] popExit: Transition { XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * control.width; duration: 400; easing.type: Easing.OutCubic } } - //! [popExit] - //! [pushEnter] pushEnter: Transition { XAnimator { from: (control.mirrored ? -1 : 1) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic } } - //! [pushEnter] - //! [pushExit] pushExit: Transition { XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * -control.width; duration: 400; easing.type: Easing.OutCubic } } - //! [pushExit] - //! [replaceEnter] replaceEnter: Transition { XAnimator { from: (control.mirrored ? -1 : 1) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic } } - //! [replaceEnter] - //! [replaceExit] replaceExit: Transition { XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * -control.width; duration: 400; easing.type: Easing.OutCubic } } - //! [replaceExit] } diff --git a/src/imports/controls/SwipeDelegate.qml b/src/imports/controls/SwipeDelegate.qml index 7ffd5a29..6c84dae0 100644 --- a/src/imports/controls/SwipeDelegate.qml +++ b/src/imports/controls/SwipeDelegate.qml @@ -50,7 +50,6 @@ T.SwipeDelegate { padding: 12 spacing: 12 - //! [contentItem] contentItem: Text { leftPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0 rightPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0 @@ -71,9 +70,7 @@ T.SwipeDelegate { } } } - //! [contentItem] - //! [background] background: Rectangle { color: control.visualFocus ? (control.down ? "#cce0ff" : "#e5efff") : (control.down ? "#bdbebf" : "#ffffff") @@ -85,5 +82,4 @@ T.SwipeDelegate { } } } - //! [background] } diff --git a/src/imports/controls/SwipeView.qml b/src/imports/controls/SwipeView.qml index 71676f12..c4e5a570 100644 --- a/src/imports/controls/SwipeView.qml +++ b/src/imports/controls/SwipeView.qml @@ -46,9 +46,6 @@ T.SwipeView { implicitHeight: Math.max(background ? background.implicitHeight : 0, contentItem.implicitHeight + topPadding + bottomPadding) - Accessible.role: Accessible.PageTabList - - //! [contentItem] contentItem: ListView { model: control.contentModel currentIndex: control.currentIndex @@ -63,5 +60,4 @@ T.SwipeView { preferredHighlightEnd: 0 highlightMoveDuration: 250 } - //! [contentItem] } diff --git a/src/imports/controls/Switch.qml b/src/imports/controls/Switch.qml index 0810626f..b4717d05 100644 --- a/src/imports/controls/Switch.qml +++ b/src/imports/controls/Switch.qml @@ -52,15 +52,12 @@ T.Switch { padding: 6 spacing: 6 - //! [indicator] indicator: SwitchIndicator { x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 y: control.topPadding + (control.availableHeight - height) / 2 control: control } - //! [indicator] - //! [contentItem] contentItem: Text { leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0 rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0 @@ -73,5 +70,4 @@ T.Switch { horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } - //! [contentItem] } diff --git a/src/imports/controls/SwitchDelegate.qml b/src/imports/controls/SwitchDelegate.qml index 430fc8ec..f5383628 100644 --- a/src/imports/controls/SwitchDelegate.qml +++ b/src/imports/controls/SwitchDelegate.qml @@ -52,15 +52,12 @@ T.SwitchDelegate { padding: 12 spacing: 12 - //! [indicator] indicator: SwitchIndicator { x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2 y: control.topPadding + (control.availableHeight - height) / 2 control: control } - //! [indicator] - //! [contentItem] contentItem: Text { leftPadding: control.indicator && !control.mirrored ? 0 : control.indicator.width + control.spacing rightPadding: control.indicator && control.mirrored ? 0 : control.indicator.width + control.spacing @@ -73,14 +70,11 @@ T.SwitchDelegate { horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } - //! [contentItem] - //! [background] background: Rectangle { implicitWidth: 100 implicitHeight: 40 visible: control.down || control.highlighted color: control.down ? "#bdbebf" : "#eeeeee" } - //! [background] } diff --git a/src/imports/controls/SwitchIndicator.qml b/src/imports/controls/SwitchIndicator.qml index f11f7147..261d9999 100644 --- a/src/imports/controls/SwitchIndicator.qml +++ b/src/imports/controls/SwitchIndicator.qml @@ -47,7 +47,6 @@ Item { width: 56 height: 16 radius: 8 - opacity: control.enabled ? 1 : 0.3 color: control.checked ? (control.visualFocus ? "#0066ff" : "#353637") : "#e0e0e0" border.width: control.visualFocus ? 2 : 0 border.color: "#0066ff" diff --git a/src/imports/controls/TabBar.qml b/src/imports/controls/TabBar.qml index 6a575167..22b5329e 100644 --- a/src/imports/controls/TabBar.qml +++ b/src/imports/controls/TabBar.qml @@ -47,7 +47,6 @@ T.TabBar { spacing: 1 - //! [contentItem] contentItem: ListView { implicitWidth: contentWidth implicitHeight: 40 @@ -66,9 +65,6 @@ T.TabBar { preferredHighlightBegin: 40 preferredHighlightEnd: width - 40 } - //! [contentItem] - //! [background] background: Rectangle { } - //! [background] } diff --git a/src/imports/controls/TabButton.qml b/src/imports/controls/TabButton.qml index 56b57602..2c5b2708 100644 --- a/src/imports/controls/TabButton.qml +++ b/src/imports/controls/TabButton.qml @@ -48,7 +48,6 @@ T.TabButton { padding: 6 - //! [contentItem] contentItem: Text { text: control.text font: control.font @@ -58,12 +57,9 @@ T.TabButton { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } - //! [contentItem] - //! [background] background: Rectangle { implicitHeight: 40 color: control.down ? (control.checked ? "#e4e4e4" : "#585a5c") : (control.checked ? "transparent" : "#353637") } - //! [background] } diff --git a/src/imports/controls/TextField.qml b/src/imports/controls/TextField.qml index 35703940..fc07e7bb 100644 --- a/src/imports/controls/TextField.qml +++ b/src/imports/controls/TextField.qml @@ -72,7 +72,6 @@ T.TextField { elide: Text.ElideRight } - //! [background] background: Rectangle { implicitWidth: 200 implicitHeight: 40 @@ -80,5 +79,4 @@ T.TextField { color: control.enabled ? "#ffffff" : "#353637" border.color: control.activeFocus ? "#0066ff" : (control.enabled ? "#bdbebf" : "transparent") } - //! [background] } diff --git a/src/imports/controls/ToolBar.qml b/src/imports/controls/ToolBar.qml index a787df61..02b6c6f3 100644 --- a/src/imports/controls/ToolBar.qml +++ b/src/imports/controls/ToolBar.qml @@ -46,14 +46,10 @@ T.ToolBar { contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) - //! [contentItem] contentItem: Item { } - //! [contentItem] - //! [background] background: Rectangle { implicitHeight: 40 color: "#eeeeee" } - //! [background] } diff --git a/src/imports/controls/ToolButton.qml b/src/imports/controls/ToolButton.qml index 2887d6b4..1fda5ba3 100644 --- a/src/imports/controls/ToolButton.qml +++ b/src/imports/controls/ToolButton.qml @@ -48,7 +48,6 @@ T.ToolButton { padding: 6 - //! [contentItem] contentItem: Text { text: control.text font: control.font @@ -57,9 +56,7 @@ T.ToolButton { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } - //! [contentItem] - //! [background] background: Rectangle { implicitWidth: 40 implicitHeight: 40 @@ -68,5 +65,4 @@ T.ToolButton { opacity: control.down ? 1.0 : control.enabled && (control.checked || control.highlighted) ? 0.5 : 0 visible: control.down || (control.enabled && (control.checked || control.highlighted)) } - //! [background] } diff --git a/src/imports/controls/ToolTip.qml b/src/imports/controls/ToolTip.qml index 876e2274..322757c7 100644 --- a/src/imports/controls/ToolTip.qml +++ b/src/imports/controls/ToolTip.qml @@ -54,17 +54,13 @@ T.ToolTip { closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent - //! [contentItem] contentItem: Text { text: control.text font: control.font // TODO: wrapMode: Label.Wrap } - //! [contentItem] - //! [background] background: Rectangle { border.color: "#353637" } - //! [background] } diff --git a/src/imports/controls/Tumbler.qml b/src/imports/controls/Tumbler.qml index 13bc0859..571d8089 100644 --- a/src/imports/controls/Tumbler.qml +++ b/src/imports/controls/Tumbler.qml @@ -43,7 +43,6 @@ T.Tumbler { implicitWidth: 60 implicitHeight: 200 - //! [delegate] delegate: Text { id: label text: modelData @@ -53,9 +52,7 @@ T.Tumbler { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } - //! [delegate] - //! [contentItem] contentItem: PathView { id: pathView model: control.model @@ -77,5 +74,4 @@ T.Tumbler { property real delegateHeight: control.availableHeight / control.visibleItemCount } - //! [contentItem] } diff --git a/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gif b/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gif Binary files differindex 31ab2d1c..653d200f 100644 --- a/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gif +++ b/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkbox-tristate.gif b/src/imports/controls/doc/images/qtquickcontrols2-checkbox-tristate.gif Binary files differindex 50986f1b..56a15867 100644 --- a/src/imports/controls/doc/images/qtquickcontrols2-checkbox-tristate.gif +++ b/src/imports/controls/doc/images/qtquickcontrols2-checkbox-tristate.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkbox.gif b/src/imports/controls/doc/images/qtquickcontrols2-checkbox.gif Binary files differindex beacdb37..d70c0ee4 100644 --- a/src/imports/controls/doc/images/qtquickcontrols2-checkbox.gif +++ b/src/imports/controls/doc/images/qtquickcontrols2-checkbox.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkbox.png b/src/imports/controls/doc/images/qtquickcontrols2-checkbox.png Binary files differdeleted file mode 100644 index a824949c..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-checkbox.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate-tristate.gif b/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate-tristate.gif Binary files differnew file mode 100644 index 00000000..8d058d6c --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate-tristate.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate.gif b/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate.gif Binary files differindex d379f63c..da3fab98 100644 --- a/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate.gif +++ b/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-combobox.gif b/src/imports/controls/doc/images/qtquickcontrols2-combobox.gif Binary files differnew file mode 100644 index 00000000..966a2d4a --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-combobox.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-combobox.png b/src/imports/controls/doc/images/qtquickcontrols2-combobox.png Binary files differdeleted file mode 100644 index e687fb0e..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-combobox.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-drawer.gif b/src/imports/controls/doc/images/qtquickcontrols2-drawer.gif Binary files differnew file mode 100644 index 00000000..736f34f6 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-drawer.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate.gif b/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate.gif Binary files differindex 0e8554ff..dccb6efc 100644 --- a/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate.gif +++ b/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material-accent.png b/src/imports/controls/doc/images/qtquickcontrols2-material-accent.png Binary files differnew file mode 100644 index 00000000..be0c8212 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-material-accent.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material-background.png b/src/imports/controls/doc/images/qtquickcontrols2-material-background.png Binary files differnew file mode 100644 index 00000000..132fb538 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-material-background.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material-button.png b/src/imports/controls/doc/images/qtquickcontrols2-material-button.png Binary files differdeleted file mode 100644 index 5181d8b1..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-material-button.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material-elevation.png b/src/imports/controls/doc/images/qtquickcontrols2-material-elevation.png Binary files differnew file mode 100644 index 00000000..38c6dc00 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-material-elevation.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material-foreground.png b/src/imports/controls/doc/images/qtquickcontrols2-material-foreground.png Binary files differnew file mode 100644 index 00000000..122f7f9b --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-material-foreground.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material-theme.png b/src/imports/controls/doc/images/qtquickcontrols2-material-theme.png Binary files differnew file mode 100644 index 00000000..7109f57f --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-material-theme.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-popup.png b/src/imports/controls/doc/images/qtquickcontrols2-popup.png Binary files differnew file mode 100644 index 00000000..4514948d --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-popup.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-popup.svg b/src/imports/controls/doc/images/qtquickcontrols2-popup.svg new file mode 100644 index 00000000..1d78addf --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-popup.svg @@ -0,0 +1,391 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="679.31317" + height="357.84125" + viewBox="0 0 679.31314 357.84124" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="qtquickcontrols2-popup.svg" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <marker + inkscape:stockid="TriangleOutL" + orient="auto" + refY="0" + refX="0" + id="TriangleOutL" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path4327" + d="m 5.77,0 -8.65,5 0,-10 8.65,5 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="scale(0.8,0.8)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="TriangleInL" + orient="auto" + refY="0" + refX="0" + id="TriangleInL" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path4318" + d="m 5.77,0 -8.65,5 0,-10 8.65,5 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="scale(-0.8,-0.8)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Mstart" + orient="auto" + refY="0" + refX="0" + id="Arrow1Mstart" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path4191" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(0.4,0,0,0.4,4,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow2Mend" + orient="auto" + refY="0" + refX="0" + id="Arrow2Mend" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path4212" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" + transform="scale(-0.6,-0.6)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="TriangleInL" + orient="auto" + refY="0" + refX="0" + id="TriangleInL-2" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path4318-4" + d="m 5.77,0 -8.65,5 0,-10 8.65,5 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="scale(-0.8,-0.8)" /> + </marker> + <marker + inkscape:stockid="TriangleOutL" + orient="auto" + refY="0" + refX="0" + id="TriangleOutL-9" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path4327-1" + d="m 5.77,0 -8.65,5 0,-10 8.65,5 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="scale(0.8,0.8)" /> + </marker> + <marker + inkscape:stockid="TriangleInL" + orient="auto" + refY="0" + refX="0" + id="TriangleInL-3" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path4318-9" + d="m 5.77,0 -8.65,5 0,-10 8.65,5 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="scale(-0.8,-0.8)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="TriangleOutL" + orient="auto" + refY="0" + refX="0" + id="TriangleOutL-0" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path4327-5" + d="m 5.77,0 -8.65,5 0,-10 8.65,5 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="scale(0.8,0.8)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="TriangleInL" + orient="auto" + refY="0" + refX="0" + id="TriangleInL-9" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path4318-2" + d="m 5.77,0 -8.65,5 0,-10 8.65,5 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="scale(-0.8,-0.8)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="TriangleOutL" + orient="auto" + refY="0" + refX="0" + id="TriangleOutL-1" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path4327-2" + d="m 5.77,0 -8.65,5 0,-10 8.65,5 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="scale(0.8,0.8)" + inkscape:connector-curvature="0" /> + </marker> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.4" + inkscape:cx="359.69451" + inkscape:cy="143.84745" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1920" + inkscape:window-height="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + units="px" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(91.482322,-255.11685)"> + <rect + style="fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect4136" + width="564.41473" + height="248.82799" + x="-30.289024" + y="321.69858" /> + <flowRoot + xml:space="preserve" + id="flowRoot4138" + style="font-style:normal;font-weight:normal;font-size:15.41801071px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="matrix(1.1690183,0,0,1.1690183,19.800223,-141.31953)"><flowRegion + id="flowRegion4140"><rect + id="rect4142" + width="129.78784" + height="31.668232" + x="-34.519978" + y="400.22751" + style="font-size:15.41801071px;fill:#000000" /></flowRegion><flowPara + id="flowPara4144" + style="font-size:20.55734825px;fill:#000000">Background</flowPara><flowPara + id="flowPara4146" /></flowRoot> <rect + style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:27.60000038;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.58381503" + id="rect4148" + width="464.22452" + height="165.94499" + x="18.895706" + y="364.74274" /> + <flowRoot + xml:space="preserve" + id="flowRoot4138-6" + style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="matrix(0.6007979,0,0,0.6007979,144.03104,146.23557)"><flowRegion + id="flowRegion4140-6"><rect + id="rect4142-6" + width="334.36047" + height="80.812172" + x="42.426407" + y="481.62601" + style="font-size:40px;fill:#000000" /></flowRegion><flowPara + id="flowPara4146-6">Content item</flowPara></flowRoot> <path + style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.04880464;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL);marker-end:url(#TriangleOutL)" + d="m 27.018805,516.90108 0,-133.62042" + id="path4179" + inkscape:connector-curvature="0" /> + <path + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.93839902;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL-2);marker-end:url(#TriangleOutL-9)" + d="m 26.776662,538.68728 451.028788,0" + id="path4179-7" + inkscape:connector-curvature="0" /> + <flowRoot + xml:space="preserve" + id="flowRoot4138-6-2" + style="font-style:normal;font-weight:normal;font-size:20px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="matrix(0.6007979,0,0,0.6007979,10.003309,144.31674)"><flowRegion + id="flowRegion4140-6-6"><rect + id="rect4142-6-1" + width="117.17769" + height="101.01524" + x="42.426407" + y="481.62601" + style="font-size:20px;fill:#000000" /></flowRegion><flowPara + id="flowPara9732" + style="font-size:17.5px;fill:#000000">Available height</flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot4138-6-2-7" + style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="matrix(0.6007979,0,0,0.6007979,10.811464,253.07573)"><flowRegion + id="flowRegion4140-6-6-4"><rect + id="rect4142-6-1-4" + width="252.53812" + height="61.619293" + x="42.426407" + y="481.62601" + style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara + style="font-size:17.5px;fill:#000000" + id="flowPara10048">Available width</flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot4138-6-1" + style="font-style:normal;font-weight:normal;font-size:25px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="matrix(0.6007979,0,0,0.6007979,210.99354,300.96896)"><flowRegion + id="flowRegion4140-6-9"><rect + id="rect4142-6-0" + width="270.72089" + height="68.690361" + x="42.426407" + y="481.62601" + style="font-size:25px;fill:#000000" /></flowRegion><flowPara + id="flowPara4146-6-2" + style="font-size:17.5px">Width</flowPara></flowRoot> <path + style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.90119678;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL-3);marker-end:url(#TriangleOutL-0)" + d="m -26.522148,583.27143 557.292688,0" + id="path4179-8" + inkscape:connector-curvature="0" /> + <path + style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.9011969;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL-9);marker-end:url(#TriangleOutL-1)" + d="m -43.461661,566.30584 0,-239.7552" + id="path4179-9" + inkscape:connector-curvature="0" /> + <flowRoot + xml:space="preserve" + id="flowRoot4138-6-1-7" + style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="matrix(0.6007979,0,0,0.6007979,-112.00353,150.83655)"><flowRegion + id="flowRegion4140-6-9-7"><rect + id="rect4142-6-0-5" + width="270.72089" + height="68.690361" + x="42.426407" + y="481.62601" + style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara + id="flowPara4146-6-2-9" + style="font-size:17.5px;fill:#000000">Height</flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot4138-6-3" + style="font-style:normal;font-weight:normal;font-size:60px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="matrix(0.6007979,0,0,0.6007979,166.31611,-24.786365)"><flowRegion + id="flowRegion4140-6-67"><rect + id="rect4142-6-5" + width="334.36047" + height="80.812172" + x="42.426407" + y="481.62601" + style="font-size:60px;fill:#000000" /></flowRegion><flowPara + id="flowPara4146-6-3">Popup</flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot4138-6-2-7-5" + style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="matrix(0.6007979,0,0,0.6007979,186.57489,257.45801)"><flowRegion + id="flowRegion4140-6-6-4-6"><rect + id="rect4142-6-1-4-2" + width="252.53812" + height="61.619293" + x="42.426407" + y="481.62601" + style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara + style="font-size:17.5px;fill:#000000" + id="flowPara10048-9">Bottom padding</flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot4138-6-2-7-5-1" + style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="matrix(0.6007979,0,0,0.6007979,193.9747,48.798368)"><flowRegion + id="flowRegion4140-6-6-4-6-2"><rect + id="rect4142-6-1-4-2-7" + width="252.53812" + height="61.619293" + x="42.426407" + y="481.62601" + style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara + style="font-size:17.5px;fill:#000000" + id="flowPara10048-9-0">Top padding</flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot4138-6-2-7-5-9" + style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="matrix(0.6007979,0,0,0.6007979,457.80767,148.11921)"><flowRegion + id="flowRegion4140-6-6-4-6-3"><rect + id="rect4142-6-1-4-2-6" + width="81.109558" + height="93.762154" + x="42.426407" + y="481.62601" + style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara + style="font-size:17.5px;line-height:125%;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000" + id="flowPara4386">Right padding</flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot4138-6-2-7-5-9-2" + style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="matrix(0.6007979,0,0,0.6007979,-54.735211,151.06168)"><flowRegion + id="flowRegion4140-6-6-4-6-3-5"><rect + id="rect4142-6-1-4-2-6-4" + width="81.109558" + height="93.762154" + x="42.426407" + y="481.62601" + style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara + style="font-size:17.02554321px;line-height:125%;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000" + id="flowPara4386-0">Left padding</flowPara></flowRoot> </g> +</svg> diff --git a/src/imports/controls/doc/images/qtquickcontrols2-progressbar-disabled.png b/src/imports/controls/doc/images/qtquickcontrols2-progressbar-disabled.png Binary files differdeleted file mode 100644 index 9ce19e92..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-progressbar-disabled.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-progressbar-indeterminate.gif b/src/imports/controls/doc/images/qtquickcontrols2-progressbar-indeterminate.gif Binary files differnew file mode 100644 index 00000000..d6756d16 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-progressbar-indeterminate.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-progressbar-indeterminate.png b/src/imports/controls/doc/images/qtquickcontrols2-progressbar-indeterminate.png Binary files differdeleted file mode 100644 index ec2e9ae9..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-progressbar-indeterminate.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-progressbar-normal.png b/src/imports/controls/doc/images/qtquickcontrols2-progressbar-normal.png Binary files differdeleted file mode 100644 index 9ce19e92..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-progressbar-normal.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-progressbar.gif b/src/imports/controls/doc/images/qtquickcontrols2-progressbar.gif Binary files differnew file mode 100644 index 00000000..49af5f45 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-progressbar.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-checked.png b/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-checked.png Binary files differdeleted file mode 100644 index d22a595b..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-checked.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-disabled.png b/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-disabled.png Binary files differdeleted file mode 100644 index 11a99d6f..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-disabled.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-focused.png b/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-focused.png Binary files differdeleted file mode 100644 index d7c79ed1..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-focused.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-normal.png b/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-normal.png Binary files differdeleted file mode 100644 index 8a49bf58..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-normal.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton.gif b/src/imports/controls/doc/images/qtquickcontrols2-radiobutton.gif Binary files differnew file mode 100644 index 00000000..4cbf3ed9 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-radiobutton.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton.png b/src/imports/controls/doc/images/qtquickcontrols2-radiobutton.png Binary files differdeleted file mode 100644 index 6c217968..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-radiodelegate.gif b/src/imports/controls/doc/images/qtquickcontrols2-radiodelegate.gif Binary files differindex 851064e9..b6afd6fe 100644 --- a/src/imports/controls/doc/images/qtquickcontrols2-radiodelegate.gif +++ b/src/imports/controls/doc/images/qtquickcontrols2-radiodelegate.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-scrollbar-non-attached.png b/src/imports/controls/doc/images/qtquickcontrols2-scrollbar-non-attached.png Binary files differnew file mode 100644 index 00000000..8817ad5c --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-scrollbar-non-attached.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-non-attached.png b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-non-attached.png Binary files differnew file mode 100644 index 00000000..758e0451 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-non-attached.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator.gif b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator.gif Binary files differnew file mode 100644 index 00000000..73007820 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator.png b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator.png Binary files differdeleted file mode 100644 index ea0923cc..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-disabled.png b/src/imports/controls/doc/images/qtquickcontrols2-slider-disabled.png Binary files differdeleted file mode 100644 index 919a9a2b..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-slider-disabled.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-focused.png b/src/imports/controls/doc/images/qtquickcontrols2-slider-focused.png Binary files differdeleted file mode 100644 index e6c4179c..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-slider-focused.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-normal.png b/src/imports/controls/doc/images/qtquickcontrols2-slider-normal.png Binary files differdeleted file mode 100644 index e6c4179c..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-slider-normal.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-nosnap.gif b/src/imports/controls/doc/images/qtquickcontrols2-slider-nosnap.gif Binary files differnew file mode 100644 index 00000000..ab233c5b --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-slider-nosnap.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-snapalways.gif b/src/imports/controls/doc/images/qtquickcontrols2-slider-snapalways.gif Binary files differnew file mode 100644 index 00000000..8eb4011f --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-slider-snapalways.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-snaponrelease.gif b/src/imports/controls/doc/images/qtquickcontrols2-slider-snaponrelease.gif Binary files differnew file mode 100644 index 00000000..f3b1d5c7 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-slider-snaponrelease.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider.gif b/src/imports/controls/doc/images/qtquickcontrols2-slider.gif Binary files differindex 7cb84b56..2ee56334 100644 --- a/src/imports/controls/doc/images/qtquickcontrols2-slider.gif +++ b/src/imports/controls/doc/images/qtquickcontrols2-slider.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider.png b/src/imports/controls/doc/images/qtquickcontrols2-slider.png Binary files differdeleted file mode 100644 index 2e27a604..00000000 --- a/src/imports/controls/doc/images/qtquickcontrols2-slider.png +++ /dev/null diff --git a/src/imports/controls/doc/images/qtquickcontrols2-stackview-pop.gif b/src/imports/controls/doc/images/qtquickcontrols2-stackview-pop.gif Binary files differnew file mode 100644 index 00000000..1971c2e0 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-stackview-pop.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-stackview-push.gif b/src/imports/controls/doc/images/qtquickcontrols2-stackview-push.gif Binary files differnew file mode 100644 index 00000000..0218cc0f --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-stackview-push.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-stackview-replace.gif b/src/imports/controls/doc/images/qtquickcontrols2-stackview-replace.gif Binary files differnew file mode 100644 index 00000000..63a6b2b4 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-stackview-replace.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-stackview-unwind.gif b/src/imports/controls/doc/images/qtquickcontrols2-stackview-unwind.gif Binary files differnew file mode 100644 index 00000000..28c051d8 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-stackview-unwind.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-swipeview.gif b/src/imports/controls/doc/images/qtquickcontrols2-swipeview.gif Binary files differnew file mode 100644 index 00000000..4af26c10 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-swipeview.gif diff --git a/src/imports/controls/doc/images/qtquickcontrols2-toolbar.png b/src/imports/controls/doc/images/qtquickcontrols2-toolbar.png Binary files differindex f4808ca9..1fe353cc 100644 --- a/src/imports/controls/doc/images/qtquickcontrols2-toolbar.png +++ b/src/imports/controls/doc/images/qtquickcontrols2-toolbar.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tooltip.png b/src/imports/controls/doc/images/qtquickcontrols2-tooltip.png Binary files differindex 0a4d57e5..902d6ee5 100644 --- a/src/imports/controls/doc/images/qtquickcontrols2-tooltip.png +++ b/src/imports/controls/doc/images/qtquickcontrols2-tooltip.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-universal-accent.png b/src/imports/controls/doc/images/qtquickcontrols2-universal-accent.png Binary files differnew file mode 100644 index 00000000..be1a4a89 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-universal-accent.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-universal-background.png b/src/imports/controls/doc/images/qtquickcontrols2-universal-background.png Binary files differnew file mode 100644 index 00000000..c91ab14d --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-universal-background.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-universal-foreground.png b/src/imports/controls/doc/images/qtquickcontrols2-universal-foreground.png Binary files differnew file mode 100644 index 00000000..e06b573b --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-universal-foreground.png diff --git a/src/imports/controls/doc/images/qtquickcontrols2-universal-theme.png b/src/imports/controls/doc/images/qtquickcontrols2-universal-theme.png Binary files differnew file mode 100644 index 00000000..f299b853 --- /dev/null +++ b/src/imports/controls/doc/images/qtquickcontrols2-universal-theme.png diff --git a/src/imports/controls/doc/qtquickcontrols2.qdocconf b/src/imports/controls/doc/qtquickcontrols2.qdocconf index e83e418e..a9a48343 100644 --- a/src/imports/controls/doc/qtquickcontrols2.qdocconf +++ b/src/imports/controls/doc/qtquickcontrols2.qdocconf @@ -35,7 +35,6 @@ depends = qtcore qtgui qtdoc qtqml qtquick qtquickdialogs qtquickcontrols qtquic # Note: paths passed to \example command must contain the parent directory, e.g. # \example controls/tabs exampledirs += ../../../../examples/quickcontrols2 \ - ../ \ ../../../quicktemplates2 \ ../../calendar \ ../../../../tests/auto/controls/data \ diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-material-accent.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-material-accent.qml new file mode 100644 index 00000000..5238d876 --- /dev/null +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-material-accent.qml @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Controls 2.0 +import QtQuick.Controls.Material 2.0 + +Pane { + padding: 4 + +//! [1] +Button { + text: qsTr("Button") + highlighted: true + Material.accent: Material.Orange +} +//! [1] +} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-material-background.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-material-background.qml new file mode 100644 index 00000000..264d5d28 --- /dev/null +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-material-background.qml @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 2.0 +import QtQuick.Controls.Material 2.0 + +Pane { + padding: 4 + +//! [1] +Button { + text: qsTr("Button") + highlighted: true + Material.background: Material.Teal +} +//! [1] +} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-material-elevation.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-material-elevation.qml new file mode 100644 index 00000000..3ce1a722 --- /dev/null +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-material-elevation.qml @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 2.0 +import QtQuick.Controls.Material 2.0 + +Pane { + contentWidth: 120 + contentHeight: 120 + padding: 10 + bottomPadding: 20 + +//! [1] +Pane { + width: 120 + height: 120 + + Material.elevation: 6 + + Label { + text: qsTr("I'm a card!") + anchors.centerIn: parent + } +} +//! [1] +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-checked.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-material-foreground.qml index c1b1acce..1fe96121 100644 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-checked.qml +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-material-foreground.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2016 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -27,8 +27,15 @@ import QtQuick 2.0 import QtQuick.Controls 2.0 +import QtQuick.Controls.Material 2.0 -RadioButton { - text: "Checked" - checked: true +Pane { + padding: 4 + +//! [1] +Button { + text: qsTr("Button") + Material.foreground: Material.Pink +} +//! [1] } diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-normal.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-material-theme.qml index a332d4c5..6bd91d5d 100644 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-normal.qml +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-material-theme.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2016 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -27,7 +27,18 @@ import QtQuick 2.0 import QtQuick.Controls 2.0 +import QtQuick.Controls.Material 2.0 -ProgressBar { - value: 0.5 +Pane { + padding: 10 + +//! [1] +Pane { + Material.theme: Material.Dark + + Button { + text: qsTr("Button") + } +} +//! [1] } diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-non-attached.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-non-attached.qml new file mode 100644 index 00000000..f80ebfe2 --- /dev/null +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-non-attached.qml @@ -0,0 +1,93 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 +import QtQuick.Controls 2.0 + +Item { + width: 200 + height: 200 + +//! [1] +Rectangle { + id: frame + clip: true + width: 160 + height: 160 + border.color: "black" + anchors.centerIn: parent + + Text { + id: content + text: "ABC" + font.pixelSize: 160 + x: -hbar.position * width + y: -vbar.position * height + } + + ScrollBar { + id: vbar + hoverEnabled: true + active: hovered || pressed + orientation: Qt.Vertical + size: frame.height / content.height + anchors.top: parent.top + anchors.right: parent.right + anchors.bottom: parent.bottom + } + + ScrollBar { + id: hbar + hoverEnabled: true + active: hovered || pressed + orientation: Qt.Horizontal + size: frame.width / content.width + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + } +} +//! [1] + +Component.onCompleted: { + hbar.active = true + vbar.active = true +} +} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-non-attached.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-non-attached.qml new file mode 100644 index 00000000..2734f33a --- /dev/null +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-non-attached.qml @@ -0,0 +1,97 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 +import QtQuick.Controls 2.0 + +Item { + width: 200 + height: 200 + +//! [1] +Rectangle { + id: frame + clip: true + width: 160 + height: 160 + border.color: "black" + anchors.centerIn: parent + + Text { + id: content + text: "ABC" + font.pixelSize: 169 + + MouseArea { + id: mouseArea + drag.target: content + drag.minimumX: frame.width - width + drag.minimumY: frame.height - height + drag.maximumX: 0 + drag.maximumY: 0 + anchors.fill: content + } + } + + ScrollIndicator { + id: verticalIndicator + active: mouseArea.pressed + orientation: Qt.Vertical + size: frame.height / content.height + position: -content.y / content.height + anchors { top: parent.top; right: parent.right; bottom: parent.bottom } + } + + ScrollIndicator { + id: horizontalIndicator + active: mouseArea.pressed + orientation: Qt.Horizontal + size: frame.width / content.width + position: -content.x / content.width + anchors { left: parent.left; right: parent.right; bottom: parent.bottom } + } +} +//! [1] + +Component.onCompleted: { + horizontalIndicator.active = true; + verticalIndicator.active = true; +} +} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate.qml new file mode 100644 index 00000000..db077057 --- /dev/null +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate.qml @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 +import QtQuick.Controls 2.0 + +//! [1] +ListView { + width: 200 + height: 300 + clip: true + model: ListModel { + id: listModel + ListElement { title: "Electricity bill" } + ListElement { title: "Happy Birthday!" } + ListElement { title: "FW: Cat pictures" } + ListElement { title: "Hotel visit receipt" } + ListElement { title: "Customer service" } + } + delegate: SwipeDelegate { + id: swipeDelegate + text: title + width: parent.width + + onClicked: if (swipe.complete) listModel.remove(index) + + swipe.right: Rectangle { + color: swipeDelegate.swipe.complete && swipeDelegate.pressed ? "#333" : "#444" + width: parent.width + height: parent.height + + Label { + font.pixelSize: swipeDelegate.font.pixelSize + text: qsTr("Remove") + color: "white" + anchors.centerIn: parent + } + } + } +} +//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-universal-accent.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-accent.qml new file mode 100644 index 00000000..afcfa87f --- /dev/null +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-accent.qml @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Controls 2.0 +import QtQuick.Controls.Universal 2.0 + +Pane { + padding: 10 + +//! [1] +Button { + text: qsTr("Button") + highlighted: true + Universal.accent: Universal.Orange +} +//! [1] +} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-universal-background.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-background.qml new file mode 100644 index 00000000..32a1b43b --- /dev/null +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-background.qml @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 2.0 +import QtQuick.Controls.Universal 2.0 + +Pane { + padding: 10 + +//! [1] +Pane { + Universal.background: Universal.Steel + + Button { + text: qsTr("Button") + } +} +//! [1] +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-disabled.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-foreground.qml index 7ab68910..6ca35d74 100644 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-disabled.qml +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-foreground.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2016 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -27,8 +27,15 @@ import QtQuick 2.0 import QtQuick.Controls 2.0 +import QtQuick.Controls.Universal 2.0 -RadioButton { - text: "Disabled" - enabled: false +Pane { + padding: 10 + +//! [1] +Button { + text: qsTr("Button") + Universal.foreground: Universal.Pink +} +//! [1] } diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-disabled.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-theme.qml index 81c9f4ac..85e4a406 100644 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-disabled.qml +++ b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-theme.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2016 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -27,8 +27,18 @@ import QtQuick 2.0 import QtQuick.Controls 2.0 +import QtQuick.Controls.Universal 2.0 -ProgressBar { - value: 0.5 - enabled: false +Pane { + padding: 10 + +//! [1] +Pane { + Universal.theme: Universal.Dark + + Button { + text: qsTr("Button") + } +} +//! [1] } diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-focused.qml deleted file mode 100644 index 316a4653..00000000 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-focused.qml +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 - -RadioButton { - text: "Focused" - focus: true -} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-normal.qml deleted file mode 100644 index b5ea853b..00000000 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-normal.qml +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 - -RadioButton { - text: "Normal" -} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml deleted file mode 100644 index bde161aa..00000000 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 - -Slider { - value: 0.5 - enabled: false -} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml deleted file mode 100644 index b32f8b5a..00000000 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 - -Slider { - value: 0.5 - focus: true -} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml deleted file mode 100644 index 8363e862..00000000 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 - -Slider { - value: 0.5 -} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml index fd6754f8..246f3ae5 100644 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2016 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -29,19 +29,34 @@ import QtQuick 2.0 import QtQuick.Layouts 1.0 import QtQuick.Controls 2.0 +Item { + width: children[0].implicitWidth * 2 + height: children[0].implicitHeight + Binding { + target: children[0] + property: "width" + value: width + } //! [1] ToolBar { RowLayout { anchors.fill: parent ToolButton { - text: qsTr("\u25C0 Qt") + text: qsTr("‹") onClicked: stack.pop() } - Item { Layout.fillWidth: true } - Switch { - checked: true - text: qsTr("Notifications") + Label { + text: "Title" + elide: Label.ElideRight + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter + Layout.fillWidth: true + } + ToolButton { + text: qsTr("⋮") + onClicked: menu.open() } } } //! [1] +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip.qml index c85f91bb..146fe477 100644 --- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip.qml +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip.qml @@ -42,10 +42,10 @@ Item { //! [1] Button { - text: qsTr("Button") + text: qsTr("Save") - ToolTip.visible: pressed - ToolTip.text: qsTr("A descriptive tool tip of what the button does") + ToolTip.visible: down + ToolTip.text: qsTr("Save the active project") } //! [1] } diff --git a/src/imports/controls/doc/src/includes/qquickcontrol-background.qdocinc b/src/imports/controls/doc/src/includes/qquickcontrol-background.qdocinc new file mode 100644 index 00000000..02d92de0 --- /dev/null +++ b/src/imports/controls/doc/src/includes/qquickcontrol-background.qdocinc @@ -0,0 +1,13 @@ +//! [notes] + +\note If the background item has no explicit size specified, it automatically + follows the control's size. In most cases, there is no need to specify + width or height for a background item. + +\note Most controls use the implicit size of the background item to calculate +the implicit size of the control itself. If you replace the background item +with a custom one, you should also consider providing a sensible implicit +size for it (unless it is an item like \l Image which has its own implicit +size). + +//! [notes] diff --git a/src/imports/controls/doc/src/includes/qquickcontrol-focusreason.qdocinc b/src/imports/controls/doc/src/includes/qquickcontrol-focusreason.qdocinc new file mode 100644 index 00000000..b69e9e60 --- /dev/null +++ b/src/imports/controls/doc/src/includes/qquickcontrol-focusreason.qdocinc @@ -0,0 +1,15 @@ +This property holds the reason of the last focus change. + +\note This property does not indicate whether the control has \l {Item::activeFocus} + {active focus}, but the reason why the control either gained or lost focus. + +\value Qt.MouseFocusReason A mouse action occurred. +\value Qt.TabFocusReason The Tab key was pressed. +\value Qt.BacktabFocusReason A Backtab occurred. The input for this may include the Shift or Control keys; e.g. Shift+Tab. +\value Qt.ActiveWindowFocusReason The window system made this window either active or inactive. +\value Qt.PopupFocusReason The application opened/closed a pop-up that grabbed/released the keyboard focus. +\value Qt.ShortcutFocusReason The user typed a label's buddy shortcut +\value Qt.MenuBarFocusReason The menu bar took focus. +\value Qt.OtherFocusReason Another reason, usually application-specific. + +\sa Item::activeFocus diff --git a/src/imports/controls/doc/src/includes/qquickmaterialstyle.qdocinc b/src/imports/controls/doc/src/includes/qquickmaterialstyle.qdocinc new file mode 100644 index 00000000..c5d94279 --- /dev/null +++ b/src/imports/controls/doc/src/includes/qquickmaterialstyle.qdocinc @@ -0,0 +1,63 @@ +//! [conf] +\table + \header + \li Variable + \li Description + \row + \li \c Theme + \li Specifies the default \l {material-theme-attached-prop}{Material theme}. + The value can be one of the available themes, for example \c "Dark". + \row + \li \c Accent + \li Specifies the default \l {material-accent-attached-prop}{Material accent color}. + The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use + one of the \l {pre-defined Material colors}, for example \c "Teal". + \row + \li \c Primary + \li Specifies the default \l {material-primary-attached-prop}{Material primary color}. + The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use + one of the \l {pre-defined Material colors}, for example \c "BlueGrey". + \row + \li \c Foreground + \li Specifies the default \l {material-foreground-attached-prop}{Material foreground color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Material colors}, + for example \c "Brown". + \row + \li \c Background + \li Specifies the default \l {material-background-attached-prop}{Material background color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Material colors}, + for example \c "Grey". +\endtable +//! [conf] + +//! [env] +\table + \header + \li Variable + \li Description + \row + \li \c QT_QUICK_CONTROLS_MATERIAL_THEME + \li Specifies the default \l {material-theme-attached-prop}{Material theme}. + The value can be one of the available themes, for example \c "Dark". + \row + \li \c QT_QUICK_CONTROLS_MATERIAL_ACCENT + \li Specifies the default \l {material-accent-attached-prop}{Material accent color}. + The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use + one of the \l {pre-defined Material colors}, for example \c "Teal". + \row + \li \c QT_QUICK_CONTROLS_MATERIAL_PRIMARY + \li Specifies the default \l {material-primary-attached-prop}{Material primary color}. + The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use + one of the \l {pre-defined Material colors}, for example \c "BlueGrey". + \row + \li \c QT_QUICK_CONTROLS_MATERIAL_FOREGROUND + \li Specifies the default \l {material-foreground-attached-prop}{Material foreground color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Material colors}, + for example \c "Brown". + \row + \li \c QT_QUICK_CONTROLS_MATERIAL_BACKGROUND + \li Specifies the default \l {material-background-attached-prop}{Material background color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Material colors}, + for example \c "Grey". +\endtable +//! [env] diff --git a/src/imports/controls/doc/src/includes/qquickswitch.qdocinc b/src/imports/controls/doc/src/includes/qquickswitch.qdocinc index 32ccbb89..985f85d9 100644 --- a/src/imports/controls/doc/src/includes/qquickswitch.qdocinc +++ b/src/imports/controls/doc/src/includes/qquickswitch.qdocinc @@ -2,7 +2,7 @@ This property holds the logical position of the thumb indicator. -The position is defined as a percentage of the indicator's size, scaled to +The position is expressed as a fraction of the indicator's size, in the range \c 0.0 - \c 1.0. The position can be used for example to determine whether the thumb has been dragged past the halfway point. For visualizing a thumb indicator, the right-to-left aware \l visualPosition should be used instead. @@ -16,7 +16,7 @@ indicator, the right-to-left aware \l visualPosition should be used instead. This property holds the visual position of the thumb indicator. -The position is defined as a percentage of the indicator's size, scaled to +The position is expressed as a fraction of the indicator's size, in the range \c 0.0 - \c 1.0. When the control is \l {Control::mirrored}{mirrored}, the value is equal to \c {1.0 - position}. This makes the value suitable for visualizing the thumb indicator taking right-to-left support into account. diff --git a/src/imports/controls/doc/src/includes/qquickuniversalstyle.qdocinc b/src/imports/controls/doc/src/includes/qquickuniversalstyle.qdocinc new file mode 100644 index 00000000..a7ecbaef --- /dev/null +++ b/src/imports/controls/doc/src/includes/qquickuniversalstyle.qdocinc @@ -0,0 +1,53 @@ +//! [conf] +\table + \header + \li Variable + \li Description + \row + \li \c Theme + \li Specifies the default \l {universal-theme-attached-prop}{Universal theme}. + The value can be one of the available themes, for example \c "Dark". + \row + \li \c Accent + \li Specifies the default \l {universal-accent-attached-prop}{Universal accent color}. + The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use + one of the \l {pre-defined Universal colors}, for example \c "Violet". + \row + \li \c Foreground + \li Specifies the default \l {universal-foreground-attached-prop}{Universal foreground color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Universal colors}, + for example \c "Brown". + \row + \li \c Background + \li Specifies the default \l {universal-background-attached-prop}{Universal background color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Universal colors}, + for example \c "Steel". +\endtable +//! [conf] + +//! [env] +\table + \header + \li Variable + \li Description + \row + \li \c QT_QUICK_CONTROLS_UNIVERSAL_THEME + \li Specifies the default \l {universal-theme-attached-prop}{Universal theme}. + The value can be one of the available themes, for example \c "Dark". + \row + \li \c QT_QUICK_CONTROLS_UNIVERSAL_ACCENT + \li Specifies the default \l {universal-accent-attached-prop}{Universal accent color}. + The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use + one of the \l {pre-defined Universal colors}, for example \c "Violet". + \row + \li \c QT_QUICK_CONTROLS_UNIVERSAL_FOREGROUND + \li Specifies the default \l {universal-foreground-attached-prop}{Universal foreground color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Universal colors}, + for example \c "Brown". + \row + \li \c QT_QUICK_CONTROLS_UNIVERSAL_BACKGROUND + \li Specifies the default \l {universal-background-attached-prop}{Universal background color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Universal colors}, + for example \c "Steel". +\endtable +//! [env] diff --git a/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc index d6a9ac78..5e2c9370 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc @@ -66,7 +66,7 @@ \section1 CheckBox Control - \image qtquickcontrols2-checkbox.png + \image qtquickcontrols2-checkbox.gif \l CheckBox is used to build multi-selection option lists. Any number of options can be selected, including none, but the options should @@ -102,7 +102,7 @@ \section1 RadioButton Control - \image qtquickcontrols2-radiobutton.png + \image qtquickcontrols2-radiobutton.gif \l RadioButton is used to select only one option from a set of options. Selecting one option automatically deselects the one selected before. diff --git a/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc new file mode 100644 index 00000000..29bfc99c --- /dev/null +++ b/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc @@ -0,0 +1,94 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qtquickcontrols2-configuration.html + \title Qt Quick Controls 2 Configuration File + + Qt Quick Controls 2 support a special configuration file, \c :/qtquickcontrols2.conf, + that is built into an application's resources. + + The configuration file can specify the preferred style and certain style-specific + attributes. The following example specifies that the preferred style is the \l {Material style}. + Furthermore, when the application is run with the Material style, its theme is light and the + accent and primary colors are teal and blue grey, respectively. However, if the application + is run with the \l {Universal style} instead, the theme is dark and the accent color is red. + + \code + [Controls] + Style=Material + + [Universal] + Theme=Dark + Accent=Red + + [Material] + Theme=Light + Accent=Teal + Primary=BlueGrey + \endcode + + \l {Material style} specific values that can be specified in a \c Material + section of the configuration file: + + \include qquickmaterialstyle.qdocinc conf + + \l {Universal style} specific values that can be specified in a \c Universal + section of the configuration file: + + \include qquickuniversalstyle.qdocinc conf + + In order to make it possible for Qt Quick Controls 2 to find the configuration file, + it must be built into application's resources using the \l {The Qt Resource System}. + Here's an example \c .qrc file: + + \code + <!DOCTYPE RCC><RCC version="1.0"> + <qresource prefix="/"> + <file>qtquickcontrols2.conf</file> + </qresource> + </RCC> + \endcode + + \note Qt Quick Controls 2 uses a file selector to load the configuration file. It + is possible to provide a different configuration file for different platforms and + locales. See \l QFileSelector documentation for more details. + + Finally, the \c .qrc file must be listed in the application's \c .pro file so that + the build system knows about it. For example: + + \code + RESOURCES = application.qrc + \endcode + + \section1 Related Information + + \list + \li \l{Styling Qt Quick Controls 2} + \li \l{Supported Environment Variables in Qt Quick Controls 2} + \endlist +*/ diff --git a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc index f37519de..71ffe350 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc @@ -335,6 +335,38 @@ \l {Customizing a Control} section. The code can be used as a starting point to implement a custom look and feel. + \section2 Customizing ApplicationWindow + + ApplicationWindow consists of one visual item: + \l {ApplicationWindow::background}{background}. It is also possible + to customize the \l {ApplicationWindow::overlay}{modal} and + \l {ApplicationWindow::overlay}{modeless} items. + + \code + import QtQuick 2.7 + import QtQuick.Controls 2.0 + + ApplicationWindow { + visible: true + + background: Rectangle { + gradient: Gradient { + GradientStop { position: 0; color: "#ffffff" } + GradientStop { position: 1; color: "#c1bbf9" } + } + } + + overlay.modal: Rectangle { + color: "#8f28282a" + } + + overlay.modeless: Rectangle { + color: "#2f28282a" + } + } + \endcode + + \section2 Customizing BusyIndicator BusyIndicator consists of two visual items: \l {Control::background}{background} diff --git a/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc index 45ea7db7..a85890f5 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc @@ -109,20 +109,20 @@ \li Yes \li No \row - \li Runtime style changes - \li Yes - \li Yes + \li Runtime style/theme changes + \li Yes \sup 1 + \li Yes \sup 2 \row \li Can be used on Desktop \li Yes - \li Yes \b * + \li Yes \sup 3 \row \li Can be used on Mobile - \li Yes + \li Yes \sup 4 \li Yes \row \li Can be used on Embedded - \li Yes + \li Yes \sup 4 \li Yes \row \li Internal event handling @@ -130,7 +130,12 @@ \li C++ \endtable - \b {* No hover effects} + \list 1 + \li Not officially supported, but technically possible via private APIs + \li Only themes for specific styles can be changed at runtime, styles are fixed + \li No hover effects + \li Performance may not be optimal + \endlist \section2 Porting Qt Quick Controls Code diff --git a/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc new file mode 100644 index 00000000..7c1b1c16 --- /dev/null +++ b/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qtquickcontrols2-environment.html + \title Supported Environment Variables in Qt Quick Controls 2 + + This page contains a list of all environment variables that Qt Quick Controls 2 + supports. The environment variables are primarily meant for testing purposes, but + they can also be used to set system-wide defaults. + + \table + \header + \li Variable + \li Description + \row + \li \c QT_QUICK_CONTROLS_STYLE + \li Specifies the default \l {Styling Qt Quick Controls 2}{Qt Quick Controls 2 style}. + The value can be either one of the built-in styles, for example \c "Material", + or the path to a custom style such as \c ":/mystyle". + \row + \li \c QT_QUICK_CONTROLS_CONF + \li Specifies the location of the \l {Qt Quick Controls 2 configuration file}. + By default, the configuration file is loaded from the application's + resources in \c ":/qtquickcontrols2.conf". + \endtable + + \l {Material style} specific environment variables: + + \include qquickmaterialstyle.qdocinc env + + \l {Universal style} specific environment variables: + + \include qquickuniversalstyle.qdocinc env + + \section1 Related Information + + \list + \li \l{Styling Qt Quick Controls 2} + \li \l{Qt Quick Controls 2 Configuration File} + \endlist +*/ diff --git a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc index de3d0c37..cdb20a27 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc @@ -69,6 +69,8 @@ \li \l{Using File Selectors with Qt Quick Controls 2} \li \l{Differences between Qt Quick Controls} \li \l{Deploying Qt Quick Controls 2 Applications} + \li \l{Qt Quick Controls 2 Configuration File} + \li \l{Supported Environment Variables in Qt Quick Controls 2} \endlist \section1 Reference diff --git a/src/imports/controls/doc/src/qtquickcontrols2-indicators.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-indicators.qdoc index 47e6be82..84367278 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-indicators.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-indicators.qdoc @@ -52,6 +52,13 @@ \l BusyIndicator can be used to show that an operation is in progress, and that the UI has to wait for the operation to complete. + \section1 ProgressBar Control + + \image qtquickcontrols2-progressbar.gif + + \l ProgressBar indicates the progress of an operation. The value should be + updated regularly. + \section1 ScrollBar Control \image qtquickcontrols2-scrollbar.gif @@ -62,7 +69,7 @@ \section1 ScrollIndicator Control - \image qtquickcontrols2-scrollindicator.png + \image qtquickcontrols2-scrollindicator.gif \l ScrollIndicator is a non-interactive indicator that indicates the current scroll position, and can be used to scroll to a specific position in a diff --git a/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc index 70d5f54c..ce7b6aa4 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc @@ -42,7 +42,7 @@ \section1 ComboBox Control - \image qtquickcontrols2-combobox.png + \image qtquickcontrols2-combobox.gif \l ComboBox is used to select a value from a static multiple-line drop-down list. It is not possible to add new values, and only one option can be selected. @@ -85,7 +85,7 @@ \section1 Slider Control - \image qtquickcontrols2-slider.png + \image qtquickcontrols2-slider.gif \l Slider is used to select a value by sliding a handle along a track. diff --git a/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc index a90581ec..9842fee6 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2016 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -79,28 +79,6 @@ \image qtquickcontrols2-material-attributes.png - The following example illustrates how to create a red \e stop button with light text: - - \table - \row - \li - \qml - import QtQuick 2.0 - import QtQuick.Controls 2.0 - import QtQuick.Controls.Material 2.0 - - Button { - text: "Stop" - highlighted: true - - Material.accent: Material.Red - Material.theme: Material.Dark - } - \endqml - \li - \image qtquickcontrols2-material-button.png - \endtable - All attributes can be specified for any window or item, and they automatically propagate to children in the same manner as \l {Control::font}{fonts}. In the following example, the window and all three radio buttons appear in the dark @@ -134,37 +112,22 @@ \endtable In addition to specifying the attributes in QML, it is also possible to - specify them via environment variables or in a \l {qtquickcontrols2-conf} - {configuration file}. Attributes specified in QML take precedence over all - other methods. + specify them via environment variables or in a configuration file. Attributes + specified in QML take precedence over all other methods. + + \section3 Configuration File + + \include qquickmaterialstyle.qdocinc conf + + See \l {Qt Quick Controls 2 Configuration File} for more details about the + configuration file. \section3 Environment Variables - \table - \header - \li Variable - \li Description - \row - \li \c QT_QUICK_CONTROLS_MATERIAL_THEME - \li The value can be one of the available \l {material-theme-attached-prop}{themes}, - for example \c "Dark". - \row - \li \c QT_QUICK_CONTROLS_MATERIAL_ACCENT - \li The value can be any \l {colorbasictypedocs}{color}, but it is recommended - to use one of the \l {pre-defined Material colors}, for example \c "Teal". - \row - \li \c QT_QUICK_CONTROLS_MATERIAL_PRIMARY - \li The value can be any \l {colorbasictypedocs}{color}, but it is recommended - to use one of the \l {pre-defined Material colors}, for example \c "BlueGrey". - \row - \li \c QT_QUICK_CONTROLS_MATERIAL_FOREGROUND - \li The value can be any \l {colorbasictypedocs}{color}, or one of the - \l {pre-defined Material colors}. - \row - \li \c QT_QUICK_CONTROLS_MATERIAL_BACKGROUND - \li The value can be any \l {colorbasictypedocs}{color}, or one of the - \l {pre-defined Material colors}. - \endtable + \include qquickmaterialstyle.qdocinc env + + See \l {Supported Environment Variables in Qt Quick Controls 2} for the full + list of supported environment variables. \section2 Dependency @@ -263,6 +226,17 @@ The default value is \c Material.Pink. + In the following example, the accent color of the highlighted button is + changed to \c Material.Orange: + + \table + \row + \li + \snippet qtquickcontrols2-material-accent.qml 1 + \li + \image qtquickcontrols2-material-accent.png + \endtable + \note Even though the accent can be any \l {colorbasictypedocs}{color}, it is recommended to use one of the \l {pre-defined Material colors} that have been designed to work well with the rest of the Material style palette. @@ -276,6 +250,17 @@ The default value is theme-specific (light or dark). + In the following example, the background color of the button is changed to + \c Material.Teal: + + \table + \row + \li + \snippet qtquickcontrols2-material-background.qml 1 + \li + \image qtquickcontrols2-material-background.png + \endtable + \endstyleproperty \styleproperty {Material.elevation} {int} {material-elevation-attached-prop} @@ -286,6 +271,18 @@ The default value is control-specific. + In the following example, the elevation of the pane is set to \c 6 + in order to achieve the look of an + \l {https://material.google.com/components/cards.html}{elevated card}: + + \table + \row + \li + \snippet qtquickcontrols2-material-elevation.qml 1 + \li + \image qtquickcontrols2-material-elevation.png + \endtable + \endstyleproperty \styleproperty {Material.foreground} {color} {material-foreground-attached-prop} @@ -295,6 +292,17 @@ The default value is theme-specific (light or dark). + In the following example, the foreground color of the button is set to \c + Material.Pink: + + \table + \row + \li + \snippet qtquickcontrols2-material-foreground.qml 1 + \li + \image qtquickcontrols2-material-foreground.png + \endtable + \endstyleproperty \styleproperty {Material.primary} {color} {material-primary-attached-prop} @@ -302,6 +310,8 @@ This attached property holds the primary color of the theme. The property can be attached to any window or item. The value is propagated to children. + The primary color is used as the background color of ToolBar by default. + The default value is \c Material.Indigo. \note Even though the primary can be any \l {colorbasictypedocs}{color}, it is @@ -319,6 +329,17 @@ \value Material.Light Light theme (default) \value Material.Dark Dark theme + In the following example, the theme for both the pane and the button is set + to \c Material.Dark: + + \table + \row + \li + \snippet qtquickcontrols2-material-theme.qml 1 + \li + \image qtquickcontrols2-material-theme.png + \endtable + \endstyleproperty \section1 Attached Method Documentation @@ -331,9 +352,6 @@ defaults to \c Material.Shade500. \qml - import QtQuick 2.0 - import QtQuick.Controls.Material 2.0 - Rectangle { color: Material.color(Material.Red) } diff --git a/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc index d63cbe69..d9c03ec3 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2016 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -83,28 +83,15 @@ \section2 Using QQuickStyle in C++ - \l QQuickStyle provides API for configuring a specific style. The following + \l QQuickStyle provides C++ API for configuring a specific style. The following example runs a Qt Quick Controls 2 application with the Material style: \code - #include <QGuiApplication> - #include <QQmlApplicationEngine> - #include <QQuickStyle> - - int main(int argc, char *argv[]) - { - QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - QGuiApplication app(argc, argv); - - QQuickStyle::setStyle("Material"); - - QQmlApplicationEngine engine; - engine.load(QUrl("qrc:/main.qml")); - - return app.exec(); - } + QQuickStyle::setStyle("Material"); \endcode + See the detailed description of \l QQuickStyle for more details. + \section2 Command line argument Passing a \c -style command line argument is the convenient way to test different @@ -126,55 +113,25 @@ QT_QUICK_CONTROLS_STYLE=universal ./app \endcode + See \l {Supported Environment Variables in Qt Quick Controls 2} for the full list + of supported environment variables. + \section2 Configuration file - \target qtquickcontrols2-conf Qt Quick Controls 2 support a special configuration file, \c :/qtquickcontrols2.conf, that is built into an application's resources. The configuration file can specify the preferred style (may be overridden by either of the methods described earlier) and certain style-specific attributes. The following - example specifies that the preferred style is the Material style. Furthermore, when the - application is run with the Material style, its theme is light and the accent and primary - colors are teal and blue grey, respectively. However, if the application is run with the - Universal style instead, the theme is dark and the accent color is red. + example specifies that the preferred style is the Material style. \code [Controls] Style=Material - - [Universal] - Theme=Dark - Accent=Red - - [Material] - Theme=Light - Accent=Teal - Primary=BlueGrey \endcode - In order to make it possible for Qt Quick Controls 2 to find the configuration file, - it must be built into application's resources using the \l {The Qt Resource System}. - Here's an example \c .qrc file: - - \code - <!DOCTYPE RCC><RCC version="1.0"> - <qresource prefix="/"> - <file>qtquickcontrols2.conf</file> - </qresource> - </RCC> - \endcode - - \note Qt Quick Controls 2 uses a file selector to load the configuration file. It - is possible to provide a different configuration file for different platforms and - locales. See \l QFileSelector documentation for more details. - - Finally, the \c .qrc file must be listed in the application's \c .pro file so that - the build system knows about it. For example: - - \code - RESOURCES = application.qrc - \endcode + See \l {Qt Quick Controls 2 Configuration File} for more details about the + configuration file. \section1 Related Information \list @@ -183,5 +140,7 @@ \li \l {Universal Style} \li \l{Using File Selectors with Qt Quick Controls 2} \li \l {Deploying Qt Quick Controls 2 Applications} + \li \l {Qt Quick Controls 2 Configuration File} + \li \l {Supported Environment Variables in Qt Quick Controls 2} \endlist */ diff --git a/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc index 02dc93c9..c0e2daee 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2016 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -78,28 +78,6 @@ \image qtquickcontrols2-universal-attributes.png - The following example illustrates how to create a red \e stop button with light text: - - \table - \row - \li - \qml - import QtQuick 2.0 - import QtQuick.Controls 2.0 - import QtQuick.Controls.Universal 2.0 - - Button { - text: "Stop" - highlighted: true - - Universal.accent: Universal.Red - Universal.theme: Universal.Dark - } - \endqml - \li - \image qtquickcontrols2-universal-button.png - \endtable - Both attributes can be specified for any window or item, and they automatically propagate to children in the same manner as \l {Control::font}{fonts}. In the following example, the window and all three radio buttons appear in the dark @@ -133,33 +111,22 @@ \endtable In addition to specifying the attributes in QML, it is also possible to - specify them via environment variables or in a \l {qtquickcontrols2-conf} - {configuration file}. Attributes specified in QML take precedence over all - other methods. + specify them via environment variables or in a configuration file. Attributes + specified in QML take precedence over all other methods. + + \section3 Configuration File + + \include qquickuniversalstyle.qdocinc conf + + See \l {Qt Quick Controls 2 Configuration File} for more details about the + configuration file. \section3 Environment Variables - \table - \header - \li Variable - \li Description - \row - \li \c QT_QUICK_CONTROLS_UNIVERSAL_THEME - \li The value can be one of the available \l {universal-theme-attached-prop}{themes}, - for example \c "Dark". - \row - \li \c QT_QUICK_CONTROLS_UNIVERSAL_ACCENT - \li The value can be any \l {colorbasictypedocs}{color}, but it is recommended - to use one of the \l {pre-defined Universal colors}, for example \c "Violet". - \row - \li \c QT_QUICK_CONTROLS_UNIVERSAL_FOREGROUND - \li The value can be any \l {colorbasictypedocs}{color}, or one of the - \l {pre-defined Universal colors}. - \row - \li \c QT_QUICK_CONTROLS_UNIVERSAL_BACKGROUND - \li The value can be any \l {colorbasictypedocs}{color}, or one of the - \l {pre-defined Universal colors}. - \endtable + \include qquickuniversalstyle.qdocinc env + + See \l {Supported Environment Variables in Qt Quick Controls 2} for the full + list of supported environment variables. \section2 Dependency @@ -209,8 +176,21 @@ This attached property holds the accent color of the theme. The property can be attached to any window or item. The value is propagated to children. + The default value is \c Universal.Cobalt. + + In the following example, the accent color of the highlighted button is + changed to \c Universal.Orange: + + \table + \row + \li + \snippet qtquickcontrols2-universal-accent.qml 1 + \li + \image qtquickcontrols2-universal-accent.png + \endtable + \note Even though the accent can be any \l {colorbasictypedocs}{color}, it is - recommended to use one of the \l {pre-defined Universal colors} that have been + recommended to use one of the \l {pre-defined Universal colors} that have been designed to work well with the rest of the Universal style palette. \endstyleproperty @@ -222,6 +202,17 @@ The default value is theme-specific (light or dark). + In the following example, the background color of the pane is changed to + \c Universal.Steel: + + \table + \row + \li + \snippet qtquickcontrols2-universal-background.qml 1 + \li + \image qtquickcontrols2-universal-background.png + \endtable + \endstyleproperty \styleproperty {Universal.foreground} {color} {universal-foreground-attached-prop} @@ -231,6 +222,17 @@ The default value is theme-specific (light or dark). + In the following example, the foreground color of the button is set to \c + Universal.Pink: + + \table + \row + \li + \snippet qtquickcontrols2-universal-foreground.qml 1 + \li + \image qtquickcontrols2-universal-foreground.png + \endtable + \styleproperty {Universal.theme} {enumeration} {universal-theme-attached-prop} \target universal-theme-attached-prop This attached property holds whether the theme is light or dark. The property @@ -240,6 +242,17 @@ \value Universal.Light Light theme (default) \value Universal.Dark Dark theme + In the following example, the theme for both the pane and the button is set + to \c Universal.Dark: + + \table + \row + \li + \snippet qtquickcontrols2-universal-theme.qml 1 + \li + \image qtquickcontrols2-universal-theme.png + \endtable + \endstyleproperty \section1 Attached Method Documentation @@ -250,9 +263,6 @@ \l {pre-defined Universal colors}{pre-defined Universal color}. \qml - import QtQuick 2.0 - import QtQuick.Controls.Universal 2.0 - Rectangle { color: Universal.color(Universal.Red) } diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml index 05981baa..183bcef9 100644 --- a/src/imports/controls/material/ComboBox.qml +++ b/src/imports/controls/material/ComboBox.qml @@ -54,7 +54,10 @@ T.ComboBox { baselineOffset: contentItem.y + contentItem.baselineOffset spacing: 6 - padding: 16 + // external vertical padding is 6 (to increase touch area) + padding: 12 + leftPadding: padding - 4 + rightPadding: padding - 4 // Don't use toolTextColor, as that is often white when we have a white background. Material.foreground: Material.foreground === Material.toolTextColor ? undefined : Material.foreground @@ -89,6 +92,9 @@ T.ComboBox { implicitWidth: 120 implicitHeight: 48 + // external vertical padding is 6 (to increase touch area) + y: 6 + height: parent.height - 12 radius: 2 color: control.Material.dialogColor diff --git a/src/imports/controls/material/images/drop-indicator.png b/src/imports/controls/material/images/drop-indicator.png Binary files differindex b4396ec6..08bb4855 100644 --- a/src/imports/controls/material/images/drop-indicator.png +++ b/src/imports/controls/material/images/drop-indicator.png diff --git a/src/imports/controls/material/images/drop-indicator.svg b/src/imports/controls/material/images/drop-indicator.svg new file mode 100644 index 00000000..94b5ca15 --- /dev/null +++ b/src/imports/controls/material/images/drop-indicator.svg @@ -0,0 +1,5 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" version="1.1"> + <path d="M7,10l5,5,5-5z" fill="#757575"/> +</svg> diff --git a/src/imports/controls/material/images/drop-indicator@2x.png b/src/imports/controls/material/images/drop-indicator@2x.png Binary files differindex 1c711bc2..ccdfc2b1 100644 --- a/src/imports/controls/material/images/drop-indicator@2x.png +++ b/src/imports/controls/material/images/drop-indicator@2x.png diff --git a/src/imports/controls/material/images/drop-indicator@3x.png b/src/imports/controls/material/images/drop-indicator@3x.png Binary files differindex 06dd8bd2..00cae691 100644 --- a/src/imports/controls/material/images/drop-indicator@3x.png +++ b/src/imports/controls/material/images/drop-indicator@3x.png diff --git a/src/imports/controls/material/images/drop-indicator@4x.png b/src/imports/controls/material/images/drop-indicator@4x.png Binary files differindex b2157c30..0a61cb01 100644 --- a/src/imports/controls/material/images/drop-indicator@4x.png +++ b/src/imports/controls/material/images/drop-indicator@4x.png diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp index 6c6a0e3e..1c19bbd3 100644 --- a/src/imports/controls/material/qquickmaterialstyle.cpp +++ b/src/imports/controls/material/qquickmaterialstyle.cpp @@ -400,6 +400,10 @@ static const QRgb hintTextColorLight = 0x60000000; static const QRgb hintTextColorDark = 0x4CFFFFFF; static const QRgb dividerColorLight = 0x1E000000; static const QRgb dividerColorDark = 0x1EFFFFFF; +static const QRgb iconColorLight = 0x89000000; +static const QRgb iconColorDark = 0xFFFFFFFF; +static const QRgb iconDisabledColorLight = 0x42000000; +static const QRgb iconDisabledColorDark = 0x4CFFFFFF; static const QRgb raisedButtonColorLight = 0xFFD6D7D7; static const QRgb raisedButtonColorDark = 0x3FCCCCCC; static const QRgb raisedButtonDisabledColorLight = dividerColorLight; @@ -863,6 +867,16 @@ QColor QQuickMaterialStyle::dividerColor() const return QColor::fromRgba(m_theme == Light ? dividerColorLight : dividerColorDark); } +QColor QQuickMaterialStyle::iconColor() const +{ + return QColor::fromRgba(m_theme == Light ? iconColorLight : iconColorDark); +} + +QColor QQuickMaterialStyle::iconDisabledColor() const +{ + return QColor::fromRgba(m_theme == Light ? iconDisabledColorLight : iconDisabledColorDark); +} + QColor QQuickMaterialStyle::buttonColor(bool highlighted, bool pressed, bool hover) const { Shade shade = pressed ? (m_theme == Light ? Shade700 : Shade100) diff --git a/src/imports/controls/material/qquickmaterialstyle_p.h b/src/imports/controls/material/qquickmaterialstyle_p.h index 6a841803..af5638f1 100644 --- a/src/imports/controls/material/qquickmaterialstyle_p.h +++ b/src/imports/controls/material/qquickmaterialstyle_p.h @@ -74,6 +74,8 @@ class QQuickMaterialStyle : public QQuickStyleAttached Q_PROPERTY(QColor textSelectionColor READ textSelectionColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor dropShadowColor READ dropShadowColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor dividerColor READ dividerColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor iconColor READ iconColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor iconDisabledColor READ iconDisabledColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor buttonColor READ buttonColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor buttonHoverColor READ buttonHoverColor NOTIFY paletteChanged FINAL) Q_PROPERTY(QColor buttonPressColor READ buttonPressColor NOTIFY paletteChanged FINAL) @@ -201,6 +203,8 @@ public: QColor textSelectionColor() const; QColor dropShadowColor() const; QColor dividerColor() const; + QColor iconColor() const; + QColor iconDisabledColor() const; QColor buttonColor() const; QColor buttonHoverColor() const; QColor buttonPressColor() const; diff --git a/src/imports/controls/material/qquickmaterialtheme.cpp b/src/imports/controls/material/qquickmaterialtheme.cpp index 0d2f8a70..1967a74b 100644 --- a/src/imports/controls/material/qquickmaterialtheme.cpp +++ b/src/imports/controls/material/qquickmaterialtheme.cpp @@ -45,15 +45,15 @@ QQuickMaterialTheme::QQuickMaterialTheme(QPlatformTheme *theme) : QQuickProxyTheme(theme) { QFont font; - font.setFamily(QStringLiteral("Roboto")); + font.setFamily(QLatin1String("Roboto")); QString family = QFontInfo(font).family(); - if (family != QStringLiteral("Roboto")) { - font.setFamily(QStringLiteral("Noto")); + if (family != QLatin1String("Roboto")) { + font.setFamily(QLatin1String("Noto")); family = QFontInfo(font).family(); } - if (family == QStringLiteral("Roboto") || family == QStringLiteral("Noto")) { + if (family == QLatin1String("Roboto") || family == QLatin1String("Noto")) { systemFont.setFamily(family); buttonFont.setFamily(family); toolTipFont.setFamily(family); diff --git a/src/imports/controls/universal/qquickuniversaltheme.cpp b/src/imports/controls/universal/qquickuniversaltheme.cpp index 51642c4a..dc516b45 100644 --- a/src/imports/controls/universal/qquickuniversaltheme.cpp +++ b/src/imports/controls/universal/qquickuniversaltheme.cpp @@ -44,8 +44,8 @@ QT_BEGIN_NAMESPACE QQuickUniversalTheme::QQuickUniversalTheme(QPlatformTheme *theme) : QQuickProxyTheme(theme) { - const QFont font(QStringLiteral("Segoe UI")); - if (QFontInfo(font).family() == QStringLiteral("Segoe UI")) { + const QFont font(QLatin1String("Segoe UI")); + if (QFontInfo(font).family() == QLatin1String("Segoe UI")) { const QString family = font.family(); systemFont.setFamily(family); groupBoxTitleFont.setFamily(family); |