Bug 448519 - Height alignment in horizontal and vertical docks
Summary: Height alignment in horizontal and vertical docks
Status: RESOLVED FIXED
Alias: None
Product: lattedock
Classification: Unmaintained
Component: application (other bugs)
Version First Reported In: 0.10.7
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-15 11:17 UTC by Sadi
Modified: 2022-01-16 15:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 0.10.8
Sentry Crash Report:


Attachments
Screenshots with right dock length 100-99-98% (297.58 KB, image/jpeg)
2022-01-15 11:17 UTC, Sadi
Details
My customized Unity layout (7.05 KB, application/zip)
2022-01-15 15:35 UTC, Sadi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sadi 2022-01-15 11:17:34 UTC
Created attachment 145487 [details]
Screenshots with right dock length 100-99-98%

SUMMARY
I'm not sure if this issue is a bug or improvement (feature?) request.
It seems latte-dock has an alignment problem whan the user prefers a combination of horizontal (top and/or bottom) and vertical (left and/or right) docks, which is presently assumed to work automatically I guess. Actually this automatic alignment seems to work a bit but not fully.
For instance, I can adjust the height of my top dock/panel here:  (which is currently set as 24px as the best possible option for me)
As for the height of my right dock/panel (sidebar): Edit Dock... > Appearance > Length > Maximum (which is currently set as 98% as the best possible option for me) 

STEPS TO REPRODUCE
1. Create a floating dock to sit at the top right corner of the screen edge (Alignment: Right); add the System Tray widget; and set the height of the dock as 24 px via: Edit Dock... > Appearance > Items > Absolute size (length doesn't matter, although I have chosen 40% so that I can have a floating dock at the center, displaying time and date etc., and another one at the top left, displaying menu, window title and menu bar)
2. Create a floating dock to sit at the right edge of the screen (Alignment: Justify); set the "Absolute size" of "Items" as 256 px; and add, for example, Analog Clock,  Calculator, and Media Player widgets, from top to bottom (Length: 100%)

OBSERVED RESULT
1. The top and bottom margins (padding?) of the top dock are not equal. It seems the bottom margin is a bit excessive.
2. The top edge of the right dock (sidebar) overlaps with the bottom margin of the top dock, probably because of the problem above (Changing the Length value to 99% or 98% can somehow fix the overlap issue but it's not quite perfect)  

EXPECTED RESULT
Left/Right (vertical) docks/panels with Alignment set as Justify should have their top edge next to the inner edges of  Top/Bottom (horizontal) docks/panels.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.23
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 Michail Vourlakos 2022-01-15 14:53:25 UTC
1. The 100% length case looks like a bug, please send me your layout file producing that issue and tell me which plasma theme you are using, there is a chance that it is your plama theme fault.

2. Is it reproducable with Breeze plasma theme?

3. The 99% and 98% cases look as they should.
Comment 2 Sadi 2022-01-15 15:35:32 UTC
Created attachment 145499 [details]
My customized Unity layout
Comment 3 Sadi 2022-01-15 15:36:11 UTC
(In reply to Michail Vourlakos from comment #1)
I changed my Plasma theme to Breeze but it made no difference.
My tempoary workaround is changing Alignment to Bottom, adding a couple of Latte Spacer widgets, and fine-tuning...
Comment 4 Michail Vourlakos 2022-01-16 00:31:52 UTC
Git commit 06a293eb8082c49058381c83ca97938eadb4e036 by Michail Vourlakos.
Committed on 16/01/2022 at 00:27.
Pushed by mvourlakos into branch 'v0.10'.

fix vertical docks/panels positioning

--identify correctly for vertical panels in right edge
when they need to draw or not their top and bottom borders.
This is enough in order to position properly these docks.
FIXED-IN:0.10.8

M  +1    -1    app/lattecorona.cpp
M  +4    -3    app/view/positioner.cpp
M  +10   -0    app/view/view.cpp

https://invent.kde.org/plasma/latte-dock/commit/06a293eb8082c49058381c83ca97938eadb4e036
Comment 5 Michail Vourlakos 2022-01-16 00:32:38 UTC
Git commit 6fa1d1cc870b75965e417fd3fa3530988e14c9a2 by Michail Vourlakos.
Committed on 16/01/2022 at 00:32.
Pushed by mvourlakos into branch 'master'.

fix vertical docks/panels positioning

--identify correctly for vertical panels in right edge
when they need to draw or not their top and bottom borders.
This is enough in order to position properly these docks.
FIXED-IN:0.10.8

M  +1    -1    app/lattecorona.cpp
M  +4    -3    app/view/positioner.cpp
M  +10   -0    app/view/view.cpp

https://invent.kde.org/plasma/latte-dock/commit/6fa1d1cc870b75965e417fd3fa3530988e14c9a2
Comment 6 Michail Vourlakos 2022-01-16 01:12:02 UTC
Git commit 7ff8deb0b534212245ccfd5468e7d828dd3cd390 by Michail Vourlakos.
Committed on 16/01/2022 at 01:08.
Pushed by mvourlakos into branch 'v0.10'.

fix position of custombackground on screen corners
FIXED-IN:0.10.8

M  +2    -2    containment/package/contents/ui/colorizer/CustomBackground.qml

https://invent.kde.org/plasma/latte-dock/commit/7ff8deb0b534212245ccfd5468e7d828dd3cd390
Comment 7 Michail Vourlakos 2022-01-16 01:12:44 UTC
Git commit fa4db13e8135314bba7428a82d3219bf7dfbf8c1 by Michail Vourlakos.
Committed on 16/01/2022 at 01:12.
Pushed by mvourlakos into branch 'master'.

fix position of custombackground on screen corners
FIXED-IN:0.10.8

M  +2    -2    containment/package/contents/ui/colorizer/CustomBackground.qml

https://invent.kde.org/plasma/latte-dock/commit/fa4db13e8135314bba7428a82d3219bf7dfbf8c1
Comment 8 Michail Vourlakos 2022-01-16 01:13:26 UTC
feel free to open a new bug report if something still does not work correctly!
I really enjoyed fixing this...
Comment 9 Sadi 2022-01-16 15:27:35 UTC
(In reply to Michail Vourlakos from comment #8)
> feel free to open a new bug report if something still does not work
> correctly!
> I really enjoyed fixing this...

Thank you so much! I'm also glad to have helped improve this marvellous app in this way.