on xenial help sign in
adjust sizes
commitbde9c118303c47e80ea9fe4dbe4123a03b74405a authorMichael Zanetti <michael.zanetti@canonical.com> dateMon 19 Aug 2013, 22:02 (13 years ago) parenta8c472c
2 files changed+19−17
Launcher/LauncherDelegate.qml+10−6 tests/mocks/Unity/Launcher/MockLauncherModel.cpp+9−11
Launcher/LauncherDelegate.qml+10−6
@@ -79,9 +79,9 @@ Item {
7979 left: parent.left
8080 top: parent.top
8181 }
82− width: Math.min(units.gu(7.5), Math.max(units.gu(4), countLabel.implicitWidth + units.gu(2)))
83− height: units.gu(4)
84− source: "graphics/notification@30.sci"
82+ width: Math.min(units.gu(7.5), Math.max(units.gu(3), countLabel.implicitWidth + units.gu(2)))
83+ height: units.gu(3)
84+ source: "graphics/notification.sci"
8585 visible: root.count > 0
8686
8787 Label {
@@ -96,6 +96,7 @@ Item {
9696 horizontalAlignment: Text.AlignHCenter
9797 elide: Text.ElideRight
9898 color: "white"
99+ fontSize: "x-small"
99100 }
100101 }
101102
@@ -105,10 +106,13 @@ Item {
105106 left: parent.left
106107 right: parent.right
107108 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)
109112 }
113+ height: units.gu(2)
110114 visible: root.progress > -1
111− source: "graphics/progressbar-trough@30.sci"
115+ source: "graphics/progressbar-trough.sci"
112116
113117 // For fill calculation we need to remove the 3 units of border defined in .sci file
114118 property int adjustedWidth: width - units.gu(3)
@@ -118,7 +122,7 @@ Item {
118122 fill: parent
119123 rightMargin: parent.adjustedWidth - (Math.min(100, root.progress) * parent.adjustedWidth / 100)
120124 }
121− source: "graphics/progressbar-fill@30.sci"
125+ source: "graphics/progressbar-fill.sci"
122126
123127 // Because of the borders in the borderimage we can't make it smaller than 10%
124128 // 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 @@
2323MockLauncherModel::MockLauncherModel(QObject* parent): LauncherModelInterface(parent)
2424{
2525 MockLauncherItem *item = new MockLauncherItem("phone-app", "/usr/share/applications/phone-app.desktop", "Phone", "phone-app", this);
26+ item->setProgress(0);
2627 m_list.append(item);
2728 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);
3030 m_list.append(item);
3131 item = new MockLauncherItem("gallery-app", "/usr/share/applications/gallery-app.desktop", "Gallery", "gallery", this);
32− item->setProgress(100);
32+ item->setProgress(50);
3333 m_list.append(item);
3434 item = new MockLauncherItem("facebook-webapp", "/usr/share/applications/facebook-webapp.desktop", "Facebook", "facebook", this);
35− item->setCount(123456);
35+ item->setProgress(100);
3636 m_list.append(item);
3737 item = new MockLauncherItem("webbrowser-app", "/usr/share/applications/webbrowser-app.desktop", "Browser", "browser", this);
38− item->setProgress(50);
38+ item->setProgress(150);
3939 m_list.append(item);
4040 item = new MockLauncherItem("twitter-webapp", "/usr/share/applications/twitter-webapp.desktop", "Twitter", "twitter", this);
41− item->setCount(12345);
41+ item->setCount(1);
4242 m_list.append(item);
4343 item = new MockLauncherItem("gmail-webapp", "/usr/share/applications/gmail-webapp.desktop", "GMail", "gmail", this);
44− item->setCount(123);
44+ item->setCount(12);
4545 m_list.append(item);
4646 item = new MockLauncherItem("ubuntu-weather-app", "/usr/share/applications/ubuntu-weather-app.desktop", "Weather", "weather", this);
47− item->setCount(12);
48− item->setProgress(10);
47+ item->setCount(123);
4948 m_list.append(item);
5049 item = new MockLauncherItem("notes-app", "/usr/share/applications/notes-app.desktop", "Notepad", "notepad", this);
51− item->setProgress(0);
50+ item->setCount(1234567890);
5251 m_list.append(item);
5352 item = new MockLauncherItem("calendar-app", "/usr/share/applications/calendar-app.desktop","Calendar", "calendar", this);
54− item->setCount(1);
5553 m_list.append(item);
5654}
5755