xLabel-3.5.8 + Always On Top = Disappearing Label Thread last updated on 2006-05-23 17:38:34

Posted by member 271752 on 2006-05-19 15:57:59

I've got a label showing the current time and other stats (cpu, ram, etc). When a window is maximized the time is still visible on the right hand bottom corner, but the rest of the label is behind the maximized window. I want the label to become always on top when the mouse enters, and back to behind everything when it leaves (so I don't have to minimize a window to see the stats).

However, any time I use the !LabelAlwaysOnTop command onEnter (or onLeave or even from the lsxcommand module) the label just disappears instead of showing up on top. I've tried toggle, switch, on, off, no setting, and even commands that aren't even in the module anymore, to no avail.

Any help would be greatly appreciated.

Here's the label code:
*Label rainmetertext_
rainmetertext_AlphaMap
rainmetertext_ghosted false
rainmetertext_X -280
rainmetertext_Y -498
rainmetertext_Width 280
rainmetertext_Height 500
rainmetertext_Font $font$
rainmetertext_FontColor $fontcolor$
rainmetertext_fontoutline true
rainmetertext_fontoutlinecolor $fontcoloroutline$
rainmetertext_FontHeight $fontheight$
rainmetertext_bottomborder 3
rainmetertext_FontAlign right
rainmetertext_FontVertAlign bottom
rainmetertext_Image sysinfo.png
rainmetertext_Text $systext$
rainmetertext_OnEnter !LabelAlwaysOnTop rainmetertext_ on
rainmetertext_OnLeave !LabelAlwaysOnTop rainmetertext_ off


Also, specifying a hard coded rainmetertext_AlwaysOnTop makes it show up always on top like desired. How can I get this to dynamically show up and go away?

Posted by member 212670 on 2006-05-19 20:32:13 link

OnEnter and OnLeave don't work if a window is covering the label, since you then aren't considered entering/leaving the label.

Posted by member 321598 on 2006-05-19 22:00:43 link

hmm, correct me if I'm wrong, but shouldn't the correct syntax for xlabel AlwaysOnTop be !LabelAlwaysOnTop rainmetertext_ on True, at least that's what the doc seems to say...

Also like xcal said, the label doesn't register the event if it's not ontop, so I'd just have a small icon that's always ontop that toggles the bigger label.

Posted by member 212670 on 2006-05-20 00:01:55 link

Docs say:

!LabelAlwaysOnTop (label-name) ("true"|"on", "false"|"off" or "toggle"|"switch")

Too many options, imo, but it may have ended up that way for compatibility sake, at some point.

Posted by member 271752 on 2006-05-23 17:38:34 link

yes, I've tried all those options, none work as expected.

A window is only ever covering part of the label. The bottom line of the label is always visible and that's what I want to hover over to have the rest of the label show up.

OnEnter and OnLeave do work. I've tested it with changing the text of a label. It changes the text to a test string on enter and changes it back on leave, as it should. When the always on top is set to true (on or toggle) though the entire label just disappears.

The problem isn't with the events, as even issuing the !labelalwaysontop bang command causes the label to disappear.

Any other suggestions?