diff options
author | leo78913 <leo3758@riseup.net> | 2023-01-10 12:02:02 -0300 |
---|---|---|
committer | leo78913 <leo3758@riseup.net> | 2023-01-20 19:45:43 -0300 |
commit | f16989bea94163ade99c2c24fc88d53aaff30a8d (patch) | |
tree | b4e2e38385fd75bd124b8923a64287ad7e230337 /launcher/ui/widgets/WideBar.h | |
parent | 55d406433519f7542b389143e1fb1d0ab03105b1 (diff) | |
download | PrismLauncher-f16989bea94163ade99c2c24fc88d53aaff30a8d.tar.gz PrismLauncher-f16989bea94163ade99c2c24fc88d53aaff30a8d.tar.bz2 PrismLauncher-f16989bea94163ade99c2c24fc88d53aaff30a8d.zip |
feat(WideBar): custom context menu actions
Signed-off-by: leo78913 <leo3758@riseup.net>
Diffstat (limited to 'launcher/ui/widgets/WideBar.h')
-rw-r--r-- | launcher/ui/widgets/WideBar.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/launcher/ui/widgets/WideBar.h b/launcher/ui/widgets/WideBar.h index 59bda514..c47f3a59 100644 --- a/launcher/ui/widgets/WideBar.h +++ b/launcher/ui/widgets/WideBar.h @@ -30,6 +30,8 @@ class WideBar : public QToolBar { QMenu* createContextMenu(QWidget* parent = nullptr, const QString& title = QString()); void showVisibilityMenu(const QPoint&); + void addContextMenuAction(QAction* action); + // Ideally we would use a QBitArray for this, but it doesn't support string conversion, // so using it in settings is very messy. @@ -52,6 +54,8 @@ class WideBar : public QToolBar { private: QList<BarEntry> m_entries; + QList<QAction*> m_context_menu_actions; + bool m_use_default_action = false; // Menu to toggle visibility from buttons in the bar |