on xenial help sign in
try overriding units.gu for the internal screen
ddc2cd3Michael Zanetti
qml/Components/VirtualTouchPad.qml+1−1
@@ -31,7 +31,7 @@ Item {
31 anchors.fill: parent
31 anchors.fill: parent
32
32
33 // FIXME: Once we have Qt DPR support, this should be Qt.styleHints.startDragDistance
33 // FIXME: Once we have Qt DPR support, this should be Qt.styleHints.startDragDistance
34− readonly property int clickThreshold: units.gu(1.5)
34+ readonly property int clickThreshold: internalGu * 1.5
35 property bool isClick: false
35 property bool isClick: false
36 property bool isDoubleClick: false
36 property bool isDoubleClick: false
37 property bool isDrag: false
37 property bool isDrag: false
qml/DisabledScreenNotice.qml+3−3
@@ -96,8 +96,8 @@ Item {
96
96
97 Column {
97 Column {
98 anchors.centerIn: parent
98 anchors.centerIn: parent
99− width: parent.width - units.gu(8)
99+ width: parent.width - (internalGu * 8)
100− spacing: units.gu(4)
100+ spacing: internalGu * 4
101
101
102 Label {
102 Label {
103 id: text
103 id: text
@@ -108,7 +108,7 @@ Item {
108 wrapMode: Text.Wrap
108 wrapMode: Text.Wrap
109 }
109 }
110 Icon {
110 Icon {
111− height: units.gu(8)
111+ height: internalGu * 8
112 width: height
112 width: height
113 name: "input-touchpad-symbolic"
113 name: "input-touchpad-symbolic"
114 color: "white"
114 color: "white"
src/SecondaryWindow.cpp+4
@@ -19,9 +19,13 @@
19// local
19// local
20#include <paths.h>
20#include <paths.h>
21
21
22+#include <QQmlContext>
23+
22SecondaryWindow::SecondaryWindow(QQmlEngine *engine)
24SecondaryWindow::SecondaryWindow(QQmlEngine *engine)
23 : QQuickView(engine, nullptr)
25 : QQuickView(engine, nullptr)
24{
26{
27+ QByteArray pxpgu = qgetenv("GRID_UNIT_PX");
28+ engine->rootContext()->setContextProperty("internalGu", pxpgu.toInt());
25 setResizeMode(QQuickView::SizeRootObjectToView);
29 setResizeMode(QQuickView::SizeRootObjectToView);
26 setColor("black");
30 setColor("black");
27 setTitle(QStringLiteral("Unity8 Shell - Secondary Screen"));
31 setTitle(QStringLiteral("Unity8 Shell - Secondary Screen"));