summaryrefslogtreecommitdiff
path: root/src/controls/Styles/Base
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-09-19 18:03:14 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-09-19 18:03:14 +0200
commit77703754d73b9309683c83ca4460e599eb8f28e2 (patch)
treef5da2114b88a929dd58a36437c9181adc2783063 /src/controls/Styles/Base
parentfaa5f59e2f26a5c4cf8b681443f2209d1b516b9c (diff)
parentc3b5a796820d792c5c36e472b917e5a47b28763b (diff)
downloadqtquickcontrols-77703754d73b9309683c83ca4460e599eb8f28e2.tar.gz
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: src/controls/Styles/iOS/ComboBoxStyle.qml src/controls/Styles/iOS/SpinBoxStyle.qml src/controls/Styles/iOS/TextAreaStyle.qml src/controls/Styles/iOS/TextFieldStyle.qml src/controls/Styles/iOS/iOS.pro Change-Id: Ib31ead16807a952a39aaa611b27ad89d4f86c60c
Diffstat (limited to 'src/controls/Styles/Base')
-rw-r--r--src/controls/Styles/Base/ApplicationWindowStyle.qml48
-rw-r--r--src/controls/Styles/Base/BusyIndicatorStyle.qml2
-rw-r--r--src/controls/Styles/Base/ButtonStyle.qml4
-rw-r--r--src/controls/Styles/Base/CalendarStyle.qml2
-rw-r--r--src/controls/Styles/Base/CheckBoxStyle.qml4
-rw-r--r--src/controls/Styles/Base/ComboBoxStyle.qml8
-rw-r--r--src/controls/Styles/Base/GroupBoxStyle.qml4
-rw-r--r--src/controls/Styles/Base/MenuBarStyle.qml5
-rw-r--r--src/controls/Styles/Base/MenuStyle.qml6
-rw-r--r--src/controls/Styles/Base/ProgressBarStyle.qml2
-rw-r--r--src/controls/Styles/Base/RadioButtonStyle.qml4
-rw-r--r--src/controls/Styles/Base/ScrollViewStyle.qml2
-rw-r--r--src/controls/Styles/Base/SliderStyle.qml2
-rw-r--r--src/controls/Styles/Base/SpinBoxStyle.qml8
-rw-r--r--src/controls/Styles/Base/TabViewStyle.qml4
-rw-r--r--src/controls/Styles/Base/TableViewStyle.qml6
-rw-r--r--src/controls/Styles/Base/TextAreaStyle.qml8
-rw-r--r--src/controls/Styles/Base/TextFieldStyle.qml8
-rw-r--r--src/controls/Styles/Base/ToolButtonStyle.qml1
19 files changed, 94 insertions, 34 deletions
diff --git a/src/controls/Styles/Base/ApplicationWindowStyle.qml b/src/controls/Styles/Base/ApplicationWindowStyle.qml
index 644cafdd..1d7f0afe 100644
--- a/src/controls/Styles/Base/ApplicationWindowStyle.qml
+++ b/src/controls/Styles/Base/ApplicationWindowStyle.qml
@@ -85,4 +85,52 @@ QtObject {
visible: !styleData.hasColor
color: SystemPaletteSingleton.window(true)
}
+
+ /*! \internal */
+ property Component panel: Item {
+ readonly property alias contentArea: contentArea
+ readonly property alias menuBarArea: menuBarArea
+ readonly property alias toolBarArea: toolBarArea
+ readonly property alias statusBarArea: statusBarArea
+
+ Loader {
+ anchors.fill: parent
+ sourceComponent: background
+ }
+
+ Item {
+ id: contentArea
+ anchors.top: toolBarArea.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: statusBarArea.top
+ }
+
+ Item {
+ id: toolBarArea
+ anchors.top: parent.menuBarArea.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ implicitHeight: childrenRect.height
+ height: visibleChildren.length > 0 ? implicitHeight: 0
+ }
+
+ Item {
+ id: menuBarArea
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ implicitHeight: childrenRect.height
+ height: visibleChildren.length > 0 ? implicitHeight: 0
+ }
+
+ Item {
+ id: statusBarArea
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ implicitHeight: childrenRect.height
+ height: visibleChildren.length > 0 ? implicitHeight: 0
+ }
+ }
}
diff --git a/src/controls/Styles/Base/BusyIndicatorStyle.qml b/src/controls/Styles/Base/BusyIndicatorStyle.qml
index ce8550db..7e6e75f8 100644
--- a/src/controls/Styles/Base/BusyIndicatorStyle.qml
+++ b/src/controls/Styles/Base/BusyIndicatorStyle.qml
@@ -72,7 +72,7 @@ import QtQuick.Controls.Private 1.0
Style {
id: indicatorstyle
- /*! The \l BusyIndicator attached to this style. */
+ /*! The \l BusyIndicator this style is attached to. */
readonly property BusyIndicator control: __control
/*! This defines the appearance of the busy indicator. */
diff --git a/src/controls/Styles/Base/ButtonStyle.qml b/src/controls/Styles/Base/ButtonStyle.qml
index 566f93e5..54576b7f 100644
--- a/src/controls/Styles/Base/ButtonStyle.qml
+++ b/src/controls/Styles/Base/ButtonStyle.qml
@@ -76,7 +76,7 @@ import QtQuick.Controls.Private 1.0
Style {
id: buttonstyle
- /*! The \l {QtQuick.Controls::}{Button} attached to this style. */
+ /*! The \l {QtQuick.Controls::}{Button} this style is attached to. */
readonly property Button control: __control
/*! The padding between the background and the label components. */
@@ -141,7 +141,7 @@ Style {
}
Text {
id: text
- renderType: Text.NativeRendering
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
anchors.verticalCenter: parent.verticalCenter
text: control.text
color: SystemPaletteSingleton.buttonText(control.enabled)
diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml
index bb1c6970..a25222fe 100644
--- a/src/controls/Styles/Base/CalendarStyle.qml
+++ b/src/controls/Styles/Base/CalendarStyle.qml
@@ -125,7 +125,7 @@ Style {
id: calendarStyle
/*!
- The Calendar attached to this style.
+ The Calendar this style is attached to.
*/
readonly property Calendar control: __control
diff --git a/src/controls/Styles/Base/CheckBoxStyle.qml b/src/controls/Styles/Base/CheckBoxStyle.qml
index c8592b76..a23c7721 100644
--- a/src/controls/Styles/Base/CheckBoxStyle.qml
+++ b/src/controls/Styles/Base/CheckBoxStyle.qml
@@ -76,7 +76,7 @@ import QtQuick.Controls.Private 1.0
Style {
id: checkboxStyle
- /*! The \l CheckBox attached to this style. */
+ /*! The \l CheckBox this style is attached to. */
readonly property CheckBox control: __control
/*! This defines the text label. */
@@ -101,7 +101,7 @@ Style {
text: control.text
anchors.centerIn: parent
color: SystemPaletteSingleton.text(control.enabled)
- renderType: Text.NativeRendering
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
}
}
/*! The background under indicator and label. */
diff --git a/src/controls/Styles/Base/ComboBoxStyle.qml b/src/controls/Styles/Base/ComboBoxStyle.qml
index f7236ba7..f71c8c98 100644
--- a/src/controls/Styles/Base/ComboBoxStyle.qml
+++ b/src/controls/Styles/Base/ComboBoxStyle.qml
@@ -63,12 +63,14 @@ Style {
Supported render types are:
\list
\li Text.QtRendering
- \li Text.NativeRendering - the default
+ \li Text.NativeRendering
\endlist
+ The default value is platform dependent.
+
\sa Text::renderType
*/
- property int renderType: Text.NativeRendering
+ property int renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
/*!
\since QtQuick.Controls.Styles 1.3
@@ -94,7 +96,7 @@ Style {
*/
property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled)
- /*! The \l ComboBox attached to this style. */
+ /*! The \l ComboBox this style is attached to. */
readonly property ComboBox control: __control
/*! The padding between the background and the label components. */
diff --git a/src/controls/Styles/Base/GroupBoxStyle.qml b/src/controls/Styles/Base/GroupBoxStyle.qml
index 545ca07b..22252a96 100644
--- a/src/controls/Styles/Base/GroupBoxStyle.qml
+++ b/src/controls/Styles/Base/GroupBoxStyle.qml
@@ -50,7 +50,7 @@ import QtQuick.Controls.Private 1.0
*/
Style {
- /*! The \l GroupBox attached to this style. */
+ /*! The \l GroupBox this style is attached to. */
readonly property GroupBox control: __control
/*! The margin from the content item to the groupbox. */
@@ -126,7 +126,7 @@ Style {
anchors.margins: 4
text: control.title
color: textColor
- renderType: Text.NativeRendering
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
}
BorderImage {
diff --git a/src/controls/Styles/Base/MenuBarStyle.qml b/src/controls/Styles/Base/MenuBarStyle.qml
index 66b3e10a..40e6ea5d 100644
--- a/src/controls/Styles/Base/MenuBarStyle.qml
+++ b/src/controls/Styles/Base/MenuBarStyle.qml
@@ -106,7 +106,7 @@ Style {
font: root.font
text: formatMnemonic(styleData.text, styleData.underlineMnemonic)
anchors.centerIn: parent
- renderType: Text.NativeRendering
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
color: styleData.open ? "white" : SystemPaletteSingleton.windowText(control.enabled)
}
}
@@ -124,4 +124,7 @@ Style {
The font of the control.
*/
property font font
+
+ /*! \internal */
+ property bool __isNative: true
}
diff --git a/src/controls/Styles/Base/MenuStyle.qml b/src/controls/Styles/Base/MenuStyle.qml
index ceb2bfca..61202bae 100644
--- a/src/controls/Styles/Base/MenuStyle.qml
+++ b/src/controls/Styles/Base/MenuStyle.qml
@@ -192,7 +192,7 @@ Style {
text: formatMnemonic(styleData.text, styleData.underlineMnemonic)
color: __currentTextColor
font: styleRoot.font
- renderType: Text.NativeRendering
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
}
submenuIndicator: Text {
@@ -201,7 +201,7 @@ Style {
color: __currentTextColor
style: styleData.selected ? Text.Normal : Text.Raised
styleColor: Qt.lighter(color, 4)
- renderType: Text.NativeRendering
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
}
shortcut: Text {
@@ -219,7 +219,7 @@ Style {
wordSpacing: styleRoot.font.wordSpacing
}
color: __currentTextColor
- renderType: Text.NativeRendering
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
}
checkmarkIndicator: Loader {
diff --git a/src/controls/Styles/Base/ProgressBarStyle.qml b/src/controls/Styles/Base/ProgressBarStyle.qml
index ec379884..88f04304 100644
--- a/src/controls/Styles/Base/ProgressBarStyle.qml
+++ b/src/controls/Styles/Base/ProgressBarStyle.qml
@@ -111,7 +111,7 @@ import QtQuick.Controls.Private 1.0
Style {
id: progressBarStyle
- /*! The \l ProgressBar attached to this style. */
+ /*! The \l ProgressBar this style is attached to. */
readonly property ProgressBar control: __control
/*! A value in the range [0-1] indicating the current progress. */
diff --git a/src/controls/Styles/Base/RadioButtonStyle.qml b/src/controls/Styles/Base/RadioButtonStyle.qml
index 86b7c816..8f70d854 100644
--- a/src/controls/Styles/Base/RadioButtonStyle.qml
+++ b/src/controls/Styles/Base/RadioButtonStyle.qml
@@ -75,7 +75,7 @@ import QtQuick.Controls.Private 1.0
Style {
id: radiobuttonStyle
- /*! The \l RadioButton attached to this style. */
+ /*! The \l RadioButton this style is attached to. */
readonly property RadioButton control: __control
/*! This defines the text label. */
@@ -100,7 +100,7 @@ Style {
text: control.text
anchors.centerIn: parent
color: SystemPaletteSingleton.text(control.enabled)
- renderType: Text.NativeRendering
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
}
}
diff --git a/src/controls/Styles/Base/ScrollViewStyle.qml b/src/controls/Styles/Base/ScrollViewStyle.qml
index 20fc5a19..e8d10995 100644
--- a/src/controls/Styles/Base/ScrollViewStyle.qml
+++ b/src/controls/Styles/Base/ScrollViewStyle.qml
@@ -51,7 +51,7 @@ import QtQuick.Controls.Private 1.0
Style {
id: root
- /*! The \l ScrollView attached to this style. */
+ /*! The \l ScrollView this style is attached to. */
readonly property ScrollView control: __control
/*! This property controls the frame border padding of the scrollView. */
diff --git a/src/controls/Styles/Base/SliderStyle.qml b/src/controls/Styles/Base/SliderStyle.qml
index 1e2750fb..a4c4f0ea 100644
--- a/src/controls/Styles/Base/SliderStyle.qml
+++ b/src/controls/Styles/Base/SliderStyle.qml
@@ -82,7 +82,7 @@ import QtQuick.Controls.Private 1.0
Style {
id: styleitem
- /*! The \l Slider attached to this style. */
+ /*! The \l Slider this style is attached to. */
readonly property Slider control: __control
padding { top: 0 ; left: 0 ; right: 0 ; bottom: 0 }
diff --git a/src/controls/Styles/Base/SpinBoxStyle.qml b/src/controls/Styles/Base/SpinBoxStyle.qml
index e369cb7f..14d72863 100644
--- a/src/controls/Styles/Base/SpinBoxStyle.qml
+++ b/src/controls/Styles/Base/SpinBoxStyle.qml
@@ -66,7 +66,7 @@ import QtQuick.Controls.Private 1.0
Style {
id: spinboxStyle
- /*! The \l SpinBox attached to this style. */
+ /*! The \l SpinBox this style is attached to. */
readonly property SpinBox control: __control
/*! The content margins of the text field. */
@@ -103,12 +103,14 @@ Style {
Supported render types are:
\list
\li Text.QtRendering
- \li Text.NativeRendering - the default
+ \li Text.NativeRendering
\endlist
+ The default value is platform dependent.
+
\sa Text::renderType
*/
- property int renderType: Text.NativeRendering
+ property int renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
/*!
\since QtQuick.Controls.Styles 1.3
diff --git a/src/controls/Styles/Base/TabViewStyle.qml b/src/controls/Styles/Base/TabViewStyle.qml
index 44c6ca72..53da921f 100644
--- a/src/controls/Styles/Base/TabViewStyle.qml
+++ b/src/controls/Styles/Base/TabViewStyle.qml
@@ -81,7 +81,7 @@ import QtQuick.Controls.Private 1.0
Style {
- /*! The \l ScrollView attached to this style. */
+ /*! The \l ScrollView this style is attached to. */
readonly property TabView control: __control
/*! This property holds whether the user can move the tabs.
@@ -167,7 +167,7 @@ Style {
horizontalAlignment: Text.AlignHCenter
text: styleData.title
elide: Text.ElideMiddle
- renderType: Text.NativeRendering
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
scale: control.tabPosition === Qt.TopEdge ? 1 : -1
color: SystemPaletteSingleton.text(styleData.enabled)
Rectangle {
diff --git a/src/controls/Styles/Base/TableViewStyle.qml b/src/controls/Styles/Base/TableViewStyle.qml
index b59a38ca..ca4cc428 100644
--- a/src/controls/Styles/Base/TableViewStyle.qml
+++ b/src/controls/Styles/Base/TableViewStyle.qml
@@ -54,7 +54,7 @@ import QtQuick.Controls.Private 1.0
ScrollViewStyle {
id: root
- /*! The \l TableView attached to this style. */
+ /*! The \l TableView this style is attached to. */
readonly property TableView control: __control
/*! The text color. */
@@ -92,7 +92,7 @@ ScrollViewStyle {
text: styleData.value
elide: Text.ElideRight
color: textColor
- renderType: Text.NativeRendering
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
}
Rectangle {
anchors.right: parent.right
@@ -135,7 +135,7 @@ ScrollViewStyle {
elide: styleData.elideMode
text: styleData.value !== undefined ? styleData.value : ""
color: styleData.textColor
- renderType: Text.NativeRendering
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
}
}
}
diff --git a/src/controls/Styles/Base/TextAreaStyle.qml b/src/controls/Styles/Base/TextAreaStyle.qml
index 9f655bc4..cc154a5d 100644
--- a/src/controls/Styles/Base/TextAreaStyle.qml
+++ b/src/controls/Styles/Base/TextAreaStyle.qml
@@ -64,7 +64,7 @@ import QtQuick.Controls.Private 1.0
ScrollViewStyle {
id: style
- /*! The \l TextArea attached to this style. */
+ /*! The \l TextArea this style is attached to. */
readonly property TextArea control: __control
/*! The current font. */
@@ -90,12 +90,14 @@ ScrollViewStyle {
Supported render types are:
\list
\li Text.QtRendering
- \li Text.NativeRendering - the default
+ \li Text.NativeRendering
\endlist
+ The default value is platform dependent.
+
\sa Text::renderType
*/
- property int renderType: Text.NativeRendering
+ property int renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
/*! The default margin, in pixels, around the text in the TextArea.
\since QtQuick.Controls.Styles 1.3
diff --git a/src/controls/Styles/Base/TextFieldStyle.qml b/src/controls/Styles/Base/TextFieldStyle.qml
index 167e09c9..a7e5884a 100644
--- a/src/controls/Styles/Base/TextFieldStyle.qml
+++ b/src/controls/Styles/Base/TextFieldStyle.qml
@@ -68,7 +68,7 @@ import QtQuick.Controls.Private 1.0
Style {
id: style
- /*! The \l TextField attached to this style. */
+ /*! The \l TextField this style is attached to. */
readonly property TextField control: __control
/*! The content margins of the text field. */
@@ -95,12 +95,14 @@ Style {
Supported render types are:
\list
\li Text.QtRendering
- \li Text.NativeRendering - the default
+ \li Text.NativeRendering
\endlist
+ The default value is platform dependent.
+
\sa Text::renderType
*/
- property int renderType: Text.NativeRendering
+ property int renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
/*! The placeholder text color, used when the text field is empty.
\since QtQuick.Controls.Styles 1.1
diff --git a/src/controls/Styles/Base/ToolButtonStyle.qml b/src/controls/Styles/Base/ToolButtonStyle.qml
index 1f47675f..364b1b31 100644
--- a/src/controls/Styles/Base/ToolButtonStyle.qml
+++ b/src/controls/Styles/Base/ToolButtonStyle.qml
@@ -75,6 +75,7 @@ Style {
visible: !hasIcon
anchors.centerIn: parent
text: control.text
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
}
Image {
id: icon