on xenial help sign in
Temporary means to override GUs on the internal screen
3bff7ebMichael 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+4−4
@@ -96,19 +96,19 @@ 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
104 text: i18n.tr("Your device is now connected to an external display. Use this screen as a touch pad to interact with the pointer.")
104 text: i18n.tr("Your device is now connected to an external display. Use this screen as a touch pad to interact with the pointer.")
105 color: "white"
105 color: "white"
106 width: parent.width
106 width: parent.width
107− fontSize: "large"
107+ font.pixelSize: 2.5 * internalGu
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+9
@@ -19,9 +19,18 @@
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 pxpguEnv = qgetenv("GRID_UNIT_PX");
28+ bool ok;
29+ int pxpgu = pxpguEnv.toInt(&ok);
30+ if (!ok) {
31+ pxpgu = 8;
32+ }
33+ engine->rootContext()->setContextProperty("internalGu", pxpgu);
25 setResizeMode(QQuickView::SizeRootObjectToView);
34 setResizeMode(QQuickView::SizeRootObjectToView);
26 setColor("black");
35 setColor("black");
27 setTitle(QStringLiteral("Unity8 Shell - Secondary Screen"));
36 setTitle(QStringLiteral("Unity8 Shell - Secondary Screen"));