Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fit Icons to Panel #26

Closed
AndydeCleyre opened this issue Sep 6, 2016 · 29 comments
Closed

Fit Icons to Panel #26

AndydeCleyre opened this issue Sep 6, 2016 · 29 comments

Comments

@AndydeCleyre
Copy link

Hi,

This is one of just two features that keep me from being able to take advantage of this much appreciated effort.

Please add an icon size mode that makes the icons as large as can fit on the panel.

@psifidotos
Copy link
Owner

psifidotos commented Sep 6, 2016

I dont understand what is the problem....

@AndydeCleyre
Copy link
Author

The problem is if I set the dock to show large icons, as I do with Plank, they will fall off the screen when I open more apps.

@psifidotos
Copy link
Owner

Can you upload a screenshot, to see the case?

@AndydeCleyre
Copy link
Author

Sure. In each screenshot, Plank is on the right, and Now Dock is on the left.

Neither dock's settings are changed from one shot to the next, only the launched apps.

screenshot_20160906_181032

screenshot_20160906_181122

@psifidotos
Copy link
Owner

Oh... you mean that if icons reach the edges to shrink in size in order to not hide.... Right?

@psifidotos
Copy link
Owner

BTW, if you want you can hide the panel background if you want to....

@AndydeCleyre
Copy link
Author

Oh... you mean that if icons reach the edges to shrink in size in order to not hide.... Right?

Yes

BTW, if you want you can hide the panel background if you want to....

Yes, I appreciate the provided scripts for hacking the plasma theme into approximating a real dock, but I'm not bothering with that for now as I can't really use this unless I can resolve/hack-around the #27 problem.

@kupiqu
Copy link
Collaborator

kupiqu commented Sep 6, 2016

It would be cool to adjust icon size automatically in both directions:

First, according to the width of the panel (also considering zoom factor) so this does not have to be set manually (no more need of the red line).

[Actually it would be great to have two ways to adjust this: either modifying the width of the panel, so the icon size in the plasmoid follows; or just the other way around, setting the icon size of the plasmoid in settings, and the width of the panel follows].

Second, but also when the amount of tasks is too large, according to the length of the panel, so no icon is left behind.

Does it sound reasonable?

@AndydeCleyre
Copy link
Author

Yes, that sounds reasonable. I don't use zoom myself.

I think the basic reasoning if you're basing icon size on panel dimensions is that the panel width should determine the maximum, or ideal/target icon size, and that the panel length and number of icons together further limit the actually presented icon size.

If it is not based purely on panel dimensions, then the max/ideal is set by the icon size preference, then limited by panel width, panel length, and number of icons present.

I think I just said what you said.

@psifidotos psifidotos added bug and removed needs info labels Sep 7, 2016
@psifidotos
Copy link
Owner

@kupiqu , @AndydeCleyre

please provide me with your feedback for the following. Use case, bottom panel (to be easy to understand what we are describing)

  1. I dont believe this should go into the plasmoid but into the panel codepage
  2. In the panel we can have an additional icon size setting which will be called "Automatic" icon size. This would determine that the icon sizes correspond to the panel height and the zoomfactor is used.
  3. the Now Dock panel can also update the icon sizes when its contents reach the edges, in order to shrink them of course

@kupiqu
Copy link
Collaborator

kupiqu commented Sep 7, 2016

That sounds great to me

@AndydeCleyre
Copy link
Author

Yeah, sounds perfect.

@psifidotos
Copy link
Owner

@kupiqu , @AndydeCleyre

please test [automatic branch] in Now Dock Panel for this,
https://github.com/psifidotos/nowdock-panel/tree/automatic

@kupiqu
Copy link
Collaborator

kupiqu commented Sep 9, 2016

Automatic size works!

However (there is always a however, sorry), it also seems to me that the space saved for zoom animation is overestimated. Fitting the size to the bare minimum is important as otherwise it narrows down space for window applications in the desktop. Actually, I recall adjusting the panel size manually before regardless of the red line, as it also overestimated the panel size in my system.
Could you please double check?
Perhaps there is some weird thing going on depending on scaling factor?
Could you please try with icons set to 48 px and scaling zoom to 1.25 to see if you can reproduce this? Thanks

