Changeset View
Changeset View
Standalone View
Standalone View
examples/applets/testtheme/contents/ui/FontGizmo.qml
Show All 11 Lines | |||||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. | ||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | import QtQuick 2.1 | 19 | import QtQuick 2.1 | ||
20 | 20 | import QtQuick.Window 2.2 | |||
21 | import QtQuick.Controls 1.0 | 21 | import QtQuick.Controls 1.0 | ||
22 | import QtQuick.Controls.Private 1.0 as QtQuickControlsPrivate | 22 | import QtQuick.Controls.Private 1.0 as QtQuickControlsPrivate | ||
23 | 23 | | |||
24 | import org.kde.plasma.core 2.0 as PlasmaCore | 24 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
25 | //import org.kde.plasma.components 2.0 as PlasmaComponents | 25 | //import org.kde.plasma.components 2.0 as PlasmaComponents | ||
26 | //import org.kde.plasma.extras 2.0 as PlasmaExtras | 26 | //import org.kde.plasma.extras 2.0 as PlasmaExtras | ||
27 | //import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons | 27 | //import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons | ||
28 | 28 | | |||
29 | Text { | 29 | Text { | ||
30 | 30 | | |||
31 | renderType: QtQuickControlsPrivate.Settings.isMobile ? Text.QtRendering : Text.NativeRendering | 31 | // Work around Qt bug where NativeRendering breaks for non-integer scale factors | ||
32 | // https://bugreports.qt.io/browse/QTBUG-67007 | ||||
33 | renderType: QtQuickControlsPrivate.Settings.isMobile || Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering | ||||
32 | font.pointSize: 22 | 34 | font.pointSize: 22 | ||
33 | 35 | | |||
34 | //font.family: theme.defaultFont.family | 36 | //font.family: theme.defaultFont.family | ||
35 | font.family: fontCheck.text | 37 | font.family: fontCheck.text | ||
36 | font.weight: lightCheck.checked ? Font.Light : Font.Normal | 38 | font.weight: lightCheck.checked ? Font.Light : Font.Normal | ||
37 | text: "Lesley 40:83 - (" + font.family + ")" | 39 | text: "Lesley 40:83 - (" + font.family + ")" | ||
38 | height: paintedHeightCheck.checked ? paintedHeight : 22 | 40 | height: paintedHeightCheck.checked ? paintedHeight : 22 | ||
39 | //anchors.fill: parent | 41 | //anchors.fill: parent | ||
Show All 30 Lines |