Bug 411860 - Latte panel size doesn't recover after being auto-shrunk
Summary: Latte panel size doesn't recover after being auto-shrunk
Status: RESOLVED FIXED
Alias: None
Product: lattedock
Classification: Plasma
Component: application (show other bugs)
Version: 0.9.1
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-12 14:20 UTC by David
Modified: 2019-09-13 19:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 0.9.3


Attachments
latte_layout_from_bug (10.77 KB, text/plain)
2019-09-12 18:05 UTC, David
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2019-09-12 14:20:20 UTC
Steps to reproduce:
* Set latte as a panel (Settings -> choose 'Panel' in the above the default dock).
* Add the default virtual desktops pager from the widgets.
* Pin several icons and widgets to the panel so that they would take a lot of space.
* Start creating virtual desktops so that the pager grows and at some point there's no more space left, so the existing objects in the panel shrink to make space.
* Start removing virtual desktops so that now more space becomes available again.

Expected behavior: should re-grow to its original size.

Actual behavior: stays shrunk.
Comment 1 Michail Vourlakos 2019-09-12 17:50:01 UTC
You need to send your layout file because in my system with latest v0.9.x I can not reproduce
Comment 2 David 2019-09-12 18:05:22 UTC
Created attachment 122634 [details]
latte_layout_from_bug

Added the layout in question.
Comment 3 Michail Vourlakos 2019-09-13 17:40:30 UTC
I tested your layout, after 2VDs for every VD I add the items size is decreased.
When I remove one VD then it does not restore but if I remove two VDs it does.

Is this your system behavior?
Comment 4 David 2019-09-13 17:43:07 UTC
(In reply to Michail Vourlakos from comment #3)
> I tested your layout, after 2VDs for every VD I add the items size is
> decreased.
> When I remove one VD then it does not restore but if I remove two VDs it
> does.
> 
> Is this your system behavior?

Kind of. But if I change the configuration of the pager to have only one row (right-click -> Configure Desktops -> Number of rows: 1), then it doesn’t restore the size anymore, even after leaving only one virtual desktop.
Comment 5 Michail Vourlakos 2019-09-13 18:43:25 UTC
Git commit 182831a808497dda4343f5cc23a13a4ac5a1a01b by Michail Vourlakos.
Committed on 13/09/2019 at 18:38.
Pushed by mvourlakos into branch 'v0.9'.

improvements for automatic icon size code path

--this patch add two fixes concerning automatic
icon size when contents exceed the view maximum
length.
--A) when the function is called then it also
called one more time after 1sec to confirm that
the icon size found is valid. In the past that
approach was creating an endless loop that should
not be triggered any more
--B) the grow limit was made to be equal with
the shrink limit trying to be more predictive from
the user when the items will grow or shrink. In
the future we must take care of this if the items
grow or shrink endlessly
FIXED-IN:0.9.3

M  +27   -12   containment/package/contents/ui/main.qml

https://commits.kde.org/latte-dock/182831a808497dda4343f5cc23a13a4ac5a1a01b
Comment 6 Michail Vourlakos 2019-09-13 18:43:52 UTC
Git commit b9d82fe0f1e7a390410d04543c2bae489f11e42c by Michail Vourlakos.
Committed on 13/09/2019 at 18:43.
Pushed by mvourlakos into branch 'master'.

improvements for automatic icon size code path

--this patch add two fixes concerning automatic
icon size when contents exceed the view maximum
length.
--A) when the function is called then it also
called one more time after 1sec to confirm that
the icon size found is valid. In the past that
approach was creating an endless loop that should
not be triggered any more
--B) the grow limit was made to be equal with
the shrink limit trying to be more predictive from
the user when the items will grow or shrink. In
the future we must take care of this if the items
grow or shrink endlessly
FIXED-IN:0.9.3

M  +27   -12   containment/package/contents/ui/main.qml

https://commits.kde.org/latte-dock/b9d82fe0f1e7a390410d04543c2bae489f11e42c
Comment 7 Michail Vourlakos 2019-09-13 18:44:58 UTC
(In reply to David from comment #4)
> (In reply to Michail Vourlakos from comment #3)
> > I tested your layout, after 2VDs for every VD I add the items size is
> > decreased.
> > When I remove one VD then it does not restore but if I remove two VDs it
> > does.
> > 
> > Is this your system behavior?
> 
> Kind of. But if I change the configuration of the pager to have only one row
> (right-click -> Configure Desktops -> Number of rows: 1), then it doesn’t
> restore the size anymore, even after leaving only one virtual desktop.

I tried to improve things, you can test them out from v0.9 branch or master or wait for 0.9.3 to be released
Comment 8 David 2019-09-13 19:04:45 UTC
(In reply to Michail Vourlakos from comment #7)
> (In reply to David from comment #4)
> > (In reply to Michail Vourlakos from comment #3)
> > > I tested your layout, after 2VDs for every VD I add the items size is
> > > decreased.
> > > When I remove one VD then it does not restore but if I remove two VDs it
> > > does.
> > > 
> > > Is this your system behavior?
> > 
> > Kind of. But if I change the configuration of the pager to have only one row
> > (right-click -> Configure Desktops -> Number of rows: 1), then it doesn’t
> > restore the size anymore, even after leaving only one virtual desktop.
> 
> I tried to improve things, you can test them out from v0.9 branch or master
> or wait for 0.9.3 to be released

Great, thank you! Will test it in the next release.