on xenial help sign in
Remove dependency on MirSurfaceItem.fillMode property
0b54e5aDaniel d'Andrada
qml/Stages/SurfaceContainer.qml−1
@@ -81,7 +81,6 @@ FocusScope {
81 }
81 }
82 }
82 }
83
83
84− fillMode: root.resizeSurface ? MirSurfaceItem.PadOrCrop : MirSurfaceItem.Stretch
85 enabled: root.interactive
84 enabled: root.interactive
86 focus: true
85 focus: true
87 antialiasing: !root.interactive
86 antialiasing: !root.interactive
tests/mocks/Unity/Application/MirSurfaceItem.cpp−14
@@ -37,7 +37,6 @@ MirSurfaceItem::MirSurfaceItem(QQuickItem *parent)
37 , m_surfaceHeight(0)
37 , m_surfaceHeight(0)
38 , m_touchPressCount(0)
38 , m_touchPressCount(0)
39 , m_touchReleaseCount(0)
39 , m_touchReleaseCount(0)
40− , m_fillMode(Stretch)
41{
40{
42// qDebug() << "MirSurfaceItem::MirSurfaceItem() " << (void*)(this) << name();
41// qDebug() << "MirSurfaceItem::MirSurfaceItem() " << (void*)(this) << name();
43 setAcceptedMouseButtons(Qt::LeftButton | Qt::MiddleButton | Qt::RightButton |
42 setAcceptedMouseButtons(Qt::LeftButton | Qt::MiddleButton | Qt::RightButton |
@@ -306,16 +305,3 @@ void MirSurfaceItem::updateSurfaceSize()
306 m_qmlSurface->resize(m_surfaceWidth, m_surfaceHeight);
305 m_qmlSurface->resize(m_surfaceWidth, m_surfaceHeight);
307 }
306 }
308}
307}
309−
310−MirSurfaceItem::FillMode MirSurfaceItem::fillMode() const
311−{
312− return m_fillMode;
313−}
314−
315−void MirSurfaceItem::setFillMode(FillMode value)
316−{
317− if (m_fillMode != value) {
318− m_fillMode = value;
319− Q_EMIT fillModeChanged(m_fillMode);
320− }
321−}
tests/mocks/Unity/Application/MirSurfaceItem.h−5
@@ -62,9 +62,6 @@ public:
62 int surfaceHeight() const override;
62 int surfaceHeight() const override;
63 void setSurfaceHeight(int value) override;
63 void setSurfaceHeight(int value) override;
64
64
65− FillMode fillMode() const override;
66− void setFillMode(FillMode value) override;
67−
68 /////
65 /////
69 // For use in qml tests
66 // For use in qml tests
70
67
@@ -110,8 +107,6 @@ private:
110 int m_touchPressCount;
107 int m_touchPressCount;
111 int m_touchReleaseCount;
108 int m_touchReleaseCount;
112
109
113− FillMode m_fillMode;
114−
115 friend class SurfaceManager;
110 friend class SurfaceManager;
116};
111};
117
112