on xenial help sign in
Requested design changes
commit6963f59f92c81ffa55ce0983cc6b99e700fdab6d authorAndrea Cimitan <andrea.cimitan@gmail.com> dateTue 7 Oct 2014, 12:11 (12 years ago) parent053f80a
2 files changed+7−3
qml/Launcher/LauncherDelegate.qml+6−3 tests/mocks/Unity/Launcher/MockLauncherModel.cpp+1
qml/Launcher/LauncherDelegate.qml+6−3
@@ -85,13 +85,17 @@ Item {
8585 }
8686
8787 UbuntuShape {
88+ id: countEmblem
8889 objectName: "countEmblem"
90+
91+ readonly property real pinMargin: pin.visible ? pin.width + units.gu(1) - anchors.leftMargin : 0
92+
8993 anchors {
9094 right: parent.right
9195 top: parent.top
9296 margins: units.dp(3)
9397 }
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)))
9599 height: units.gu(2)
96100 color: UbuntuColors.orange
97101 visible: root.countVisible
@@ -105,7 +109,7 @@ Item {
105109 // FIXME: verticalCenter seems to be off wee bit and QML doesn't have a centerLine
106110 // property for Text: https://bugreports.qt-project.org/browse/QTBUG-40479
107111 anchors.verticalCenterOffset: -units.dp(.5)
108− width: root.itemWidth - units.gu(1)
112+ width: root.itemWidth - units.gu(1) - countEmblem.pinMargin
109113 horizontalAlignment: Text.AlignHCenter
110114 elide: Text.ElideRight
111115 color: "white"
@@ -215,7 +219,6 @@ Item {
215219 uniform sampler2D source;
216220 uniform lowp float brightness;
217221 uniform lowp float itemOpacity;
218− uniform bool clipCorner;
219222 void main(void)
220223 {
221224 highp vec4 sourceColor = texture2D(source, qt_TexCoord0);
tests/mocks/Unity/Launcher/MockLauncherModel.cpp+1
@@ -54,6 +54,7 @@ MockLauncherModel::MockLauncherModel(QObject* parent): LauncherModelInterface(pa
5454 item = new MockLauncherItem("ubuntu-weather-app", "/usr/share/applications/ubuntu-weather-app.desktop", "Weather", "weather", this);
5555 item->setCount(1234567890);
5656 item->setCountVisible(true);
57+ item->setPinned(true);
5758 m_list.append(item);
5859 item = new MockLauncherItem("notes-app", "/usr/share/applications/notes-app.desktop", "Notepad", "notepad", this);
5960 item->setProgress(50);