diff options
| author | Méven Car <[email protected]> | 2026-04-24 19:12:01 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2026-04-24 19:12:01 +0200 |
| commit | 980b09b92ae3061006526293c1e64bc399cdc07b (patch) | |
| tree | 330ef0a8f4b1a201e93e931bfba23226a19d5655 | |
| parent | b12eada7126627c43e463b1c1fff191233485d00 (diff) | |
zoomwidgetactions: allow the zoom actions to appear in the commandbar
kxmlgui KCommandBar uses QAction::menu() to construct its action list.
Reuse the popupMenu as the menu, so KCommandbar finds zoom actions.
| -rw-r--r-- | src/views/zoomwidgetaction.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/views/zoomwidgetaction.cpp b/src/views/zoomwidgetaction.cpp index 431ac4f62..2260d9754 100644 --- a/src/views/zoomwidgetaction.cpp +++ b/src/views/zoomwidgetaction.cpp @@ -61,9 +61,13 @@ ZoomWidgetAction::ZoomWidgetAction(QAction *zoomInAction, QAction *zoomResetActi { // This is a property that KXMLGui reads to determine whether this action // should be included in the shortcut configuration UI + // they are already added to the action collection setProperty("isShortcutConfigurable", false); setPopupMode(InstantPopup); popupMenu()->addActions({zoomInAction, zoomResetAction, zoomOutAction}); + + // but this should be accessible through command bar + setMenu(popupMenu()); } bool ZoomWidgetAction::eventFilter(QObject *object, QEvent *event) |
