Bug 445625

Summary: The Resource Manager's tags widget make the panel wiggle in place
Product: [Applications] krita Reporter: amyspark <amy>
Component: UsabilityAssignee: amyspark <amy>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.0.0-beta2   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description amyspark 2021-11-17 02:27:01 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

The Resource Manager's tags widget are manually rendered via a mix of paint events and customized QLabels. Since the add and delete "buttons" do not respect the system's QLabel sizing, they make the form layout row extend and contract in place. This causes the widget to wiggle in place because of the stretcher in the metadata widget above its panel.

Removing the stretcher above does fix the wiggle, but the mis-sizing should still be fixed.


STEPS TO REPRODUCE
1. Open Krita.
2. Open the Resource Manager.
3. Select Brush Presets, then the Krita 4 bundle, and finally navigate among the items.

OBSERVED RESULT

The widget that holds the preset's data goes slightly up and down whenever there are enough tabs to make the numbers of rows vary. Furthermore, the "Tags:" label is stretched to match the row's (incorrect) height.

EXPECTED RESULT

Layout should be stable.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
7fe1e8a6c9 (upstream/krita/5.0, krita/5.0) Revert "build fix"
Comment 1 amyspark 2021-11-25 13:49:06 UTC
Git commit 0f758b9d040e4eface2cafdd632e2fc45c323b25 by L. E. Segovia.
Committed on 25/11/2021 at 13:47.
Pushed by lsegovia into branch 'krita/5.0'.

Resource Manager: restyle the tags widget

Previous to this commit, the tags widget had excessive padding and used
a customized paintEvent to draw it.

This commit:

- fixes the wrappable QHBoxWidget that we use to match Qt's
behaviour
- uses the Qt style machinery to paint the tag widget according
to the chosen style
- changes the close icon to be an actual QPushButton (thus
making it accessible)
- adds a tooltip to the Add tag and Remove tag buttons
- and fixes the sizing of the Add tag button.

M  +19   -33   libs/widgets/KisTagSelectionWidget.cpp
M  +2    -2    libs/widgets/KisTagSelectionWidget.h
M  +5    -2    libs/widgetutils/KisWrappableHBoxLayout.cpp
M  +3    -0    plugins/extensions/resourcemanager/WdgDlgResourceManager.ui

https://invent.kde.org/graphics/krita/commit/0f758b9d040e4eface2cafdd632e2fc45c323b25
Comment 2 amyspark 2021-11-25 13:49:22 UTC
Git commit 3f0160eebfbb1a79b4322058b9fb89b1f6f3bfd9 by L. E. Segovia.
Committed on 25/11/2021 at 13:47.
Pushed by lsegovia into branch 'krita/5.0'.

Remove extra spacing from the Resource Manager

M  +63   -46   plugins/extensions/resourcemanager/WdgDlgResourceManager.ui

https://invent.kde.org/graphics/krita/commit/3f0160eebfbb1a79b4322058b9fb89b1f6f3bfd9
Comment 3 amyspark 2021-11-25 13:52:56 UTC
Git commit c485bdda2ad30003ec099564654a2c2285128236 by L. E. Segovia.
Committed on 25/11/2021 at 13:50.
Pushed by lsegovia into branch 'master'.

Remove extra spacing from the Resource Manager
(cherry picked from commit 3f0160eebfbb1a79b4322058b9fb89b1f6f3bfd9)

M  +63   -46   plugins/extensions/resourcemanager/WdgDlgResourceManager.ui

https://invent.kde.org/graphics/krita/commit/c485bdda2ad30003ec099564654a2c2285128236
Comment 4 amyspark 2021-11-25 13:53:20 UTC
Git commit edfb8a511cb0402eef8111fda58a76e312461540 by L. E. Segovia.
Committed on 25/11/2021 at 13:50.
Pushed by lsegovia into branch 'master'.

Resource Manager: restyle the tags widget

Previous to this commit, the tags widget had excessive padding and used
a customized paintEvent to draw it.

This commit:

- fixes the wrappable QHBoxWidget that we use to match Qt's
behaviour
- uses the Qt style machinery to paint the tag widget according
to the chosen style
- changes the close icon to be an actual QPushButton (thus
making it accessible)
- adds a tooltip to the Add tag and Remove tag buttons
- and fixes the sizing of the Add tag button.
(cherry picked from commit 0f758b9d040e4eface2cafdd632e2fc45c323b25)

M  +19   -33   libs/widgets/KisTagSelectionWidget.cpp
M  +2    -2    libs/widgets/KisTagSelectionWidget.h
M  +5    -2    libs/widgetutils/KisWrappableHBoxLayout.cpp
M  +3    -0    plugins/extensions/resourcemanager/WdgDlgResourceManager.ui

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