plasma-framework/examples/applets/testtheme/contents/ui/FontGizmo.qml
Bhushan Shah 780be6f4ce Fix the renderType properties for various components
To use isMobile one need to import the QtQuickControls as well in
addition to QtQuickControls.Private

This fixes the warning flood at runtime

CCMAIL: faure@kde.org

I think p-f 5.30.0 tars need to be re-done with this.
2017-01-09 14:50:06 +05:30

70 lines
2.1 KiB
QML

/*
* Copyright 2014 Sebastian Kügler <sebas@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
*/
import QtQuick 2.1
import QtQuick.Controls 1.0
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
//import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons
Text {
renderType: QtQuickControlsPrivate.Settings.isMobile ? Text.QtRendering : Text.NativeRendering
font.pointSize: 22
//font.family: theme.defaultFont.family
font.family: fontCheck.text
font.weight: lightCheck.checked ? Font.Light : Font.Normal
text: "Lesley 40:83 - (" + font.family + ")"
height: paintedHeightCheck.checked ? paintedHeight : 22
//anchors.fill: parent
//spacing: units.smallSpacing/2
verticalAlignment: Text.AlignTop
Rectangle {
color: "yellow"
visible: boxesCheck.checked
height: 1
width: paintedWidth
anchors {
verticalCenter: parent.verticalCenter
left: parent.left
}
}
Rectangle {
color: "transparent"
border.width: 1
border.color: "green"
visible: boxesCheck.checked
height: parent.paintedHeight
width: paintedWidth
anchors {
top: parent.top
left: parent.left
}
}
}