From f5d2066e7603f1292d9f2b15e364490db8b53b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Sat, 25 Jan 2014 02:51:56 +0100 Subject: [PATCH] Icons to test icon sizing in theme test plasmoid --- .../testcomponents/contents/ui/IconsPage.qml | 2 +- .../testtheme/contents/ui/ScalePage.qml | 51 +++++++++++++++---- .../testtheme/contents/ui/testtheme.qml | 4 +- 3 files changed, 44 insertions(+), 13 deletions(-) diff --git a/examples/applets/testcomponents/contents/ui/IconsPage.qml b/examples/applets/testcomponents/contents/ui/IconsPage.qml index 5d3fd15c4..834cdc2c3 100644 --- a/examples/applets/testcomponents/contents/ui/IconsPage.qml +++ b/examples/applets/testcomponents/contents/ui/IconsPage.qml @@ -63,7 +63,7 @@ PlasmaComponents.Page { height: width } PlasmaCore.IconItem { - source: "resize-tr2bl" + source: "folder-green" width: _h height: width } diff --git a/examples/applets/testtheme/contents/ui/ScalePage.qml b/examples/applets/testtheme/contents/ui/ScalePage.qml index 666122a9a..d8320b94e 100644 --- a/examples/applets/testtheme/contents/ui/ScalePage.qml +++ b/examples/applets/testtheme/contents/ui/ScalePage.qml @@ -23,19 +23,12 @@ import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.qtextracomponents 2.0 as QtExtras -// IconTab - Item { - property int cheight: 48 property int cwidth: themePage.width / 1.2 property int _m: units.gridUnit / 2 * units.devicePixelRatio - id: themePage -// anchors { -// } - Column { id: col spacing: _m @@ -70,9 +63,6 @@ Item { id: dpilabel } } - Row { - - } } PlasmaComponents.Label { id: cheatLabel @@ -99,5 +89,46 @@ Item { fillMode: Image.PreserveAspectFit source: "../images/orangutan.jpg" } + Flow { + anchors { + left: parent.left + bottom: parent.bottom + right: parent.right + } + //height: _h + //width: parent.width + spacing: units.smallSpacing + PlasmaCore.IconItem { + source: "configure" + width: units.iconSizes.small + height: width + } + PlasmaCore.IconItem { + source: "dialog-ok" + width: units.iconSizes.smallMedium + height: width + } + PlasmaCore.IconItem { + source: "resize-tr2bl" + width: units.iconSizes.medium + height: width + } + PlasmaCore.IconItem { + source: "akonadi" + width: units.iconSizes.large + height: width + } + PlasmaCore.IconItem { + source: "clock" + width: units.iconSizes.huge + height: width + } + QtExtras.QIconItem { + icon: "preferences-desktop-icons" + width: units.iconSizes.enormous + height: width + } + + } } diff --git a/examples/applets/testtheme/contents/ui/testtheme.qml b/examples/applets/testtheme/contents/ui/testtheme.qml index a23ca2c4a..439840d14 100644 --- a/examples/applets/testtheme/contents/ui/testtheme.qml +++ b/examples/applets/testtheme/contents/ui/testtheme.qml @@ -32,7 +32,7 @@ Item { property int minimumHeight: units.gridUnit * 10 property int _s: units.iconSizes.small - property int _h: units.iconSizes.default + property int _h: units.iconSizes.medium PlasmaComponents.TabBar { id: tabBar @@ -94,7 +94,7 @@ Item { print("Setting units.devicePixelRatio: " + r); units.devicePixelRatio = r; if (value == 0) { - value = units.devicePixelRatio; + value = units.devicePixelRatio * 96; } }