Resolutions Thread last updated on 2004-04-08 16:52:33

Posted by member 124072 on 2004-04-07 12:16:30

If I want to make a theme that has a bar on the bottom and a config for lets say 800x600 and 1024X768, can I make an IF THEN that says this?
IF $resolutionX$ = 1024 THEN
Include exampleconfig.rc
ELSEIF $resolutionX$ = 800 THEN
Include exampleconfig2.rc

Posted by member 32550 on 2004-04-07 12:24:17 link

If resolutionX = 1024
Include exampleconfig.rc
ElseIf resolutionX = 800
Include exampleconfig2.rc
EndIf


if you're doing well you're theme doesn't need the to have special setting for each resolution. you also can set width, height, x and y psoition with some math (example:
width $resolutionx-200$
height $resolutiony-25$

Posted by member 1 on 2004-04-07 12:28:45 link

and considering that there aren't that many settings that should change with a resolution change this is almost a waste.

Posted by member 12025 on 2004-04-07 14:18:11 link

You could do it, but don't. take advantage of the math evars and mzscript let you do to make it work from 640x480 up to...whatever.

Posted by member 1316 on 2004-04-07 18:00:34 link

dev: actually, if you're making a bar theme, a lot can change with different resolutions. if you have, for instance, tasks, system tray, and vwm, at specific pixel locations, changing from 1024 to 1280 will completely throw it off. there will be gaps in the bar, since you also (probably) set a specific width.

Posted by member 124072 on 2004-04-07 21:28:15 link

I am going to make a bar theme, and as deuce said I dont wan't gaps showing when you change res

Posted by member 1 on 2004-04-07 23:05:58 link

deuce :: so like 4 settings changed...big deal...its not worth a whole file.

Posted by member 99 on 2004-04-07 23:37:14 link

deuce: That's why you don't set a specific width. If you can put another module next to it, you can make it fill the width.

That said, there's nothing wrong with doing a big if/endif thing per se, it's just not strictly necessary. Making it resolution independent would be better, but it's your theme.

Posted by member 12025 on 2004-04-08 16:52:33 link

Lets say there's a tray, vwm and tasks, call then 20px high, 40px from each side of the screen, and the taskbar fills gaps.
LsboxName traybar
LsboxX $TraybarX$
LsBoxY $TraybarY$
LsBoxWidth $TraybarWidth$
...
LsboxName vwmbar
LsboxX $VWMbarX$
LsBoxY $VWMbarY$
LsBoxWidth $VWMbarWidth$
...
LsboxName taskbar
LsboxX $TaskbarX$
LsBoxY $TaskbarY$
LsBoxWidth $TaskbarWidth$
...
TraybarX $ResolutionX-40$
TraybarY -20
TraybarWidth 100
VWMbarX $TraybarX-TraybarWidth$
VWMBarY -20
VWMBarWidth 81
TaskbarX $VWMbarX-VWMbarWidth$
TaskbarY -20
TaskbarWidth $ResolutionX-TaskbarX-40$

...and better yet would be to put it all in one LsBox. And if they all adjust, have an amount they adjust (say, resolutionX/10), and then have one that fills the gap if rounding errors occur.