mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
feat(WideBar): Allow disabling alt shortcuts
Signed-off-by: leo78913 <leo3758@riseup.net>
This commit is contained in:
@ -9,6 +9,9 @@
|
||||
|
||||
class WideBar : public QToolBar {
|
||||
Q_OBJECT
|
||||
// Why: so we can enable / disable alt shortcuts in toolbuttons
|
||||
// with toolbuttons using setDefaultAction, theres no alt shortcuts
|
||||
Q_PROPERTY(bool useDefaultAction MEMBER m_use_default_action)
|
||||
|
||||
public:
|
||||
explicit WideBar(const QString& title, QWidget* parent = nullptr);
|
||||
@ -49,6 +52,8 @@ class WideBar : public QToolBar {
|
||||
private:
|
||||
QList<BarEntry> m_entries;
|
||||
|
||||
bool m_use_default_action = false;
|
||||
|
||||
// Menu to toggle visibility from buttons in the bar
|
||||
std::unique_ptr<QMenu> m_bar_menu = nullptr;
|
||||
enum class MenuState { Fresh, Dirty } m_menu_state = MenuState::Dirty;
|
||||
|
Reference in New Issue
Block a user