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

Halla Rempt <ha...@valdyas.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/grap |https://invent.kde.org/grap
                   |hics/krita/commit/bad2b20c0 |hics/krita/commit/e5fc9e2f6
                   |2accdd6fb234afca885d3a7cc4c |132e2c654306f0f8a44cc14dac4
                   |ff96                        |dc49

--- Comment #4 from Halla Rempt <ha...@valdyas.org> ---
Git commit e5fc9e2f6132e2c654306f0f8a44cc14dac4dc49 by Halla Rempt, on behalf
of Agata Cacko.
Committed on 25/08/2021 at 08:25.
Pushed by rempt into branch 'krita/5.0'.

Fix clear color history button layout

Before this commit, clear color history button was just added
to the side layout without even checking if the color history
is vertical. It caused bad look when the color history was located
horizontal (underneath the color selector).

This commit puts both the color history widget and the clear color
history button into its own layout. Depending on the direction
(horizontal or vertical), the layout is in that direction,
and the widgets are added in order: first color history, then the
button.

A solution of not creating its own ayout and using the existing
m_verticalColorPatchesLayout or m_horizontalColorPatchesLayout
wouldn't work, because for example the horizontalColorPatchesLayout
is in fact a QVBoxLayout, which means the widgets underneath the
color selector would be:
1) color history
2) clear color history button
3) color patches from the image
all placed one underneath the other.
But the desired result is different:
1) color history + clear color history button
2) color patches from the image
So this commit adds a new horizontal layout that is placed
in the (1) slot and contains both of the widgets.
The same goes for the other direction.

The new layouts also place the clear color history button aligned
centrally in the direction opposite to the layout
(central horizontal alignment in case of vertical color history,
and central vertical alignment for horizontal color history).
(cherry picked from commit bad2b20c02accdd6fb234afca885d3a7cc4cff96)

M  +27   -6   
plugins/dockers/advancedcolorselector/kis_color_selector_ng_docker_widget.cpp
M  +3    -0   
plugins/dockers/advancedcolorselector/kis_color_selector_ng_docker_widget.h

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

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

Reply via email to