D19311: Add navigation history to forward/back buttons
David Hallas
noreply at phabricator.kde.org
Sun Apr 14 18:52:12 BST 2019
hallas added a comment.
In D19311#448267 <https://phabricator.kde.org/D19311#448267>, @ngraham wrote:
> In D19311#448262 <https://phabricator.kde.org/D19311#448262>, @hallas wrote:
>
> > - Modify/extend the Breeze theme to draw this button (via some special flag or something) without arrows, even though it has a delayed menu (maybe this should be a general change). Personally this would be my choice.
>
>
> I agree, this is best. For inspiration, you might check out the following abandoned Breeze patch that did something similar and allowed opting out on a widget-by-widget basis: D13064 <https://phabricator.kde.org/D13064> Maybe all we need to do is implement that opting-out mechanism for existing press-and-hold menu toolbuttons, and then set the hint in these buttons here.
@ngraham - I have implemented a solution based on D13064 <https://phabricator.kde.org/D13064> where I add a new widget property that Breeze honors to disable the rendering of the arrow, but I am not sure what is the best way to actually set this property. Currently I have done a patch for `KWidgetAddons::KToolBarPopupAction` to set it, but I don't know if it would be better if Dolphin had a subclass of `KWidgetAddons::KToolBarPopupAction` and set the property there?
Here is the change in Breeze: F6773033 <https://phabricator.kde.org/F6773033>
And the change in KWidgetAddons: F6773036 <https://phabricator.kde.org/F6773036>
To test it you also need to change the following in Dolphin:
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 035a174c6..c2015cb22 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -1252,6 +1252,7 @@ void DolphinMainWindow::setupActions()
}
m_backAction->setDelayed(true);
m_backAction->setStickyMenu(false);
+ m_backAction->setMenuIndicator(false);
connect(m_backAction, &QAction::triggered, this, &DolphinMainWindow::goBack);
connect(m_backAction->menu(), &QMenu::aboutToShow, this, &DolphinMainWindow::slotAboutToShowBackPopupMenu);
connect(m_backAction->menu(), &QMenu::triggered, this, &DolphinMainWindow::slotGoBack);
@@ -1287,6 +1288,7 @@ void DolphinMainWindow::setupActions()
}
m_forwardAction->setDelayed(true);
m_forwardAction->setStickyMenu(false);
+ m_forwardAction->setMenuIndicator(false);
connect(m_forwardAction, &QAction::triggered, this, &DolphinMainWindow::goForward);
connect(m_forwardAction->menu(), &QMenu::aboutToShow, this, &DolphinMainWindow::slotAboutToShowForwardPopupMenu);
connect(m_forwardAction->menu(), &QMenu::triggered, this, &DolphinMainWindow::slotGoForward);
What do you think? Should I post these patches in the respective repositories? Or doesn't it make sense to add this functionality to `KWidgetAddons`?
REPOSITORY
R318 Dolphin
REVISION DETAIL
https://phabricator.kde.org/D19311
To: hallas, #dolphin, ngraham, elvisangelaccio, #vdg
Cc: richardl, ognarb, david.fontanals, abetts, kfm-devel, alexde, feverfew, meven, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190414/bc3d95d4/attachment.htm>
More information about the kfm-devel
mailing list