xTray on the left side of xTaskbar Thread last updated on 2008-04-18 16:12:30

Posted by member 401879 on 2008-04-16 11:42:13

Greetings

I just can't figure this out:

On the very left side of the screen I have a button with fixed width=48
Then there is my traybar with variable width
On the very right side there is a clock with fixed width=100
I want to have my taskbar in between not overlapping any other element.

I thought of something like this:
xTaskbarX &startbuttonWidth+xTaskbarCurrentWidth$
xTaskbarWidth $resolutionX-(startbuttonWidth+xTaskbarCurrentWidth+bClockWidth)$
but it doesn't work.

Maybe you know a theme with this kind of config or have any idea?

Posted by member 1 on 2008-04-16 13:49:37 link

That should probably be...
xTaskbarX $48+xTrayCurrentWidth$


You are trying to take your taskbar x location and make it dependent on your start button and your tray width, not your start button and taskbar width. I changed it to 48 for simplicity sake. Then for your width you want...
xTaskbarWidth $resolutionX-148-xTrayCurrentWidth$


Let us know how that goes. If it doesn't work email me with your theme and I will mess with it when I get home.

Posted by member 212670 on 2008-04-16 15:21:33 link

You'll need an event (in this case from xtray) to control it. $*CurrentWidths$ are static (since you may need dummy variables in an rc file) and need to be reparsed. The xTaskbarX and xTaskbarWidth values in your rc file will essentially be irrelevant. So you'll end up with something like...
xTrayOnAdd !ParseEvars !xTaskbarReposition %#48+xTrayCurrentWidth%# y %#resolutionX-(148+xTrayCurrentWidth)%# height

Since y and height are static, those can be the actual values. The 148 comes from your button+clock widths. !ParseEvars is from xLabel. And, of course, you'll need a corresponding xTrayOnRemove.

Posted by member 401879 on 2008-04-18 05:33:57 link

Thank you for the help.

@DeViLbOi
So I tried:
xTaskbarX $48+xTrayCurrentWidth$
xTaskbarWidth $resolutionX-148-xTrayCurrentWidth$


but that didn't work. I just get an error because of xTrayCurrentWidth.

@xcal
I don't really get it. It just works fine if I recylce the config but doesn't change if a new trayicon appears. Where do I have to put the code?

Posted by member 401879 on 2008-04-18 09:35:22 link

It works with
xTrayOnResize...


Another short question. It takes about 15 sec if I hit recycle until something happens. Is this normal?

Posted by member 212670 on 2008-04-18 16:12:30 link

Ahh, ya, OnResize makes more sense. Other should work, though.

As to the recycle question... no, 15 sec wait isn't normal. Would need LS ver and modules loaded to take a stab at that.