xTray & xTaskbar behaving strangely Thread last updated on 2005-12-19 12:29:25

Posted by member 280260 on 2005-12-17 17:54:46

I have a taskbar that sits above the tray on the right side of the screen. It's supposed to adjust to changes in the trays side. Normally it works like a charm, but every time the taskbar is emptied it seems to shift down six pixels. I've tried adjusting this in xTaskbarOnEmpty, but it doesn't seem to make a difference.

Here's the code:
xtaskbarcurrentheight 0


; :: xTray control ::

xTrayStartHidden

xTrayX 6

xTrayY -6

xTrayAutoSize

xTrayAlwaysOnTop

xTrayHoverIconSize 18

xTrayWrapCount 2

xTrayWidth 40

xTrayAlphaMap

IF UseFade

xTrayCustomAlphaFade 15 0

ENDIF

xTrayImage task.png

xTrayImageTopEdge 2

xTrayImageLeftEdge 2

xTrayImageRightEdge 2

xTrayImageBottomEdge 2

xTrayXSpacing 4

xTrayYSpacing 4

xTrayBorders 2 2 2 2

xTrayLayout .horizontal

xTrayWrapDirection .top

xTrayDirection .bottom

xTrayOnResize !execute [!parseEvars !xTaskbarMove 6 %#xtraycurrenty-xtaskbarcurrentheight-6%#]

xTrayOnMiddleClickUp !xTrayToggleHiddenIcons



; :: xTaskbar

xTaskbarAlphaMap

xTaskbarImage "blank.png"

xTaskbarLayout ".vertical"

xTaskbarButtonDirection ".top"

xTaskbarUseBigIcon

xTaskbarIconSize 32

xTaskbarHeight 0

xTaskbarButtonMaxHeight 40

xTaskbarButtonMaxWidth 40

xTaskbarIconX 4

xTaskbarIconY 4

xTaskbarButtonYSpacing 6

xTaskbarAutoSize $ResolutionY$

xTaskbarTooltipDurations 300 2000

xTaskbarTooltipTextColor 000000

xTaskbarY $xTrayY-6$

xTaskbarShowText false

xTaskbarX 6

xTaskbarAlwaysOnTop true

xTaskbarStartHidden true

IF UseFade

xTaskbarCustomAlphaFade 15 0

ENDIF

*xTaskbarOverlayButton 0 0 100% 100% OverlayButton #a

OverlayButtonMinimizedButtonImage "task.png"

OverlayButtonNormalButtonImage "task-open.png"

OverlayButtonActiveButtonImage "task-active.png"

Any help would be greatly appreciated.

Posted by member 1 on 2005-12-17 18:57:35 link

Im gonna say that your xTrayOnResize looks bad but it has nothing to do with fixing your problem.

As for fixing the problem you have your xTaskbarHeight set to 0. So yeah...it would screw things up.

Posted by member 280260 on 2005-12-17 19:31:46 link

Changed xTaskbarHeight to 32 - no change.
Deleted the line alltogether - no change.

I don't think it makes a difference since autoresize is on.

What's wrong w/ my xTrayOnResize?


Thanks.

Posted by member 1 on 2005-12-17 19:57:32 link

You are using !ParseEvars which you don't need to do. And you either can get rid of !Execute. But for future reference every !Bang needs to be enclosed in [ and ].

And what is this..
xTrayDirection .bottom


And actually...now that I look at it...your whole xTrayOnResize is wrong. You keep moving your Taskbar out of the way of your Tray instead of resizing it. And is that even a valid setting? Shouldn't it be something like xTrayOnAdd or something? Damn I wish I had my docs in front of me right about now.

Posted by member 280260 on 2005-12-18 01:38:47 link

xTrayDirection .bottom is, in fact, a valid setting.

This is probably a little hard to visualize - my taskbar sits above the tray in the bottom left corner of the screen. It adds new icons *on top*, which is why it needs to get moved out of the way. It doesn't cover the whole side of the screen.
It's like this:
__
|__|

Posted by member 1 on 2005-12-18 02:25:29 link

how about uploading a screenshot?

Posted by member 212670 on 2005-12-18 02:28:13 link

Ya, that's why I personally haven't offered a solution. I need a visual.

Posted by member 280260 on 2005-12-18 12:25:18 link

I've decided to scrap the idea - wasn't as nice as I expected. If you still want an ss, http://static.flickr.com/39/74837134_100bfca1c9_o.jpg

Posted by member 280260 on 2005-12-18 12:28:25 link

btw, DeV, thanks for the thing about brackets around !bangs.

Posted by member 12025 on 2005-12-18 19:26:17 link

Why is the direction .top?
Make it right, wrapping at 2 items, wrapping to the top.

Then use xTrayOnLineAdd and xTrayOnLineRemove, with no dynamic evars (using moveby/repositionby, they won't be needed).

Posted by member 1 on 2005-12-18 20:40:51 link

Photochopping a SS together doesn't help explain what is happening. :) But Cerbie is right...you are going at it all strange.

Posted by member 12025 on 2005-12-18 21:54:19 link

Actually, it did help. The right one is down by 6. Before, I couldn't figure out what it was really meant to do.

Posted by member 1 on 2005-12-18 23:16:26 link

except that the ss disagrees with the problem posted

Posted by member 12025 on 2005-12-19 05:08:37 link

How so? It shows them spaced out, then after clearing the taskbar and adding one, the only task is lower than in the previous one (left). It fits precisely w/ the problem described. I mean, I didn't check if it was 6 pixels or not....

Using the evars immediately, without a timer, has always been a problem, but the bigger problem was simply that there are many ways to do the job, and the best one was not the one being used.

Posted by member 1 on 2005-12-19 12:29:25 link

I read the problem differently which made it not make sense. Your description makes more sense.