KFileWidget: Disable zoom buttons once reached minimum or maximum
ClosedPublic

Authored by rkflx on Apr 29 2018, 6:08 AM.

Details

Summary

In Gwenview the zoom buttons will be disabled when clicking on it would
not result in any further change of zoom level, e.g. Zoom In is
disabled for the largest icon size. In general it is recommended to
disable unavailable actions.

This patch adds the functionality to the file dialog too.

Ref T8552

FIXED-IN: 5.46

Test Plan

kdialog --getopenfilename, change icon size to minimum and maximum by
sliding, mouse wheeling, pressing buttons and using the keyboard, and
check that buttons are disabling and enabling properly.

Diff Detail

Repository
R241 KIO
Branch
disable-zoom-buttons (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
rkflx created this revision.Apr 29 2018, 6:08 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 29 2018, 6:08 AM
rkflx requested review of this revision.Apr 29 2018, 6:08 AM

Looks and works great; just one style comment below:

src/filewidgets/kfilewidget.cpp
108

While we're at it, why don't we rename these to be clearer: I'd prefer zoomInAction and zoomOutAction

rkflx updated this revision to Diff 33367.Apr 30 2018, 11:07 PM
  • Rename actions too
ngraham accepted this revision.May 1 2018, 1:20 AM
This revision is now accepted and ready to land.May 1 2018, 1:20 AM
This revision was automatically updated to reflect the committed changes.