on xenial help sign in
Do not show a divider between each quicklist entry but just between each section, similar to how unity7 does. (LP: #1637478)
4833f30Andrea Azzarone
debian/control+3−3
@@ -38,7 +38,7 @@ Build-Depends: cmake,
38 libubuntugestures5-private-dev (>= 1.3.2030),
38 libubuntugestures5-private-dev (>= 1.3.2030),
39 libudev-dev,
39 libudev-dev,
40 libudm-common-dev,
40 libudm-common-dev,
41− libunity-api-dev (>= 7.119),
41+ libunity-api-dev (>= 7.120),
42 libusermetricsoutput1-dev,
42 libusermetricsoutput1-dev,
43# Need those X11 libs touch emulation from mouse events in manual QML tests on a X11 desktop
43# Need those X11 libs touch emulation from mouse events in manual QML tests on a X11 desktop
44 libx11-dev[!arm64 !armhf],
44 libx11-dev[!arm64 !armhf],
@@ -128,7 +128,7 @@ Depends: dmz-cursor-theme,
128 qtdeclarative5-ubuntu-telephony0.1,
128 qtdeclarative5-ubuntu-telephony0.1,
129 qtdeclarative5-ubuntu-web-plugin,
129 qtdeclarative5-ubuntu-web-plugin,
130 ubuntu-system-settings (>= 0.4),
130 ubuntu-system-settings (>= 0.4),
131− unity-launcher-impl-7,
131+ unity-launcher-impl-10,
132 unity8-common (= ${source:Version}),
132 unity8-common (= ${source:Version}),
133 unity8-private (= ${binary:Version}),
133 unity8-private (= ${binary:Version}),
134 unity8-private | unity-launcher-impl,
134 unity8-private | unity-launcher-impl,
@@ -225,7 +225,7 @@ Depends: accountsservice-ubuntu-schemas (>= 0.0.7),
225 ${misc:Depends},
225 ${misc:Depends},
226 ${shlibs:Depends},
226 ${shlibs:Depends},
227Provides: unity-launcher-impl,
227Provides: unity-launcher-impl,
228− unity-launcher-impl-7,
228+ unity-launcher-impl-10,
229Description: Unity 8 private libs
229Description: Unity 8 private libs
230 The Unity 8 shell is the primary user interface for Ubuntu devices.
230 The Unity 8 shell is the primary user interface for Ubuntu devices.
231 .
231 .
plugins/Greeter/Unity/Launcher/CMakeLists.txt+1−1
@@ -1,4 +1,4 @@
1−pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=9)
1+pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=10)
2pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
2pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
3
3
4add_definitions(-DSM_BUSNAME=systemBus)
4add_definitions(-DSM_BUSNAME=systemBus)
plugins/Unity/Launcher/CMakeLists.txt+1−1
@@ -1,4 +1,4 @@
1−pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=9)
1+pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=10)
2pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
2pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
3
3
4add_definitions(-DSM_BUSNAME=systemBus)
4add_definitions(-DSM_BUSNAME=systemBus)
plugins/Unity/Launcher/launcheritem.cpp+1
@@ -42,6 +42,7 @@ LauncherItem::LauncherItem(const QString &appId, const QString &name, const QStr
42 QuickListEntry nameAction;
42 QuickListEntry nameAction;
43 nameAction.setActionId(QStringLiteral("launch_item"));
43 nameAction.setActionId(QStringLiteral("launch_item"));
44 nameAction.setText(m_name);
44 nameAction.setText(m_name);
45+ nameAction.setHasSeparator(true);
45 m_quickList->appendAction(nameAction);
46 m_quickList->appendAction(nameAction);
46
47
47 QuickListEntry pinningAction;
48 QuickListEntry pinningAction;
plugins/Unity/Launcher/quicklistentry.cpp+11
@@ -19,6 +19,7 @@
19#include "quicklistentry.h"
19#include "quicklistentry.h"
20
20
21QuickListEntry::QuickListEntry()
21QuickListEntry::QuickListEntry()
22+ : m_hasSeparator(false)
22{
23{
23}
24}
24
25
@@ -57,6 +58,16 @@ bool QuickListEntry::clickable() const
57 return !m_actionId.isEmpty();
58 return !m_actionId.isEmpty();
58}
59}
59
60
61+void QuickListEntry::setHasSeparator(bool hasSeparator)
62+{
63+ m_hasSeparator = hasSeparator;
64+}
65+
66+bool QuickListEntry::hasSeparator() const
67+{
68+ return m_hasSeparator;
69+}
70+
60bool QuickListEntry::operator==(const QuickListEntry &other)
71bool QuickListEntry::operator==(const QuickListEntry &other)
61{
72{
62 return !other.actionId().isEmpty() && other.actionId() == m_actionId;
73 return !other.actionId().isEmpty() && other.actionId() == m_actionId;
plugins/Unity/Launcher/quicklistentry.h+4
@@ -37,12 +37,16 @@ public:
37
37
38 bool clickable() const;
38 bool clickable() const;
39
39
40+ void setHasSeparator(bool hasSeparator);
41+ bool hasSeparator() const;
42+
40 bool operator==(const QuickListEntry & other);
43 bool operator==(const QuickListEntry & other);
41
44
42private:
45private:
43 QString m_actionId;
46 QString m_actionId;
44 QString m_text;
47 QString m_text;
45 QString m_icon;
48 QString m_icon;
49+ bool m_hasSeparator;
46};
50};
47
51
48#endif // QUICKLISTENTRY
52#endif // QUICKLISTENTRY
plugins/Unity/Launcher/quicklistmodel.cpp+2
@@ -79,6 +79,8 @@ QVariant QuickListModel::data(const QModelIndex &index, int role) const
79 return m_list.at(index.row()).icon();
79 return m_list.at(index.row()).icon();
80 case RoleClickable:
80 case RoleClickable:
81 return m_list.at(index.row()).clickable();
81 return m_list.at(index.row()).clickable();
82+ case RoleHasSeparator:
83+ return m_list.at(index.row()).hasSeparator();
82 }
84 }
83 return QVariant();
85 return QVariant();
84}
86}
qml/Launcher/LauncherPanel.qml+1
@@ -795,6 +795,7 @@ Rectangle {
795 highlightColor: !model.clickable ? quickList.color : undefined // make disabled items visually unclickable
795 highlightColor: !model.clickable ? quickList.color : undefined // make disabled items visually unclickable
796 divider.colorFrom: UbuntuColors.inkstone
796 divider.colorFrom: UbuntuColors.inkstone
797 divider.colorTo: UbuntuColors.inkstone
797 divider.colorTo: UbuntuColors.inkstone
798+ divider.visible: model.hasSeparator
798
799
799 Label {
800 Label {
800 id: label
801 id: label
tests/mocks/Unity/Launcher/CMakeLists.txt+1−1
@@ -1,4 +1,4 @@
1−pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=9)
1+pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=10)
2
2
3include_directories(
3include_directories(
4 ${CMAKE_CURRENT_SOURCE_DIR}
4 ${CMAKE_CURRENT_SOURCE_DIR}
tests/mocks/Unity/Launcher/MockQuickListModel.cpp+2
@@ -37,6 +37,8 @@ QVariant MockQuickListModel::data(const QModelIndex &index, int role) const
37 return QLatin1String("copy.png");
37 return QLatin1String("copy.png");
38 case RoleClickable:
38 case RoleClickable:
39 return index.row() == 1 ? false : true;
39 return index.row() == 1 ? false : true;
40+ case RoleHasSeparator:
41+ return index.row() <= 1 ? true : false;
40 }
42 }
41 return QVariant();
43 return QVariant();
42}
44}
tests/plugins/Greeter/Unity/Launcher/CMakeLists.txt+1−1
@@ -1,4 +1,4 @@
1−pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=7)
1+pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=10)
2
2
3include_directories(
3include_directories(
4 ${CMAKE_CURRENT_SOURCE_DIR}
4 ${CMAKE_CURRENT_SOURCE_DIR}
tests/plugins/Unity/Launcher/CMakeLists.txt+1−1
@@ -1,5 +1,5 @@
1pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
1pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
2−pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=8)
2+pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=10)
3
3
4include_directories(
4include_directories(
5 ${CMAKE_CURRENT_SOURCE_DIR}
5 ${CMAKE_CURRENT_SOURCE_DIR}