on xenial help sign in
Manage Dash: Ellide properly
commita86209fe52308657b6f0b78bcace52054dd80f0c authorAlbert Astals <albert.astals@canonical.com> dateTue 16 Dec 2014, 10:03 (12 years ago) parentf0a4ab9
3 files changed+5−4
qml/Dash/ScopesListCategoryItem.qml+3−2 tests/mocks/Unity/fake_scopes.cpp+1−1 tests/mocks/Unity/fake_scopesoverview.cpp+1−1
qml/Dash/ScopesListCategoryItem.qml+3−2
@@ -61,12 +61,12 @@ MouseArea {
6161 anchors {
6262 left: shape.right
6363 leftMargin: units.gu(1)
64− right: starArea.right
65− rightMargin: units.gu(1)
64+ right: starArea.left
6665 verticalCenter: parent.verticalCenter
6766 }
6867 Label {
6968 id: titleLabel
69+ Layout.fillWidth: true
7070 elide: Text.ElideRight
7171 wrapMode: Text.Wrap
7272 maximumLineCount: 1
@@ -74,6 +74,7 @@ MouseArea {
7474 }
7575 Label {
7676 id: subtitleLabel
77+ Layout.fillWidth: true
7778 elide: Text.ElideRight
7879 fontSize: "xx-small"
7980 wrapMode: Text.Wrap
tests/mocks/Unity/fake_scopes.cpp+1−1
@@ -52,7 +52,7 @@ void Scopes::updateScopes()
5252 addScope(new Scope("MockScope1", "People", true, this));
5353 addScope(new Scope("MockScope2", "Music", false, this));
5454 addScope(new Scope("clickscope", "Apps", true, this));
55− addScope(new Scope("MockScope5", "Videos", true, this));
55+ addScope(new Scope("MockScope5", "Videos this is long ab cd ef gh ij kl", true, this));
5656 addScope(new Scope("SingleCategoryScope", "Single", true, this, 1));
5757 addScope(new Scope("MockScope4", "MS4", true, this));
5858 addScope(new Scope("MockScope6", "MS6", true, this));
tests/mocks/Unity/fake_scopesoverview.cpp+1−1
@@ -305,7 +305,7 @@ QVariant ScopesOverviewResultsModel::data(const QModelIndex& index, int role) co
305305 case RoleTitle:
306306 return scope ? scope->name() : QString("Title.%1.%2").arg(categoryId()).arg(index.row());
307307 case RoleSubtitle:
308− return scope && scope->name() == "Videos" ? "tube, movies, cinema" : QString();
308+ return scope && scope->name() == "Videos this is long ab cd ef gh ij kl" ? "tube, movies, cinema, pictures, art, moving images, magic in a box" : QString();
309309 case RoleArt:
310310 return qmlDirectory() + "graphics/applicationIcons/dash.png";
311311 case RoleMascot: