D22444: Add zoom reset action

Nathaniel Graham noreply at phabricator.kde.org
Sat Jul 13 18:13:47 BST 2019


ngraham requested changes to this revision.
ngraham added a comment.
This revision now requires changes to proceed.


  In general +1 on the concept, but needs revision before it can go in.

INLINE COMMENTS

> dolphinui.rc:117
>          <Action priority="0" name="view_zoom_out"/>
> +        <Action priority="0" name="view_zoom_reset"/>
>          <Action priority="0" name="edit_cut"/>

Put it in between Zoom in and Zoom out, as it is in Okular and Konsole.

> dolphinviewactionhandler.cpp:197
> +    QAction* zoomResetAction = m_actionCollection->addAction( QStringLiteral("view_zoom_reset") );
> +    zoomResetAction->setText( i18nc("@action:inmenu View", "Zoom Reset") );
> +    zoomResetAction->setWhatsThis(i18nc("@info:whatsthis zoom reset", "This resets the icon size to default."));

Name should be "Reset zoom level" or "Zoom to default size"

> dolphinviewactionhandler.cpp:466
> +{
> +    const int resetLevel = (ZoomLevelInfo::minimumLevel() + ZoomLevelInfo::maximumLevel())/2;
> +    m_currentView->setZoomLevel(resetLevel);

That seems like a fairly arbitrary value to reset it to. You should read the default size and zoom to that instead. After all, that's what the WhatsThis text you wrote says it will do. :)

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D22444

To: shubham, ngraham, elvisangelaccio
Cc: kfm-devel, kde-doc-english, aprcela, fprice, gennad, fbampaloukas, alexde, feverfew, meven, spoorun, navarromorales, firef, andrebarros, skadinna, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-doc-english/attachments/20190713/33ba919d/attachment.html>


More information about the kde-doc-english mailing list