https://bugs.kde.org/show_bug.cgi?id=527220

            Bug ID: 527220
           Summary: Allow users to adjust mouse-wheel zoom sensitivity in
                    Gwenview
    Classification: Applications
           Product: gwenview
      Version First 26.08.2
       Reported In:
          Platform: CachyOS
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

## DESCRIPTION

Gwenview's mouse-wheel zoom steps are too large for precise image viewing. When
zooming in or out using the mouse wheel, the zoom level changes significantly
with each scroll step.

I would like an option in Gwenview's settings to adjust the mouse-wheel zoom
sensitivity, allowing much smaller and smoother zoom increments.

I investigated the source code with AI assistance and successfully modified
Gwenview 26.08.2 to achieve much finer zoom control.

## STEPS TO REPRODUCE

1. Open an image in Gwenview.
2. Position the mouse cursor over the image.
3. Hold Ctrl and scroll the mouse wheel to zoom in or out.
4. Observe how much the zoom level changes with each scroll step.

## OBSERVED RESULT

The zoom level changes in relatively large increments, making it difficult to
achieve a precise zoom level using the mouse wheel.

## EXPECTED RESULT

Gwenview should provide a configurable mouse-wheel zoom sensitivity setting.

For example, users could choose between the existing zoom behavior and much
smaller increments for precise zoom adjustments.

## SOFTWARE/OS VERSIONS

Operating System: CachyOS (Arch Linux based)

KDE Plasma Version: [Enter version from `kinfo`]

KDE Frameworks Version: [Enter version from `kinfo`]

Qt Version: [Enter version from `kinfo`]

Gwenview Version: 26.08.2

Display Server: Wayland

## ADDITIONAL INFORMATION

I identified the zoom calculation in `lib/documentview/documentview.cpp`,
inside `DocumentView::zoomContinuous()`.

The original calculation uses:

`pow(2, 0.5 * ...)`

I modified the zoom exponent multiplier from `0.5` to `0.015`:

`pow(2, 0.015 * ...)`

This produces much smaller zoom increments when scrolling the mouse wheel.

After rebuilding Gwenview with this modification, I was able to zoom much more
precisely, and the behavior works well for my needs.

I understand that the existing zoom sensitivity may be preferable for other
users, so I am not suggesting that the default behavior should necessarily
change.

Instead, I would like to see a setting that allows users to customize the zoom
sensitivity.

The code modification was developed with AI assistance and tested by me on my
own system. I can provide a proof-of-concept patch if the developers are
interested.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to