Skinning maximized windows in 3.0

From TrillWiki

Jump to: navigation, search

So, we have a lot of system variables for skins right now. An interesting one - in my opinion - is %window.maximized%. Let's walk you through a few of it's possible uses.

[edit] Maximize/Restore buttons

Have you always been annoyed by the fact that you can't specificy a restore button, if only for graphical uses? Well, you might just be able to do that now! Just have two icontrols, with the same name, but two different sources. The one has visible="!%window.maximized%", and the other visible="%window.maximized"

[edit] Remove border when Maximized

Another possibly nice feature! What if we could strip 4px from all sides when the window is maximized? Well! Let's do it!

<frame source="window" name="window" visible="1">
<rect>
<left num="(-4*(%window.maximized%||%window.docked%))" width="0" />
<right num="(-4*(%window.maximized%||%window.docked%))" width="1" />
<top num="(-1*(%window.maximized%||%window.docked%))" height="0" />
<bottom num="(-4*(%window.maximized%||%window.docked%))" height="1" />
</rect>
</frame>

Hope you can implement them! Have fun trying!