Merge lp:~dandrader/unity8/surfaceItemFillMode into lp:unity8

Proposed by Daniel d'Andrada
Status: Merged
Approved by: Michał Sawicz
Approved revision: 2076
Merged at revision: 2080
Proposed branch: lp:~dandrader/unity8/surfaceItemFillMode
Merge into: lp:unity8
Diff against target: 93 lines (+18/-4)
5 files modified
CMakeLists.txt (+1/-1)
debian/control (+3/-3)
qml/Stages/SurfaceContainer.qml (+1/-0)
tests/mocks/Unity/Application/MirSurfaceItem.cpp (+8/-0)
tests/mocks/Unity/Application/MirSurfaceItem.h (+5/-0)
To merge this branch: bzr merge lp:~dandrader/unity8/surfaceItemFillMode
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+279010@code.launchpad.net

Commit message

MirSurfaceItem got a new property: fillMode

And put it to use in SurfaceContainer. That's the final piece to finally get rid of stretched windows

Description of the change

* Are there any related MPs required for this MP to build/function as expected? Please list.
https://code.launchpad.net/~dandrader/unity-api/surfaceItemFillMode2/+merge/278955
https://code.launchpad.net/~dandrader/qtmir/surfaceItemFillMode/+merge/274750

* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

* Did you make sure that your branch does not contain spurious tags?
Yes

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
Not applicable

* If you changed the UI, has there been a design review?
Not applicable

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Initialize m_fillMode to something even if it's only a mock?

2076. By Daniel d'Andrada

Initialize m_fillMode in MirSurfaceItem mock

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

On 01/12/2015 06:45, Albert Astals Cid wrote:
> Initialize m_fillMode to something even if it's only a mock?

Done.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Y
 * Did CI run pass? If not, please explain why.
Not enough unity-api
 * Did you make sure that the branch does not contain spurious tags?
Y

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2015-11-26 13:51:24 +0000
+++ CMakeLists.txt 2015-12-01 10:36:00 +0000
@@ -57,7 +57,7 @@
57find_package(Qt5Concurrent 5.4 REQUIRED)57find_package(Qt5Concurrent 5.4 REQUIRED)
58find_package(Qt5Sql 5.4 REQUIRED)58find_package(Qt5Sql 5.4 REQUIRED)
5959
60pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=11)60pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=12)
6161
62# Standard install paths62# Standard install paths
63include(GNUInstallDirs)63include(GNUInstallDirs)
6464
=== modified file 'debian/control'
--- debian/control 2015-11-26 13:51:24 +0000
+++ debian/control 2015-12-01 10:36:00 +0000
@@ -29,7 +29,7 @@
29 libqt5xmlpatterns5-dev,29 libqt5xmlpatterns5-dev,
30 libsystemsettings-dev,30 libsystemsettings-dev,
31 libudev-dev,31 libudev-dev,
32 libunity-api-dev (>= 7.103),32 libunity-api-dev (>= 7.104),
33 libusermetricsoutput1-dev,33 libusermetricsoutput1-dev,
34 libxcb1-dev,34 libxcb1-dev,
35 pkg-config,35 pkg-config,
@@ -128,7 +128,7 @@
128 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1627) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1627),128 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1627) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1627),
129 qtdeclarative5-unity-notifications-plugin (>= 0.1.2) | unity-notifications-impl,129 qtdeclarative5-unity-notifications-plugin (>= 0.1.2) | unity-notifications-impl,
130 ubuntu-thumbnailer-impl-0,130 ubuntu-thumbnailer-impl-0,
131 unity-application-impl-11,131 unity-application-impl-12,
132 unity-notifications-impl-3,132 unity-notifications-impl-3,
133 unity-plugin-scopes | unity-scopes-impl,133 unity-plugin-scopes | unity-scopes-impl,
134 unity-scopes-impl-7,134 unity-scopes-impl-7,
@@ -174,7 +174,7 @@
174Depends: ${misc:Depends},174Depends: ${misc:Depends},
175 ${shlibs:Depends},175 ${shlibs:Depends},
176Provides: unity-application-impl,176Provides: unity-application-impl,
177 unity-application-impl-11,177 unity-application-impl-12,
178Replaces: unity8-autopilot (<< 8.02+15.04.20150422-0ubuntu1)178Replaces: unity8-autopilot (<< 8.02+15.04.20150422-0ubuntu1)
179Description: Fake environment for running Unity 8 shell179Description: Fake environment for running Unity 8 shell
180 Provides fake implementations of some QML modules used by Unity 8 shell180 Provides fake implementations of some QML modules used by Unity 8 shell
181181
=== modified file 'qml/Stages/SurfaceContainer.qml'
--- qml/Stages/SurfaceContainer.qml 2015-11-09 12:04:46 +0000
+++ qml/Stages/SurfaceContainer.qml 2015-12-01 10:36:00 +0000
@@ -55,6 +55,7 @@
55 id: surfaceItem55 id: surfaceItem
56 objectName: "surfaceItem"56 objectName: "surfaceItem"
5757
58 fillMode: MirSurfaceItem.PadOrCrop
58 consumesInput: true59 consumesInput: true
5960
60 surfaceWidth: {61 surfaceWidth: {
6162
=== modified file 'tests/mocks/Unity/Application/MirSurfaceItem.cpp'
--- tests/mocks/Unity/Application/MirSurfaceItem.cpp 2015-11-09 12:04:46 +0000
+++ tests/mocks/Unity/Application/MirSurfaceItem.cpp 2015-12-01 10:36:00 +0000
@@ -305,3 +305,11 @@
305 m_qmlSurface->resize(m_surfaceWidth, m_surfaceHeight);305 m_qmlSurface->resize(m_surfaceWidth, m_surfaceHeight);
306 }306 }
307}307}
308
309void MirSurfaceItem::setFillMode(FillMode value)
310{
311 if (value != m_fillMode) {
312 m_fillMode = value;
313 Q_EMIT fillModeChanged(m_fillMode);
314 }
315}
308316
=== modified file 'tests/mocks/Unity/Application/MirSurfaceItem.h'
--- tests/mocks/Unity/Application/MirSurfaceItem.h 2015-11-09 12:04:46 +0000
+++ tests/mocks/Unity/Application/MirSurfaceItem.h 2015-12-01 10:36:00 +0000
@@ -62,6 +62,9 @@
62 int surfaceHeight() const override;62 int surfaceHeight() const override;
63 void setSurfaceHeight(int value) override;63 void setSurfaceHeight(int value) override;
6464
65 FillMode fillMode() const override { return m_fillMode; }
66 void setFillMode(FillMode value) override;
67
65 /////68 /////
66 // For use in qml tests69 // For use in qml tests
6770
@@ -107,6 +110,8 @@
107 int m_touchPressCount;110 int m_touchPressCount;
108 int m_touchReleaseCount;111 int m_touchReleaseCount;
109112
113 FillMode m_fillMode{Stretch};
114
110 friend class SurfaceManager;115 friend class SurfaceManager;
111};116};
112117

Subscribers

People subscribed via source and target branches