on xenial help sign in
checkpoint charlie
commit897d84d029ff4e83c5890fe1872725c4f8dd3322 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 14 Sep 2016, 13:25 (10 years ago) parentb48c906
6 files changed+21−22
CMakeLists.txt+1−1 qml/Stage/DecoratedWindow.qml+1−1 qml/Stage/MoveHandler.qml+2−2 qml/Stage/Stage.qml+6−11 tests/qmltests/CMakeLists.txt+1−1 tests/qmltests/Stage/tst_WindowResizeArea.qml+10−6
CMakeLists.txt+1−1
@@ -57,7 +57,7 @@ find_package(Qt5DBus 5.4 REQUIRED)
5757find_package(Qt5Concurrent 5.4 REQUIRED)
5858find_package(Qt5Sql 5.4 REQUIRED)
5959
60−pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=22)
60+pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application>=21)
6161pkg_check_modules(GEONAMES REQUIRED geonames>=0.2)
6262pkg_check_modules(GIO REQUIRED gio-2.0>=2.32)
6363pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32)
qml/Stage/DecoratedWindow.qml+1−1
@@ -128,7 +128,7 @@ FocusScope {
128128 fill: root
129129 margins: active ? -units.gu(2) : -units.gu(1.5)
130130 }
131− source: "../graphics/dropshadow2gu@30.sci"
131+ source: "../graphics/dropshadow2gu.sci"
132132 opacity: root.shadowOpacity
133133 }
134134
qml/Stage/MoveHandler.qml+2−2
@@ -112,8 +112,8 @@ QtObject {
112112 // Use integer coordinate values to ensure that target is left in a pixel-aligned
113113 // position. Mouse movement could have subpixel precision, yielding a fractional
114114 // mouse position.
115− target.requestedX = Math.round(pos.x - priv.distanceX);
116− target.requestedY = Math.round(Math.max(pos.y - priv.distanceY, PanelState.panelHeight));
115+ target.windowedX = Math.round(pos.x - priv.distanceX);
116+ target.windowedY = Math.round(Math.max(pos.y - priv.distanceY, PanelState.panelHeight));
117117
118118 if (sensingPoints) { // edge/corner detection when dragging via the touch overlay
119119 if (sensingPoints.topLeft.x < priv.triggerArea && sensingPoints.topLeft.y < PanelState.panelHeight + priv.triggerArea
qml/Stage/Stage.qml+6−11
@@ -280,11 +280,6 @@ AbstractStage {
280280 onCloseClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.close(); } }
281281 onMinimizeClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.minimize(); } }
282282 onRestoreClicked: { if (priv.focusedAppDelegate) { priv.focusedAppDelegate.restoreFromMaximized(); } }
283− onFocusMaximizedApp: {
284− if (priv.foregroundMaximizedAppDelegate) {
285− priv.foregroundMaximizedAppDelegate.focus = true;
286− }
287− }
288283 }
289284
290285 Binding {
@@ -579,15 +574,15 @@ AbstractStage {
579574 // Do not write to those, they will be set by states
580575 property real requestedX: windowedX
581576 property real requestedY: windowedY
582− property int requestedWidth: windowedWidth
583− property int requestedHeight: windowedHeight
577+ property real requestedWidth
578+ property real requestedHeight
584579
585580 // In those are for windowed mode. Those values basically store the window's properties
586581 // when having a floating window. If you want to move/resize a window in normal mode, this is what you want to write to.
587− property int windowedX: priv.focusedAppDelegate ? priv.focusedAppDelegate.x + units.gu(3) : (normalZ - 1) * units.gu(3)
588− property int windowedY: priv.focusedAppDelegate ? priv.focusedAppDelegate.y + units.gu(3) : normalZ * units.gu(3)
589− property int windowedWidth
590− property int windowedHeight
582+ property real windowedX: priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedX + units.gu(3) : (normalZ - 1) * units.gu(3)
583+ property real windowedY: priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedY + units.gu(3) : normalZ * units.gu(3)
584+ property real windowedWidth
585+ property real windowedHeight
591586
592587 Binding {
593588 target: appDelegate
tests/qmltests/CMakeLists.txt+1−1
@@ -92,7 +92,7 @@ add_unity8_qmltest(Stages PhoneStage)
9292add_unity8_qmltest(Stages SpreadDelegate)
9393add_unity8_qmltest(Stages SurfaceContainer)
9494add_unity8_qmltest(Stages TabletStage)
95−add_unity8_qmltest(Stages WindowResizeArea)
95+add_unity8_qmltest(Stage WindowResizeArea)
9696add_unity8_qmltest(Stage Splash)
9797add_unity8_qmltest(Stage DecoratedWindow)
9898add_unity8_qmltest(Tutorial Tutorial)
tests/qmltests/Stage/tst_WindowResizeArea.qml+10−6
@@ -20,7 +20,7 @@ import QtTest 1.0
2020import Unity.Test 0.1
2121import ".."
2222import "../../../qml/Components/PanelState"
23−import "../../../qml/Stages"
23+import "../../../qml/Stage"
2424import Ubuntu.Components 1.3
2525import Ubuntu.Components.ListItems 1.3 as ListItem
2626import Unity.Application 0.1
@@ -34,7 +34,7 @@ Item {
3434 Binding {
3535 target: PanelState
3636 property: "panelHeight"
37− value: units.gu(2)
37+ value: units.gu(3)
3838 }
3939
4040 Component {
@@ -46,12 +46,16 @@ Item {
4646 property alias resizeAreaMinHeight: windowResizeArea.minHeight
4747 x: requestedX
4848 y: requestedY
49− property real requestedX: units.gu(20)
50− property real requestedY: units.gu(20)
49+ property real requestedX: windowedX
50+ property real requestedY: windowedY
5151 width: requestedWidth
5252 height: requestedHeight
53− property real requestedWidth
54− property real requestedHeight
53+ property real requestedWidth: windowedWidth
54+ property real requestedHeight: windowedHeight
55+ property real windowedX: units.gu(20)
56+ property real windowedY: units.gu(20)
57+ property real windowedWidth
58+ property real windowedHeight
5559 property real minimumWidth: 0
5660 property real minimumHeight: 0
5761 property real maximumWidth: 0