on xenial help sign in
Requested design changes
6963f59Andrea Cimitan
qml/Launcher/LauncherDelegate.qml+6−3
@@ -85,13 +85,17 @@ Item {
85 }
85 }
86
86
87 UbuntuShape {
87 UbuntuShape {
88+ id: countEmblem
88 objectName: "countEmblem"
89 objectName: "countEmblem"
90+
91+ readonly property real pinMargin: pin.visible ? pin.width + units.gu(1) - anchors.leftMargin : 0
92+
89 anchors {
93 anchors {
90 right: parent.right
94 right: parent.right
91 top: parent.top
95 top: parent.top
92 margins: units.dp(3)
96 margins: units.dp(3)
93 }
97 }
94− width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
98+ width: Math.min(root.itemWidth - pinMargin, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
95 height: units.gu(2)
99 height: units.gu(2)
96 color: UbuntuColors.orange
100 color: UbuntuColors.orange
97 visible: root.countVisible
101 visible: root.countVisible
@@ -105,7 +109,7 @@ Item {
105 // FIXME: verticalCenter seems to be off wee bit and QML doesn't have a centerLine
109 // FIXME: verticalCenter seems to be off wee bit and QML doesn't have a centerLine
106 // property for Text: https://bugreports.qt-project.org/browse/QTBUG-40479
110 // property for Text: https://bugreports.qt-project.org/browse/QTBUG-40479
107 anchors.verticalCenterOffset: -units.dp(.5)
111 anchors.verticalCenterOffset: -units.dp(.5)
108− width: root.itemWidth - units.gu(1)
112+ width: root.itemWidth - units.gu(1) - countEmblem.pinMargin
109 horizontalAlignment: Text.AlignHCenter
113 horizontalAlignment: Text.AlignHCenter
110 elide: Text.ElideRight
114 elide: Text.ElideRight
111 color: "white"
115 color: "white"
@@ -215,7 +219,6 @@ Item {
215 uniform sampler2D source;
219 uniform sampler2D source;
216 uniform lowp float brightness;
220 uniform lowp float brightness;
217 uniform lowp float itemOpacity;
221 uniform lowp float itemOpacity;
218− uniform bool clipCorner;
219 void main(void)
222 void main(void)
220 {
223 {
221 highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
224 highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
tests/mocks/Unity/Launcher/MockLauncherModel.cpp+1
@@ -54,6 +54,7 @@ MockLauncherModel::MockLauncherModel(QObject* parent): LauncherModelInterface(pa
54 item = new MockLauncherItem("ubuntu-weather-app", "/usr/share/applications/ubuntu-weather-app.desktop", "Weather", "weather", this);
54 item = new MockLauncherItem("ubuntu-weather-app", "/usr/share/applications/ubuntu-weather-app.desktop", "Weather", "weather", this);
55 item->setCount(1234567890);
55 item->setCount(1234567890);
56 item->setCountVisible(true);
56 item->setCountVisible(true);
57+ item->setPinned(true);
57 m_list.append(item);
58 m_list.append(item);
58 item = new MockLauncherItem("notes-app", "/usr/share/applications/notes-app.desktop", "Notepad", "notepad", this);
59 item = new MockLauncherItem("notes-app", "/usr/share/applications/notes-app.desktop", "Notepad", "notepad", this);
59 item->setProgress(50);
60 item->setProgress(50);