on xenial help sign in
adjust sizes
bde9c11Michael Zanetti
Launcher/LauncherDelegate.qml+10−6
@@ -79,9 +79,9 @@ Item {
79 left: parent.left
79 left: parent.left
80 top: parent.top
80 top: parent.top
81 }
81 }
82− width: Math.min(units.gu(7.5), Math.max(units.gu(4), countLabel.implicitWidth + units.gu(2)))
82+ width: Math.min(units.gu(7.5), Math.max(units.gu(3), countLabel.implicitWidth + units.gu(2)))
83− height: units.gu(4)
83+ height: units.gu(3)
84− source: "graphics/notification@30.sci"
84+ source: "graphics/notification.sci"
85 visible: root.count > 0
85 visible: root.count > 0
86
86
87 Label {
87 Label {
@@ -96,6 +96,7 @@ Item {
96 horizontalAlignment: Text.AlignHCenter
96 horizontalAlignment: Text.AlignHCenter
97 elide: Text.ElideRight
97 elide: Text.ElideRight
98 color: "white"
98 color: "white"
99+ fontSize: "x-small"
99 }
100 }
100 }
101 }
101
102
@@ -105,10 +106,13 @@ Item {
105 left: parent.left
106 left: parent.left
106 right: parent.right
107 right: parent.right
107 bottom: parent.bottom
108 bottom: parent.bottom
108− margins: units.dp(3)
109+ leftMargin: units.gu(0.5)
110+ rightMargin: units.gu(0.5)
111+ bottomMargin: units.gu(1)
109 }
112 }
113+ height: units.gu(2)
110 visible: root.progress > -1
114 visible: root.progress > -1
111− source: "graphics/progressbar-trough@30.sci"
115+ source: "graphics/progressbar-trough.sci"
112
116
113 // For fill calculation we need to remove the 3 units of border defined in .sci file
117 // For fill calculation we need to remove the 3 units of border defined in .sci file
114 property int adjustedWidth: width - units.gu(3)
118 property int adjustedWidth: width - units.gu(3)
@@ -118,7 +122,7 @@ Item {
118 fill: parent
122 fill: parent
119 rightMargin: parent.adjustedWidth - (Math.min(100, root.progress) * parent.adjustedWidth / 100)
123 rightMargin: parent.adjustedWidth - (Math.min(100, root.progress) * parent.adjustedWidth / 100)
120 }
124 }
121− source: "graphics/progressbar-fill@30.sci"
125+ source: "graphics/progressbar-fill.sci"
122
126
123 // Because of the borders in the borderimage we can't make it smaller than 10%
127 // Because of the borders in the borderimage we can't make it smaller than 10%
124 // Let's just fade in from 0 to 10% instead and then fill the bar.
128 // Let's just fade in from 0 to 10% instead and then fill the bar.
tests/mocks/Unity/Launcher/MockLauncherModel.cpp+9−11
@@ -23,35 +23,33 @@
23MockLauncherModel::MockLauncherModel(QObject* parent): LauncherModelInterface(parent)
23MockLauncherModel::MockLauncherModel(QObject* parent): LauncherModelInterface(parent)
24{
24{
25 MockLauncherItem *item = new MockLauncherItem("phone-app", "/usr/share/applications/phone-app.desktop", "Phone", "phone-app", this);
25 MockLauncherItem *item = new MockLauncherItem("phone-app", "/usr/share/applications/phone-app.desktop", "Phone", "phone-app", this);
26+ item->setProgress(0);
26 m_list.append(item);
27 m_list.append(item);
27 item = new MockLauncherItem("camera-app", "/usr/share/applications/camera-app.desktop", "Camera", "camera", this);
28 item = new MockLauncherItem("camera-app", "/usr/share/applications/camera-app.desktop", "Camera", "camera", this);
28− item->setCount(1234567);
29− item->setProgress(150);
29+ item->setProgress(10);
30 m_list.append(item);
30 m_list.append(item);
31 item = new MockLauncherItem("gallery-app", "/usr/share/applications/gallery-app.desktop", "Gallery", "gallery", this);
31 item = new MockLauncherItem("gallery-app", "/usr/share/applications/gallery-app.desktop", "Gallery", "gallery", this);
32− item->setProgress(100);
32+ item->setProgress(50);
33 m_list.append(item);
33 m_list.append(item);
34 item = new MockLauncherItem("facebook-webapp", "/usr/share/applications/facebook-webapp.desktop", "Facebook", "facebook", this);
34 item = new MockLauncherItem("facebook-webapp", "/usr/share/applications/facebook-webapp.desktop", "Facebook", "facebook", this);
35− item->setCount(123456);
35+ item->setProgress(100);
36 m_list.append(item);
36 m_list.append(item);
37 item = new MockLauncherItem("webbrowser-app", "/usr/share/applications/webbrowser-app.desktop", "Browser", "browser", this);
37 item = new MockLauncherItem("webbrowser-app", "/usr/share/applications/webbrowser-app.desktop", "Browser", "browser", this);
38− item->setProgress(50);
38+ item->setProgress(150);
39 m_list.append(item);
39 m_list.append(item);
40 item = new MockLauncherItem("twitter-webapp", "/usr/share/applications/twitter-webapp.desktop", "Twitter", "twitter", this);
40 item = new MockLauncherItem("twitter-webapp", "/usr/share/applications/twitter-webapp.desktop", "Twitter", "twitter", this);
41− item->setCount(12345);
41+ item->setCount(1);
42 m_list.append(item);
42 m_list.append(item);
43 item = new MockLauncherItem("gmail-webapp", "/usr/share/applications/gmail-webapp.desktop", "GMail", "gmail", this);
43 item = new MockLauncherItem("gmail-webapp", "/usr/share/applications/gmail-webapp.desktop", "GMail", "gmail", this);
44− item->setCount(123);
44+ item->setCount(12);
45 m_list.append(item);
45 m_list.append(item);
46 item = new MockLauncherItem("ubuntu-weather-app", "/usr/share/applications/ubuntu-weather-app.desktop", "Weather", "weather", this);
46 item = new MockLauncherItem("ubuntu-weather-app", "/usr/share/applications/ubuntu-weather-app.desktop", "Weather", "weather", this);
47− item->setCount(12);
47+ item->setCount(123);
48− item->setProgress(10);
49 m_list.append(item);
48 m_list.append(item);
50 item = new MockLauncherItem("notes-app", "/usr/share/applications/notes-app.desktop", "Notepad", "notepad", this);
49 item = new MockLauncherItem("notes-app", "/usr/share/applications/notes-app.desktop", "Notepad", "notepad", this);
51− item->setProgress(0);
50+ item->setCount(1234567890);
52 m_list.append(item);
51 m_list.append(item);
53 item = new MockLauncherItem("calendar-app", "/usr/share/applications/calendar-app.desktop","Calendar", "calendar", this);
52 item = new MockLauncherItem("calendar-app", "/usr/share/applications/calendar-app.desktop","Calendar", "calendar", this);
54− item->setCount(1);
55 m_list.append(item);
53 m_list.append(item);
56}
54}
57
55