mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
chore(tray): move pin/unpin entry to the top of the menu
This commit is contained in:
@@ -512,14 +512,14 @@ void TrayMenu::refreshEntries() {
|
||||
m_entries = m_tray->menuEntries(m_activeItemId);
|
||||
if (!m_entries.empty() && trayDrawerEnabled(m_config)) {
|
||||
const bool pinned = activeItemPinned();
|
||||
m_entries.push_back(TrayMenuEntry{
|
||||
.id = kPinToggleEntryId,
|
||||
.label = i18n::tr(pinned ? "tray.menu.unpin" : "tray.menu.pin"),
|
||||
.enabled = true,
|
||||
.visible = true,
|
||||
.separator = false,
|
||||
.hasSubmenu = false,
|
||||
});
|
||||
m_entries.insert(m_entries.begin(), TrayMenuEntry{
|
||||
.id = kPinToggleEntryId,
|
||||
.label = i18n::tr(pinned ? "tray.menu.unpin" : "tray.menu.pin"),
|
||||
.enabled = true,
|
||||
.visible = true,
|
||||
.separator = false,
|
||||
.hasSubmenu = false,
|
||||
});
|
||||
}
|
||||
if (m_entries.empty()) {
|
||||
m_entries.push_back(TrayMenuEntry{
|
||||
|
||||
Reference in New Issue
Block a user