psifidotos / nowdock-plasmoid

Plasma 5 plasmoid that creates a plank or mac style effect for tasks
GNU General Public License v3.0
37 stars 3 forks source link

Fit Icons to Panel #26

Closed AndydeCleyre closed 7 years ago

AndydeCleyre commented 7 years ago

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 commented 7 years ago

I dont understand what is the problem....

AndydeCleyre commented 7 years ago

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 commented 7 years ago

Can you upload a screenshot, to see the case?

AndydeCleyre commented 7 years ago

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 commented 7 years ago

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

psifidotos commented 7 years ago

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

AndydeCleyre commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

That sounds great to me

AndydeCleyre commented 7 years ago

Yeah, sounds perfect.

psifidotos commented 7 years ago

@kupiqu , @AndydeCleyre

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

kupiqu commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

1.

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...

1.

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

1.

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.

1.

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 commented 7 years ago

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:

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 commented 7 years ago

Let's move this conversation to the right place... https://github.com/psifidotos/nowdock-panel/issues/10

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

psifidotos commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

psifidotos commented 7 years ago

@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:

AndydeCleyre commented 7 years ago

@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 commented 7 years ago

@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 commented 7 years ago
  • 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...