Differential D11244 Diff 29408 src/declarativeimports/plasmacomponents/qml/private/DualStateButton.qml
Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/plasmacomponents/qml/private/DualStateButton.qml
Show All 12 Lines | |||||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU Library General Public | 14 | * You should have received a copy of the GNU Library General Public | ||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.1 | 20 | import QtQuick 2.1 | ||
21 | import QtQuick.Window 2.2 | ||||
21 | import QtQuick.Controls 1.0 | 22 | import QtQuick.Controls 1.0 | ||
22 | import QtQuick.Controls.Private 1.0 as QtQuickControlsPrivate | 23 | import QtQuick.Controls.Private 1.0 as QtQuickControlsPrivate | ||
23 | import org.kde.plasma.core 2.0 as PlasmaCore | 24 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
24 | 25 | | |||
25 | /** | 26 | /** | ||
26 | * Private base component for several public components. Any element documented here | 27 | * Private base component for several public components. Any element documented here | ||
27 | * can be used in components inheriting from DualStateButton. | 28 | * can be used in components inheriting from DualStateButton. | ||
28 | */ | 29 | */ | ||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 88 | anchors { | |||
90 | horizontalCenter: text ? undefined : parent.horizontalCenter | 91 | horizontalCenter: text ? undefined : parent.horizontalCenter | ||
91 | } | 92 | } | ||
92 | } | 93 | } | ||
93 | 94 | | |||
94 | Text { | 95 | Text { | ||
95 | id: label | 96 | id: label | ||
96 | 97 | | |||
97 | text: dualButton.text | 98 | text: dualButton.text | ||
98 | renderType: QtQuickControlsPrivate.Settings.isMobile ? Text.QtRendering : Text.NativeRendering | 99 | | ||
100 | // Work around Qt bug where NativeRendering breaks for non-integer scale factors | ||||
101 | // https://bugreports.qt.io/browse/QTBUG-67007 | ||||
102 | renderType: QtQuickControlsPrivate.Settings.isMobile || Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering | ||||
99 | anchors { | 103 | anchors { | ||
100 | top: parent.top | 104 | top: parent.top | ||
101 | bottom: parent.bottom | 105 | bottom: parent.bottom | ||
102 | left: surfaceLoader.right | 106 | left: surfaceLoader.right | ||
103 | right: parent.right | 107 | right: parent.right | ||
104 | //FIXME: see how this margin will be set | 108 | //FIXME: see how this margin will be set | ||
105 | leftMargin: height/4 | 109 | leftMargin: height/4 | ||
106 | } | 110 | } | ||
Show All 21 Lines |