[declarativeimports] Use QtRendering on phone devices

Summary: Ref T4947

Test Plan: works on desktop at least, haven't tested on phone yet

Reviewers: #plasma, mart

Reviewed By: mart

Subscribers: plasma-devel

Tags: #plasma

Maniphest Tasks: T4947

Differential Revision: https://phabricator.kde.org/D3789
This commit is contained in:
Bhushan Shah 2016-12-22 17:51:33 +05:30
parent 9581ada651
commit 324232a745
6 changed files with 12 additions and 6 deletions

View File

@ -18,6 +18,8 @@
import QtQuick 2.1
import QtQuick.Controls.Private 1.0 as QtQuickControlsPrivate
import org.kde.plasma.core 2.0 as PlasmaCore
//import org.kde.plasma.components 2.0 as PlasmaComponents
//import org.kde.plasma.extras 2.0 as PlasmaExtras
@ -25,7 +27,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
Text {
renderType: Text.NativeRendering
renderType: QtQuickControlsPrivate.Settings.isMobile ? Text.QtRendering : Text.NativeRendering
font.pointSize: 22
//font.family: theme.defaultFont.family

View File

@ -18,6 +18,7 @@
*/
import QtQuick 2.1
import QtQuick.Controls.Private 1.0 as QtQuickControlsPrivate
import org.kde.plasma.core 2.0 as PlasmaCore
/**
@ -39,7 +40,7 @@ Text {
verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter
activeFocusOnTab: false
renderType: Text.NativeRendering
renderType: QtQuickControlsPrivate.Settings.isMobile ? Text.QtRendering : Text.NativeRendering
font.capitalization: theme.defaultFont.capitalization
font.family: theme.defaultFont.family

View File

@ -18,6 +18,7 @@
*/
import QtQuick 2.1
import QtQuick.Controls.Private 1.0 as QtQuickControlsPrivate
import org.kde.plasma.core 2.0 as PlasmaCore
/**
@ -93,7 +94,7 @@ Item {
id: label
text: dualButton.text
renderType: Text.NativeRendering
renderType: QtQuickControlsPrivate.Settings.isMobile ? Text.QtRendering : Text.NativeRendering
anchors {
top: parent.top
bottom: parent.bottom

View File

@ -20,6 +20,7 @@
import QtQuick 2.0
import QtQuick.Controls.Styles 1.1 as QtQuickControlStyle
import QtQuick.Controls.Private 1.0 as QtQuickControlsPrivate
import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
@ -38,7 +39,7 @@ QtQuickControlStyle.SpinBoxStyle {
selectedTextColor: theme.viewBackgroundColor
renderType: Text.NativeRendering
renderType: QtQuickControlsPrivate.Settings.isMobile ? Text.QtRendering : Text.NativeRendering
PlasmaCore.Svg {
id: arrowSvg

View File

@ -41,7 +41,7 @@ QtQuickControlStyle.TextAreaStyle {
selectionColor: control.backgroundVisible ? theme.viewFocusColor : PlasmaCore.ColorScope.highlightColor
selectedTextColor: control.backgroundVisible ? theme.viewHighlightedTextColor : PlasmaCore.ColorScope.highlightedTextColor
renderType: Text.NativeRendering
renderType: QtQuickControlsPrivate.Settings.isMobile ? Text.QtRendering : Text.NativeRendering
frame: PlasmaCore.FrameSvgItem {
id: base

View File

@ -38,8 +38,9 @@ QtQuickControlStyle.TextFieldStyle {
* Since the password echo is a circle woithout vertical or horizontal lines, it won't be
* more blurred with different rendring types.
* Using Qt rendering, the dots will look more aligned and equally spaced.
* Also if we are on mobile, make sure we use QtRendering
*/
renderType: control.echoMode == TextInput.Normal ? Text.NativeRendering : Text.QtRendering
renderType: !QtQuickControlsPrivate.Settings.isMobile && control.echoMode == TextInput.Normal ? Text.NativeRendering : Text.QtRendering
background: Item {
//QQC button heights are max(backgroundHeight, label + margins).