@psifidotos
Copy link
Owner

On 09/09/2016 05:13 πμ, kupiqu wrote:

Automatic size works!

However (there is always a however, sorry), it also seems to me that
the space saved for zoom animation is overestimated. Fitting the size
to the bare minimum is important as otherwise it narrows down space
for window applications in the desktop. Actually, I recall adjusting
the panel size manually before regardless of the red line, as it also
overestimated the panel size in my system.
Could you please double check?

the maximum height used (e.g. bottom panel) is calculated by:
(zoomFactor + 0.1) * (iconSize+margins)

the zoomFactor+0.1 stands for length needed by launcher bounching animation
the margins have been set to 5 if I recall correctly

Perhaps there is some weird thing going on depending on scaling factor?
Could you please try with icons set to 48 px and scaling zoom to 1.25
to see if you can reproduce this? Thanks

I am sorry but what should I observe in this case?

@kupiqu
Copy link
Collaborator

kupiqu commented Sep 9, 2016

the maximum height used (e.g. bottom panel) is calculated by:
(zoomFactor + 0.1) * (iconSize+margins)

the zoomFactor+0.1 stands for length needed by launcher bounching animation the margins have been set to 5 if I recall correctly
the maximum height used (e.g. bottom panel) is calculated by:
(zoomFactor + 0.1) * (iconSize+margins)

the zoomFactor+0.1 stands for length needed by launcher bounching animation the margins have been set to 5 if I recall correctly

I see. I guess what happens is that I am of the opinion that the price to pay in desktop space is too big for the bouncing animation, and would like to have no margin for similar purposes, so my manual adjustment tried to fit to (zoomFactor * iconSize)

Three observations to this (perhaps as options):

  1. Could it be possible to adjust the bouncing animation so it does not take further space than the scaling zoom?
  2. If scaling zoom is not set to zero, could the (added) margin be set to 0?
  3. In any case, wouldn't the margin be better set multiplicatively instead of additively? For small icon sizes 5 px may be too big of a margin while for big icon sizes it may be too small.

Related to point 2 above, I only see the margin being important when the scaling zoom is 0. In other words, I don't care much if I don't have any margin transiently while hovering or during bouncing behavior, but it is nice to have it while icons are at 'rest', and to have it scaled by the icon's size, in my opinion.

@psifidotos
Copy link
Owner

Could it be possible to adjust the bouncing animation so it does not
take further space than the scaling zoom?

yes of course, by design the bouncing is used very little compared to all
the time that the icons are presented. We could gain that space... The
animation looks a bit short but on the other hand space is imporant...

If scaling zoom is not set to zero, could the (added) margin be set to
0?

the margin is important only between the icons in order not to touch each
other
and not touch the dots and lines beneath them

In any case, wouldn't the margin be better set multiplicatively
instead of additively? For small icon sizes 5 px may be too big of a margin
while for big icon sizes it may be too small.

yes it should, I would definitely accept any impovement into this (a patch
for example) that pass visual tests.. For example for small icon sizes
margin 0 would mean the icons touch each other and it would be very
difficult to distinguish them. So this not a solution.

Related to point 2 above, I only see the margin being important when the
scaling zoom is 0. In other words, I don't care much if I don't have any
margin transiently while hovering or during bouncing behavior, but it is
nice to have it while icons are at 'rest', and to have it scaled by the
icon's size, in my opinion.

scaling zoom 0, I suppose you mean 1. If margin is changed during the
animation then there are too many glitches and not consistent visuals...
The icons when they get into animation stage they would give a feeling that
something does not go right...

@kupiqu
Copy link
Collaborator

kupiqu commented Sep 9, 2016

Yes, sorry I meant scaling factor equal to 1.

I see, the margin is set the same in all 4 directions, but I was referring to the outside margin, i.e. the direction that separates the panel from the rest of the desktop. The other 3 are very important and I wouldn't touch them at all (or at most I would consider margins proportional to icon size to keep aspect ratio indep of icon size, but that's rather a minor thing).

For this specific outside margin and depending on scaling factor:

  • I would keep it the same as the rest of margins if scaling factor is 1
  • Otherwise, I would like to have the option to set that margin to 0

