Variable 'SystrayWidth' disappears after changing taskbar-module Thread last updated on 2007-07-03 12:49:31

Posted by member 375904 on 2007-07-03 05:59:30

Hi,

this one is really weird and I have done lots of (unsuccessful) testing to find out what is happening.

I use the standard-theme 'Austerity'. In that theme the width of the taskbar is calculated in taskbar.rc, using the variable $SystrayWidth$ which is apparently automatically exported by vtray-1.0.6

Then I replaced the taskbar module. Now I use xtaskbar-1.5.2 instead of the default taskbar3-0.306_alpha-3 (reason see below, if you're interested).

The settings in taskbar.rc were changed accordingly (xTaskBarX instead of TaskBarX etc).

But now the variable $Systraywidth$ is not working any more. It just has a constant value of 2 (as set by system_tray.rc). So the taskbar is too wide and reaches almost up to the date/time-label (minus 2 pixels).

This should not happen because $Systraywidth$ is is exported by the module vtray-1.0.6 and not by the taskbar-module. So how can it disappear after changing the taskbar-module??

Any ideas ?


In case of interest: The reason why I use xtaskbar-1.5.2 instead of the default taskbar3-0.306_alpha-3 is because now I can "pull" links from firefox/internet-explorer onto an open folder in the taskbar. That automatically creates a URL-link in the folder. I use that function all the time, so it is important to me and taskbar3-0.306_alpha-3 does not do that (AFAIK at least :-) .

TIA, jc

Posted by member 1 on 2007-07-03 06:44:17 link

How did you determine the constant value for $SystrayWidth$?

Posted by member 375904 on 2007-07-03 07:05:53 link

The final proof after a number of other test was this: In system_tray.rc I changed the Y-position of the tray to

SystrayY $BarY+SystrayWidth$

Then the tray should move down by its own width. Instead it moves only 2 pixels lower than the date-label and it does NOT change position if tray-icons are added or removed. I can effectively change the value of "2" with the line
SystrayWidth 2
in system_tray.rc


BTW: I am still looking for some way to directly display a variable, for example in a popup-message.

Posted by member 375904 on 2007-07-03 07:26:46 link

Hm, still weirder: after some more testing (with the default-taskbar, not xtaskbar) I found this: in taskbar.rc the line setting the taskbarwidth is the same with or without $SystrayWidth$. The taskbar has the same (and correct!!) width with both of the following lines:

TaskBarWidth $ResolutionX-TaskBarX-TimeWidth$ ; without systraywidth

And:

TaskBarWidth $ResolutionX-TaskBarX-SystrayWidth-TimeWidth$ ; (theme-default)

But: the first line should not work because then the taskbar would not adjust to changes of the width of the systray. But it does work correctly. How is that possible ? This is really confusing.

THX, jc

Posted by member 375904 on 2007-07-03 08:03:13 link

And now I even found the solution:

$SystrayWidth$ is ignored completely and is _not_ exported by vtray-x.x.x. It is in fact apparently only a "leftover" from the time when the Austerity-Theme was developed. And it is very well suited to really mix up any one who wants to change those sections of the theme :-)

So here is how it really works: The taskbarwidth is adjusted in script.rc, using the bangs TaskbarShrink, TaskbarSize and TaskbarGrow.

These script-lines need to be replaced:
TaskbarShrink by xTaskbarResizeBy (with minus-sign before the increment)

TaskbarSize by xTaskbarResize

TaskbarGrow also by xTaskbarResizeBy (no minus-sign before the increment)

Posted by member 1 on 2007-07-03 12:49:31 link

You will find that Austerity is probably one of the worst themes to edit. You will constantly find strange things like this. I would recommend starting with something a little less intense and tweaking up from there.