summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/controls/Label.qml4
-rw-r--r--src/controls/Private/qquickcontrolsettings.cpp9
-rw-r--r--src/controls/Private/qquickcontrolsettings_p.h2
-rw-r--r--src/controls/Styles/Base/ButtonStyle.qml2
-rw-r--r--src/controls/Styles/Base/CheckBoxStyle.qml2
-rw-r--r--src/controls/Styles/Base/ComboBoxStyle.qml6
-rw-r--r--src/controls/Styles/Base/GroupBoxStyle.qml2
-rw-r--r--src/controls/Styles/Base/MenuBarStyle.qml2
-rw-r--r--src/controls/Styles/Base/MenuStyle.qml6
-rw-r--r--src/controls/Styles/Base/RadioButtonStyle.qml2
-rw-r--r--src/controls/Styles/Base/SpinBoxStyle.qml6
-rw-r--r--src/controls/Styles/Base/TabViewStyle.qml2
-rw-r--r--src/controls/Styles/Base/TableViewStyle.qml4
-rw-r--r--src/controls/Styles/Base/TextAreaStyle.qml6
-rw-r--r--src/controls/Styles/Base/TextFieldStyle.qml6
-rw-r--r--src/controls/Styles/Base/ToolButtonStyle.qml1
16 files changed, 42 insertions, 20 deletions
diff --git a/src/controls/Label.qml b/src/controls/Label.qml
index e3052f445..0b3a65055 100644
--- a/src/controls/Label.qml
+++ b/src/controls/Label.qml
@@ -39,6 +39,8 @@
****************************************************************************/
import QtQuick 2.2
+import QtQuick.Controls 1.2
+import QtQuick.Controls.Private 1.0
/*!
\qmltype Label
@@ -85,7 +87,7 @@ Text {
id: label
color: pal.windowText
activeFocusOnTab: false
- renderType: Text.NativeRendering
+ renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
SystemPalette {
id: pal
colorGroup: enabled ? SystemPalette.Active : SystemPalette.Disabled
diff --git a/src/controls/Private/qquickcontrolsettings.cpp b/src/controls/Private/qquickcontrolsettings.cpp
index ee1b57dfe..f05df0d5b 100644
--- a/src/controls/Private/qquickcontrolsettings.cpp
+++ b/src/controls/Private/qquickcontrolsettings.cpp
@@ -82,6 +82,15 @@ bool QQuickControlSettings::hasTouchScreen() const
#endif
}
+bool QQuickControlSettings::isMobile() const
+{
+#if defined(Q_OS_IOS) || defined(Q_OS_ANDROID) || defined(Q_OS_BLACKBERRY) || defined(Q_OS_QNX) || defined(Q_OS_WINRT)
+ return true;
+#else
+ return false;
+#endif
+}
+
static QString styleImportPath(QQmlEngine *engine, const QString &styleName)
{
QString path = qgetenv("QT_QUICK_CONTROLS_STYLE");
diff --git a/src/controls/Private/qquickcontrolsettings_p.h b/src/controls/Private/qquickcontrolsettings_p.h
index 3f90862f9..72a1ca6a8 100644
--- a/src/controls/Private/qquickcontrolsettings_p.h
+++ b/src/controls/Private/qquickcontrolsettings_p.h
@@ -50,6 +50,7 @@ class QQuickControlSettings : public QObject
Q_PROPERTY(qreal dpiScaleFactor READ dpiScaleFactor CONSTANT)
Q_PROPERTY(qreal dragThreshold READ dragThreshold CONSTANT)
Q_PROPERTY(bool hasTouchScreen READ hasTouchScreen CONSTANT)
+ Q_PROPERTY(bool isMobile READ isMobile CONSTANT)
public:
QQuickControlSettings(QQmlEngine *engine);
@@ -66,6 +67,7 @@ public:
qreal dragThreshold() const;
bool hasTouchScreen() const;
+ bool isMobile() const;
signals:
void styleChanged();
diff --git a/src/controls/Styles/Base/ButtonStyle.qml b/src/controls/Styles/Base/ButtonStyle.qml
index 426e7f612..54576b7fd 100644
--- a/src/controls/Styles/Base/ButtonStyle.qml
+++ b/src/controls/Styles/Base/ButtonStyle.qml
@@ -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/CheckBoxStyle.qml b/src/controls/Styles/Base/CheckBoxStyle.qml
index 5702ca754..a23c77210 100644
--- a/src/controls/Styles/Base/CheckBoxStyle.qml
+++ b/src/controls/Styles/Base/CheckBoxStyle.qml
@@ -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 92154d0a3..f71c8c98d 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
diff --git a/src/controls/Styles/Base/GroupBoxStyle.qml b/src/controls/Styles/Base/GroupBoxStyle.qml
index 2adc18d0f..22252a966 100644
--- a/src/controls/Styles/Base/GroupBoxStyle.qml
+++ b/src/controls/Styles/Base/GroupBoxStyle.qml
@@ -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 11b8069c5..40e6ea5d1 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)
}
}
diff --git a/src/controls/Styles/Base/MenuStyle.qml b/src/controls/Styles/Base/MenuStyle.qml
index ceb2bfca3..61202bae5 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/RadioButtonStyle.qml b/src/controls/Styles/Base/RadioButtonStyle.qml
index 3fda616a6..8f70d854c 100644
--- a/src/controls/Styles/Base/RadioButtonStyle.qml
+++ b/src/controls/Styles/Base/RadioButtonStyle.qml
@@ -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/SpinBoxStyle.qml b/src/controls/Styles/Base/SpinBoxStyle.qml
index 03863173d..14d728634 100644
--- a/src/controls/Styles/Base/SpinBoxStyle.qml
+++ b/src/controls/Styles/Base/SpinBoxStyle.qml
@@ -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 35491ad37..53da921f8 100644
--- a/src/controls/Styles/Base/TabViewStyle.qml
+++ b/src/controls/Styles/Base/TabViewStyle.qml
@@ -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 602049c44..ca4cc4288 100644
--- a/src/controls/Styles/Base/TableViewStyle.qml
+++ b/src/controls/Styles/Base/TableViewStyle.qml
@@ -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 a8dace6a5..cc154a5d2 100644
--- a/src/controls/Styles/Base/TextAreaStyle.qml
+++ b/src/controls/Styles/Base/TextAreaStyle.qml
@@ -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 ca6395140..a7e5884a7 100644
--- a/src/controls/Styles/Base/TextFieldStyle.qml
+++ b/src/controls/Styles/Base/TextFieldStyle.qml
@@ -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 1f47675fa..364b1b31e 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