Bug 450667 - The "icon size" slider in the Brush Presets docker works with click and drag but not with MMB scrolling
Summary: The "icon size" slider in the Brush Presets docker works with click and drag ...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Dockers (show other bugs)
Version: 5.0.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-21 18:10 UTC by aiena.makehuman
Modified: 2022-05-17 02:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aiena.makehuman 2022-02-21 18:10:11 UTC
SUMMARY
***
The "icon size" slider in "Brush Presets" displays correct behavior on cl click and dragging.

If I try to change the size of the icons in the brush editor by clicking and dragging the  "icon size" slider the icon sizes change. But If I use the scroll wheel the slider moves but has no effect on brush icon size.
***


STEPS TO REPRODUCE
1.  Go to the "Brush Present" docker.
2. Press the hamburger icon
3. Hover the mouse over the "icon size" slider. Use the MMB scroll-wheel to scroll the slider
4. The slider moves correctly but it does not influence the icon size.
5. Click and drag the same slider.
6. The icon sizes do change displaying expected behavior.

OBSERVED RESULT
The slider moves smoothly from 0 to 100% and back with the MMB scrollwheel activated while hovering over it but has no effect on the icon size.

EXPECTED RESULT
The behaviour of the slider with MMB scrolling or clicking and dragging should be identical. They both should resize the icon size correctly.

Krita

 Version: 5.0.2
 Languages: en_IN, en, en, en_IN, en
 Hidpi: true

Qt

  Version (compiled): 5.12.12
  Version (loaded): 5.12.12

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.4.0-100-generic
  Pretty Productname: Ubuntu 20.04.4 LTS
  Product Type: ubuntu
  Product Version: 20.04
  Desktop: KDE

ADDITIONAL INFO:
Used the official Krita 5.0.2 Appimage for testing.
Comment 1 aiena.makehuman 2022-02-21 18:17:16 UTC
I did some more testing and found another way to trigger this bug with clicking instead of scrolling. I am unsure if this is another bug or something similar is going on and can be fixed together.

Clicking anywhere in the region to the left or right of the "icon size" slider button increments/decrements the slider but has no effect on icon size as well. The behavior is similar but there is no need even for a scroll wheel to trigger it.
Comment 2 Ahab Greybeard 2022-02-24 19:21:59 UTC
I can confirm this for appimages 4.4.0, 4.4.8, 5.0.2 and the Feb 24 5.1.0-prealpha (git 96871c7) appimages on Debian 10.

The displayed icon size only changes if the icon size handle is grabbed and then moved.
Scroll wheel rotation and clicking along the slider bar will change the setting but not the icon displayed size.
This is the case for Details view and Thumbnails view.
Comment 3 aiena.makehuman 2022-02-27 15:06:01 UTC
(In reply to Ahab Greybeard from comment #2)
> I can confirm this for appimages 4.4.0, 4.4.8, 5.0.2 and the Feb 24
> 5.1.0-prealpha (git 96871c7) appimages on Debian 10.
> 
> The displayed icon size only changes if the icon size handle is grabbed and
> then moved.
> Scroll wheel rotation and clicking along the slider bar will change the
> setting but not the icon displayed size.
> This is the case for Details view and Thumbnails view.

Thank you for testing this further. I can confirm this in details view too thought I did not test that originally. So the behavior seems consistent though not what one would expect.
Comment 4 Lynx3d 2022-05-17 02:22:17 UTC
Git commit d59747b8ad97fa0f19743970687b4f174e1d58b5 by Mathias Wein.
Committed on 17/05/2022 at 02:17.
Pushed by mwein into branch 'master'.

Fix preset chooser's thumbnail size slider only reacting to dragging

There are other means to manipulate the slider, including mouse wheel
and cursor keys.
Connect the update to the valueChanged signal instead, and saving the
value to config file when the menu gets hidden.

Also fix slider getting out of sync between chooser instances.

M  +15   -10   libs/ui/widgets/kis_paintop_presets_chooser_popup.cpp
M  +1    -0    libs/ui/widgets/kis_paintop_presets_chooser_popup.h
M  +3    -2    libs/ui/widgets/kis_preset_chooser.cpp

https://invent.kde.org/graphics/krita/commit/d59747b8ad97fa0f19743970687b4f174e1d58b5