Kitutz / rainmeter

Automatically exported from code.google.com/p/rainmeter
0 stars 0 forks source link

No way to get screen width/height in integer format from SysInfo #34

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently SysInfo returns string values of the form "height x width" for
WORK_AREA and SCREEN_SIZE which means you can't actually do anything useful
with them such as resize/reposition your skins.

I couldn't live without this feature for my current skin so I've actually
hacked the SysInfo plugin and added the following new SysInfoTypes which
will return UINTs:
    WORK_AREA_WIDTH,
    WORK_AREA_HEIGHT,
    SCREEN_WIDTH,
    SCREEN_HEIGHT,
    NUM_MONITORS,
    VIRTUAL_SCREEN_WIDTH,
    VIRTUAL_SCREEN_HEIGHT,

If anybody has any suggestions for other useful system information, I can
add those in as well.

I should mention that WORK_AREA_W/H and SCREEN_W/H both can take a
SysInfoData value which will allow the user to specify which monitor to use
if working in a Multi-Monitor environment, although if none is specified it
will just use the Primary monitor.

I'm obviously not in the project yet, but if Rainy is willing to add me I
can submit the changes, or just pass them off to somebody if they'd like to
review them once I'm sure it's release quality.

Original issue reported on code.google.com by kbuffing...@gmail.com on 8 Apr 2009 at 7:27

GoogleCodeExporter commented 8 years ago
A couple more:
SCREEN_TOP,SCREEN_LEFT which returns the top and left coordinates of the 
selected
screen in virtual screen coordinates.
WORK_AREA_TOP,WORK_AREA_LEFT to return the position of the corner of the work 
area in
screen coordinates since this may not be 0,0 if the task bar is on the top or 
left.

Original comment by brian.to...@gmail.com on 8 Apr 2009 at 9:10

GoogleCodeExporter commented 8 years ago
It should be trivial to add those in as well.

WORK_AREA is actually in virtual coordinates normally. Would you want it 
translated
to screen coords or left as is? Maybe a SysInfoData flag to choose the less 
common of
the two? Alternatively, I could split the two into SCREEN_WORK_AREA and
VIRTUAL_SCREEN_WORK_AREA or something, but the naming isn't necessarily 
intuitive.

Original comment by kbuffing...@gmail.com on 8 Apr 2009 at 11:08

GoogleCodeExporter commented 8 years ago
Either coordinate system or both would work.  I'll leave it up to the 
implementer.

Original comment by brian.to...@gmail.com on 9 Apr 2009 at 5:03

GoogleCodeExporter commented 8 years ago

Original comment by brian.to...@gmail.com on 9 Apr 2009 at 5:04

GoogleCodeExporter commented 8 years ago
Would this allow for the handling of the DesktopWorkArea setting to be changed, 
so
that you could specify number of pixels from each screen edge? Currently, you 
can set
the x,y from the left,top and then the number of pixels to use from that point. 
If
you then run Rainmeter on a larger monitor, the windows would only maximize to 
the
size set for the smaller monitor.

Original comment by JMHarris...@gmail.com on 10 Apr 2009 at 1:13

GoogleCodeExporter commented 8 years ago
This feature would not effect the work area settings, only allow you to read 
them out.

Original comment by brian.to...@gmail.com on 10 Apr 2009 at 4:25

GoogleCodeExporter commented 8 years ago
r36 commits the changes for this issue

Original comment by kbuffing...@gmail.com on 13 Apr 2009 at 4:30