ice-wm/icewm

Several (related) taskbar issues

Opened this issue · 3 comments

There appear to be several issues with the taskbar which are somehow related. I am also happy to report each issue individually, though, if this is more helpful. Please let me know if this is the case.

(1) The size of the taskbar does not equal the size of the start button (i.e. start.xpm nowadays), as stated in the FAQ (https://ice-wm.org/FAQ/): "Taskbar height is sized according size of start button. E.g. for linux if your linux.xpm in taskbar folder is 50x32 then your taskbar will be 32 pixels high."

It actually seem much more complicated. When using a start.xpm with a height of 24 pixels, and a SmallIconSize of 24 pixels, the taskbar will in fact be 33 pixels high. It appears that the minimal height of the taskbar is always the size of SmallIconSize + 9 pixels. Only if start.xpm is larger than this, it will increase the taskbar height to the height of start.xpm + 5 pixels. There does not seem to be a way to have the taskbar the same height as either SmallIconSize or start.xpm.

(2) TaskBarDoubleHeight fails to "double" the height of the taskbar when SmallIconSize is larger than 16. In these cases it increases the taskbar to a height that is significantly less than double height, cutting off the application launch icons. This can be seen in all Antix themes for instance, which come in different sizes (that have different SmallIconSize values). Here is another example from a theme I am currently working on:
image

There seem to be three ways to prevent this, which are all not desirable and are hence not universal solutions to the problem:

  • Change SmallIconSize to 16 (obviously not desirable for larger themes)
  • Change TrayIconMaxHeight to something that is 1/3 larger than the size of SmallIconSize, such as 32 for a SmallIconSize of 24 (also not desirable since it will make the tray icons significantly larger than all other items in the taskbar, while most themes have them even smaller than the other items)
  • Change TaskBarGraphHeight to a large value (e.g. 32), such that it fill the entire taskbar (also not desirable, due to the bug I will describe next, and even then it of course doesn't work anymore a soon as a user decides to not show any graphs)

(3) The width of the taskbar graphs cannot be set by a theme. While the height of the taskbar graphs (CPU, Mem, Network, Battery) can be set in the default.theme file with TaskBarGraphHeight, the corresponding width settings (TaskBarCPUSamples, TaskBarMEMSamples, TaskBarNetSamples, TaskBarApmGraphWidth) do not seem to have any effect when they are set in default.theme.

All of these issues were observed with IceWM version 3.6.0.

Thanks for pointing this out.

  1. This is true and known for some time and explained elsewhere. The FAQ wasn't updated to reflect this. It should.
  2. This looks like a bug that needs to be fixed.
  3. Apparently this was intentional. We can consider if this needs to be changed.

Thanks for pointing this out.

1. This is true and known for some time and explained elsewhere. The FAQ wasn't updated to reflect this. It should.

I see that this has already been fixed. Nice!

2. This looks like a bug that needs to be fixed.

It seems that the relevant code is here:

// When TaskBarDoubleHeight=1 this draws the upper half.
. I don't fully understand how the drawing works though, so I unfortunately cannot fix it myself.

3. Apparently this was intentional. We can consider if this needs to be changed.

My reasoning here would be that if you want to create different sizes of the same theme (see e.g. Antix themes) in order to accommodate different screen resolutions, then it makes sense to scale the graphs as well (and in order to keep their proportions right, you need to also scale their width.

Can you confirm that this is now fixed and close?