2015-11-06 21:53:26 +00:00
|
|
|
import QtQuick 2.5
|
2016-02-13 01:26:26 +00:00
|
|
|
import QtQuick.Controls 1.4
|
2015-11-06 21:53:26 +00:00
|
|
|
import QtQuick.Layouts 1.1
|
2015-11-29 16:30:41 +00:00
|
|
|
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
2015-11-06 21:53:26 +00:00
|
|
|
|
2016-02-10 23:02:21 +00:00
|
|
|
MobileComponents.Page {
|
2016-02-12 20:17:43 +00:00
|
|
|
|
2016-02-13 06:26:47 +00:00
|
|
|
/* this can be done by hitting the back key
|
2016-02-12 20:17:43 +00:00
|
|
|
contextualActions: [
|
|
|
|
Action {
|
|
|
|
text: "Close Theme info"
|
|
|
|
iconName: "dialog-cancel"
|
|
|
|
onTriggered: {
|
|
|
|
stackView.pop()
|
|
|
|
contextDrawer.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2016-02-13 06:26:47 +00:00
|
|
|
*/
|
2016-02-10 23:11:04 +00:00
|
|
|
GridLayout {
|
|
|
|
id: themetest
|
|
|
|
columns: 2
|
|
|
|
anchors.margins: MobileComponents.Units.gridUnit / 2
|
2015-11-06 21:53:26 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Heading {
|
|
|
|
Layout.columnSpan: 2
|
|
|
|
text: "Theme Information"
|
|
|
|
}
|
2015-11-06 21:53:26 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Heading {
|
|
|
|
text: "Screen"
|
|
|
|
Layout.columnSpan: 2
|
|
|
|
level: 3
|
|
|
|
}
|
|
|
|
FontMetrics {
|
|
|
|
id: fm
|
|
|
|
}
|
2015-11-06 21:54:54 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
text: "Geometry (pixels):"
|
|
|
|
}
|
|
|
|
MobileComponents.Label {
|
|
|
|
text: rootItem.width + "x" + rootItem.height
|
|
|
|
}
|
2015-12-03 22:27:27 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
text: "Geometry (gridUnits):"
|
|
|
|
}
|
|
|
|
MobileComponents.Label {
|
|
|
|
text: Math.round(rootItem.width / MobileComponents.Units.gridUnit) + "x" + Math.round(rootItem.height / MobileComponents.Units.gridUnit)
|
|
|
|
}
|
2015-12-08 01:07:31 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
text: "Units.gridUnit:"
|
|
|
|
}
|
|
|
|
MobileComponents.Label {
|
|
|
|
text: MobileComponents.Units.gridUnit
|
|
|
|
}
|
2015-11-06 21:54:54 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
text: "Units.devicePixelRatio:"
|
|
|
|
}
|
|
|
|
MobileComponents.Label {
|
|
|
|
text: MobileComponents.Units.devicePixelRatio
|
|
|
|
}
|
2015-11-06 21:54:54 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Heading {
|
|
|
|
text: "Font Metrics"
|
|
|
|
level: 3
|
|
|
|
Layout.columnSpan: 2
|
|
|
|
}
|
2015-12-08 01:07:31 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
text: "FontMetrics pointSize:"
|
|
|
|
}
|
|
|
|
MobileComponents.Label {
|
|
|
|
text: fm.font.pointSize
|
|
|
|
}
|
2015-11-06 21:54:54 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
text: "FontMetrics pixelSize:"
|
|
|
|
}
|
|
|
|
MobileComponents.Label {
|
|
|
|
text: fm.height
|
|
|
|
}
|
2015-11-06 21:54:54 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
text: "FontMetrics devicePixelRatio:"
|
|
|
|
}
|
|
|
|
MobileComponents.Label {
|
|
|
|
text: fm.height / fm.font.pointSize
|
|
|
|
}
|
2015-11-06 21:53:26 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
text: "Text item pixelSize:"
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
text: font.pixelSize
|
|
|
|
}
|
2015-11-06 21:57:01 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
text: "Text item pointSize:"
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
text: font.pointSize
|
|
|
|
}
|
2015-11-06 21:57:01 +00:00
|
|
|
|
2016-02-10 23:11:04 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
Layout.columnSpan: 2
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
2015-11-06 21:53:26 +00:00
|
|
|
}
|
|
|
|
}
|