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
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-11-26 13:51:24 +0000
3+++ CMakeLists.txt 2015-12-01 10:36:00 +0000
4@@ -57,7 +57,7 @@
5 find_package(Qt5Concurrent 5.4 REQUIRED)
6 find_package(Qt5Sql 5.4 REQUIRED)
7
8-pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=11)
9+pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=12)
10
11 # Standard install paths
12 include(GNUInstallDirs)
13
14=== modified file 'debian/control'
15--- debian/control 2015-11-26 13:51:24 +0000
16+++ debian/control 2015-12-01 10:36:00 +0000
17@@ -29,7 +29,7 @@
18 libqt5xmlpatterns5-dev,
19 libsystemsettings-dev,
20 libudev-dev,
21- libunity-api-dev (>= 7.103),
22+ libunity-api-dev (>= 7.104),
23 libusermetricsoutput1-dev,
24 libxcb1-dev,
25 pkg-config,
26@@ -128,7 +128,7 @@
27 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1627) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1627),
28 qtdeclarative5-unity-notifications-plugin (>= 0.1.2) | unity-notifications-impl,
29 ubuntu-thumbnailer-impl-0,
30- unity-application-impl-11,
31+ unity-application-impl-12,
32 unity-notifications-impl-3,
33 unity-plugin-scopes | unity-scopes-impl,
34 unity-scopes-impl-7,
35@@ -174,7 +174,7 @@
36 Depends: ${misc:Depends},
37 ${shlibs:Depends},
38 Provides: unity-application-impl,
39- unity-application-impl-11,
40+ unity-application-impl-12,
41 Replaces: unity8-autopilot (<< 8.02+15.04.20150422-0ubuntu1)
42 Description: Fake environment for running Unity 8 shell
43 Provides fake implementations of some QML modules used by Unity 8 shell
44
45=== modified file 'qml/Stages/SurfaceContainer.qml'
46--- qml/Stages/SurfaceContainer.qml 2015-11-09 12:04:46 +0000
47+++ qml/Stages/SurfaceContainer.qml 2015-12-01 10:36:00 +0000
48@@ -55,6 +55,7 @@
49 id: surfaceItem
50 objectName: "surfaceItem"
51
52+ fillMode: MirSurfaceItem.PadOrCrop
53 consumesInput: true
54
55 surfaceWidth: {
56
57=== modified file 'tests/mocks/Unity/Application/MirSurfaceItem.cpp'
58--- tests/mocks/Unity/Application/MirSurfaceItem.cpp 2015-11-09 12:04:46 +0000
59+++ tests/mocks/Unity/Application/MirSurfaceItem.cpp 2015-12-01 10:36:00 +0000
60@@ -305,3 +305,11 @@
61 m_qmlSurface->resize(m_surfaceWidth, m_surfaceHeight);
62 }
63 }
64+
65+void MirSurfaceItem::setFillMode(FillMode value)
66+{
67+ if (value != m_fillMode) {
68+ m_fillMode = value;
69+ Q_EMIT fillModeChanged(m_fillMode);
70+ }
71+}
72
73=== modified file 'tests/mocks/Unity/Application/MirSurfaceItem.h'
74--- tests/mocks/Unity/Application/MirSurfaceItem.h 2015-11-09 12:04:46 +0000
75+++ tests/mocks/Unity/Application/MirSurfaceItem.h 2015-12-01 10:36:00 +0000
76@@ -62,6 +62,9 @@
77 int surfaceHeight() const override;
78 void setSurfaceHeight(int value) override;
79
80+ FillMode fillMode() const override { return m_fillMode; }
81+ void setFillMode(FillMode value) override;
82+
83 /////
84 // For use in qml tests
85
86@@ -107,6 +110,8 @@
87 int m_touchPressCount;
88 int m_touchReleaseCount;
89
90+ FillMode m_fillMode{Stretch};
91+
92 friend class SurfaceManager;
93 };
94

Subscribers

People subscribed via source and target branches