Regarding proportional margins, they could be set to factor*Icon_size, where factor_size is in [0,1] and actually quite low (e.g., 0.1, so if icon size is 48 px, the margin is 4.8, which is similar to the current 5 px that you are using now). But please note that this doesn't mean that margins change dynamically during hovering, animation etc, I would just suggest to just use the icon size at rest for reference.

@psifidotos
Copy link
Owner

Let's move this conversation to the right place...
psifidotos/nowdock-panel#10

concerning the margins... the calculations look good but I have to test it also for sizes> 48 what is happening visually....

@psifidotos
Copy link
Owner

please, @AndydeCleyre @kupiqu check [master] branches for plasmoid and panel, I have decreased the space needed for animations (which was based on launcher's bounching) so this should give maximum size the icon's hovering size...

@kupiqu
Copy link
Collaborator

kupiqu commented Sep 9, 2016

The automatic scaling according to the new settings for spacing works nice, but I don't see hovering effects anymore on icons that are not part of nowdown-plasmoid yet are present in the nowdock-panel.

@kupiqu
Copy link
Collaborator

kupiqu commented Sep 9, 2016

Sorry, most of the previous behavior occurred just because I didn't lock my plasma desktop.

Yet, something very weird still happens. Hovering effect only works on the top 'Earth' icon, not on the bottom one (see attachment). This plasmoid is to show a webapge and other than the specific webpage that is shown in each of the two, the two plasmoids are identical.

screenshot_20160909_090534

@kupiqu
Copy link
Collaborator

kupiqu commented Sep 9, 2016

I fixed that issue by removing and then adding the plasmoid back, so it doesn seem to be related to nowdock. Sorry for the noise

@psifidotos
Copy link
Owner

please check for this from master branches for plasmoid and panel... I think it has been improved a lot!!! :) very complex piece of code this one, I had difficult time....

@kupiqu
Copy link
Collaborator

kupiqu commented Sep 9, 2016

Yes, using master branches on both now, and they seem to work fine.

@psifidotos
Copy link
Owner

psifidotos commented Sep 9, 2016

@kupiqu just for clarify:

Yet, something very weird still happens. Hovering effect only works on the top 'Earth' icon, not on the bottom one (see attachment). `

Reasons for not animating plasmoids in the panel:

  • Now Dock Panel investigates its plasmoid when added in the panel based on some size criterias etc. and disables zooming for it if believes that this plasmoid will break the experience. e.g. the taskmanager
  • widgets in the desktop are unlocked
  • this specific plasmoid has been locked by the user to not animate on hovering. The user is able when we are in unlocked widgets state to move its widgets around to change its positions. In that state a lock/unlock button is appearing. If the user locks it then hovering animation is disabled for that specific instance of plasmoid.

@AndydeCleyre
Copy link
Author

@psifidotos Can you post instructions for properly installing the latest versions? I tried checking out the two repositories and symlinking them into ~/.local/share/plasma/plasmoids, with no effect.

Also, is there any point to my using nowdock-panel if I won't be using any zoom effects?

@psifidotos
Copy link
Owner

@AndydeCleyre

is there any point to my using nowdock-panel if I won't be using any zoom effects?

Now Dock Panel layouts the plasmoids in different way from the default panel... even though you may not use the zoom factor (you can set it to 1 for no hovering animations), the now dock panel layouts them with more consistense. That is if you want to add plasmoids surrounding the now dock plasmoid.

Installation instructions

you download the master branches as tar.gz files for example and you are extracting them.
in each extracted directory where the metadata.desktop file is placed you execute the command:
plasmapkg2 -i .
if you want to install them or
plasmapkg2 -u .
if you want to update any of them

a plasma panel is just a plasmoid with different behavior.... plasmapkg2 is the command to install and update plasmoids from the command line...

@kupiqu
Copy link
Collaborator

kupiqu commented Sep 9, 2016

  • this specific plasmoid has been locked by the user to not animate on hovering. The user is able when we are in unlocked widgets state to move its widgets around to change its positions. In that state a lock/unlock button is appearing. If the user locks it then hovering animation is disabled for that specific instance of plasmoid.

I see, this is I think what happened. I must have locked it accidentally...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants