2015-11-06 21:53:26 +00:00
|
|
|
import QtQuick 2.5
|
|
|
|
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
|
|
|
|
2015-11-06 21:54:54 +00:00
|
|
|
GridLayout {
|
2015-11-06 21:53:26 +00:00
|
|
|
id: themetest
|
2015-11-06 21:54:54 +00:00
|
|
|
columns: 2
|
2015-12-08 01:07:31 +00:00
|
|
|
anchors.margins: MobileComponents.Units.gridUnit / 2
|
2015-11-06 21:53:26 +00:00
|
|
|
|
2015-12-03 22:27:27 +00:00
|
|
|
MobileComponents.Heading {
|
2015-11-06 21:54:54 +00:00
|
|
|
Layout.columnSpan: 2
|
|
|
|
text: "Theme Information"
|
2015-11-06 21:53:26 +00:00
|
|
|
}
|
|
|
|
|
2015-12-08 01:07:31 +00:00
|
|
|
MobileComponents.Heading {
|
|
|
|
text: "Screen"
|
|
|
|
Layout.columnSpan: 2
|
|
|
|
level: 3
|
|
|
|
}
|
2015-11-06 21:54:54 +00:00
|
|
|
FontMetrics {
|
|
|
|
id: fm
|
|
|
|
}
|
|
|
|
|
2015-11-29 16:30:41 +00:00
|
|
|
MobileComponents.Label {
|
2015-12-08 01:07:31 +00:00
|
|
|
text: "Geometry (pixels):"
|
2015-12-03 22:27:27 +00:00
|
|
|
}
|
|
|
|
MobileComponents.Label {
|
|
|
|
text: rootItem.width + "x" + rootItem.height
|
|
|
|
}
|
|
|
|
|
2015-12-08 01:07:31 +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-03 22:27:27 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
text: "Units.gridUnit:"
|
2015-11-06 21:54:54 +00:00
|
|
|
}
|
2015-11-29 16:30:41 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
text: MobileComponents.Units.gridUnit
|
2015-11-06 21:54:54 +00:00
|
|
|
}
|
|
|
|
|
2015-11-29 16:30:41 +00:00
|
|
|
MobileComponents.Label {
|
2015-12-03 22:27:27 +00:00
|
|
|
text: "Units.devicePixelRatio:"
|
2015-11-06 21:54:54 +00:00
|
|
|
}
|
2015-11-29 16:30:41 +00:00
|
|
|
MobileComponents.Label {
|
|
|
|
text: MobileComponents.Units.devicePixelRatio
|
2015-11-06 21:54:54 +00:00
|
|
|
}
|
|
|
|
|
2015-12-08 01:07:31 +00:00
|
|
|
MobileComponents.Heading {
|
|
|
|
text: "Font Metrics"
|
|
|
|
level: 3
|
|
|
|
Layout.columnSpan: 2
|
|
|
|
}
|
|
|
|
|
2015-11-29 16:30:41 +00:00
|
|
|
MobileComponents.Label {
|
2015-11-06 21:54:54 +00:00
|
|
|
text: "FontMetrics pointSize:"
|
|
|
|
}
|
2015-11-29 16:30:41 +00:00
|
|
|
MobileComponents.Label {
|
2015-11-06 21:54:54 +00:00
|
|
|
text: fm.font.pointSize
|
|
|
|
}
|
|
|
|
|
2015-11-29 16:30:41 +00:00
|
|
|
MobileComponents.Label {
|
2015-11-06 21:54:54 +00:00
|
|
|
text: "FontMetrics pixelSize:"
|
|
|
|
}
|
2015-11-29 16:30:41 +00:00
|
|
|
MobileComponents.Label {
|
2015-11-06 21:54:54 +00:00
|
|
|
text: fm.height
|
|
|
|
}
|
|
|
|
|
2015-11-29 16:30:41 +00:00
|
|
|
MobileComponents.Label {
|
2015-12-03 22:27:27 +00:00
|
|
|
text: "FontMetrics devicePixelRatio:"
|
2015-11-06 21:54:54 +00:00
|
|
|
}
|
2015-11-29 16:30:41 +00:00
|
|
|
MobileComponents.Label {
|
2015-11-06 21:54:54 +00:00
|
|
|
text: fm.height / fm.font.pointSize
|
|
|
|
}
|
2015-11-06 21:53:26 +00:00
|
|
|
|
2015-12-03 22:27:27 +00:00
|
|
|
MobileComponents.Label {
|
2015-11-06 21:57:01 +00:00
|
|
|
text: "Text item pixelSize:"
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
text: font.pixelSize
|
|
|
|
}
|
|
|
|
|
2015-12-03 22:27:27 +00:00
|
|
|
MobileComponents.Label {
|
2015-11-06 21:57:01 +00:00
|
|
|
text: "Text item pointSize:"
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
text: font.pointSize
|
|
|
|
}
|
|
|
|
|
2015-11-29 16:30:41 +00:00
|
|
|
MobileComponents.Label {
|
2015-11-06 21:54:54 +00:00
|
|
|
Layout.columnSpan: 2
|
|
|
|
Layout.fillHeight: true
|
2015-11-06 21:53:26 +00:00
|
|
|
}
|
|
|
|
}
|