It is currently April 25th, 2024, 12:07 pm
[Suggestion] Increase/decrease size of skins through Rainmeter
-
- Posts: 478
- Joined: February 26th, 2011, 10:22 pm
[Suggestion] Increase/decrease size of skins through Rainmeter
Instead of adding W=(SIZE*#MULTIPLIER#) to every single meter, with #MULTIPLIER# being 1 for normal, and 0.X or 1.X for changes in size, it would be nice if Rainmeter could do this itself. In the Manage panel, have a percentage input box that adjusts all or an individual skin's size. This would be great for higher resolution monitors.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Increase/decrease size of skins through Rainmeter
There are just too many factors involved in this. It's not just about W or H, it's also about X and Y and FontSize and images and values in Shape meters, and just a boatload of factors. It's certainly a desirable feature, but I don't envision it happening unless we eventually can come up with a D2D / DPI based solution for sizing an entire window. I wouldn't hold my breath.Virginityrocks wrote:Instead of adding W=(SIZE*#MULTIPLIER#) to every single meter, with #MULTIPLIER# being 1 for normal, and 0.X or 1.X for changes in size, it would be nice if Rainmeter could do this itself. In the Manage panel, have a percentage input box that adjusts all or an individual skin's size. This would be great for higher resolution monitors.
-
- Posts: 478
- Joined: February 26th, 2011, 10:22 pm
-
- Rainmeter Sage
- Posts: 2605
- Joined: March 23rd, 2015, 5:26 pm
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
Just my 2 cents, but you'd be much better off using TransformationMatrix instead of all that "size * multiplier" stuff.Virginityrocks wrote:Instead of adding W=(SIZE*#MULTIPLIER#) to every single meter, with #MULTIPLIER# being 1 for normal, and 0.X or 1.X for changes in size, it would be nice if Rainmeter could do this itself. In the Manage panel, have a percentage input box that adjusts all or an individual skin's size.
Simply create a style for your meters that includes the line:
Code: Select all
TransformationMatrix=#Scale#;0;0;#Scale#;#Scale#;#Scale#
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
Do keep in mind that first, TransformationMatrix is not a factor in the derived overall skin size, and will not be managed by DynamicWindowSize=1. Make sure your skin is big enough to hold the scaled meters. Second, this is meter specific, and any X and Y that you are using to position meters within the skin will need to be managed in another way. Relative won't help! Any relative position will be relative to the original meter size. Also, keep in mind that X and Y are not fractional. Third, any change to the size of an image is going to effect the quality. Particularly if you are making it "larger" than the original image file. Last, but really important, any mouse action on the meter will only detect the mouse cursor on the original meter size!SilverAzide wrote:Just my 2 cents, but you'd be much better off using TransformationMatrix instead of all that "size * multiplier" stuff.
Simply create a style for your meters that includes the line:Apply this style to all your meters, set a variable Scale to your scaling factor, and save yourself a ton of headaches.Code: Select all
TransformationMatrix=#Scale#;0;0;#Scale#;#Scale#;#Scale#
In my view, TransformationMatrix is a decent way to "scale" individual meters in and of themselves, but is not a solution for scaling an entire skin.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
SkinWidth=300
SkinHeight=150
BackgroundMode=2
SolidColor=255,0,0,60
[Variables]
Scale=3
[MeterTest1]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello World
TransformationMatrix=#Scale#;0;0;#Scale#;#Scale#;#Scale#
LeftMouseUpAction=[!Log "Hello"]
[MeterTest2]
Meter=String
Y=10R
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello World
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 2605
- Joined: March 23rd, 2015, 5:26 pm
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
I dunno... we may have to agree to disagree on this one.jsmorley wrote:In my view, TransformationMatrix is a decent way to "scale" individual meters in and of themselves, but is not a solution for scaling an entire skin.
I agree there are definitely issues with TransformationMatrix, especially with mouse actions, but once you get used creating a simple invisible "overlay" image meter for the mouse, it's not so bad. And the relative positioning issue can be worked-around using relative positioning with the "little r" (i.e., Y=30r) to position items successfully with TransformationMatrix.
But those annoyances aside, here's my biggest issue with using the "position/size * scale" method of scaling a skin. Here's the skin with two identical meters, one scaled with TransformationMatrix, the other with "position/size * scale" scaling:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
SkinWidth=300
SkinHeight=200
BackgroundMode=2
SolidColor=255,0,0,60
[Variables]
Scale=3.00
[MeterTest1]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello World
TransformationMatrix=#Scale#;0;0;#Scale#;#Scale#;#Scale#
[MeterTest2]
Meter=String
X=#Scale#
Y=(30 * #Scale#)r
FontSize=(11 * #Scale#)
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=(5 * #Scale#),(5 * #Scale#),(5 * #Scale#),(5 * #Scale#)
AntiAlias=1
Text=Hello World
Here's the result if your scale factor is something like 2.33: The bounding rectangle is different dimensions, the font is different height and width, etc. This will happen with simple scale factors like 1.5, too, which a lot of people use on high DPI monitors. (I assume this is because fonts don't have fractional point sizes?)
TransformationMatrix has its issues and annoyances (mouse actions and the tendency to shift X/Y slightly), but if you want a skin that scales smoothly to any size, and will look exactly the same but just larger TransformationMatrix seems to be the best option we have so far. Also easier to implement than sticking "(... * #Scale#)" in a million places. Just my 2 cents.
You do not have the required permissions to view the files attached to this post.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
Don't disagree. TransformationMatrix has its place, and with some thought and some work can do the job pretty well. I was just pointing out some of the things to watch out for, as it's not a simple panacea for sizing skins.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
And yes, X / Y / W / H and FontSize are all integers in Rainmeter, rounding down. X=100 is 100, X=100.1 is 100, X=100.9 is 100.
In any case, not saying it can't be done.
I agree that using some #Scale# variable to try and adjust every meter's X / Y / W / H FontSize and image size is clunky and simply can't be effectively done with scale sizes that are not integers.
TransformationMatrix avoids the integer issue, but has it's own (for me personally) unacceptable challenges that really complicate applying it to an entire skin. The relative position issue is not really that easy to solve, and the mouse hit issue is a giant pain. I expect you have to have separate Image or Shape meters that are themselves scaled and positioned, but not using TrainsformationMatrix, to act as hosts for the mouse actions.
I guess my point is that for me at least, scaling skins is just not something that is straightforward enough with either method to appeal to me. Maybe someday if we can find a way to alter the scale / dpi of the entire skin with one option, it might be something I warm up to.
In any case, not saying it can't be done.
I agree that using some #Scale# variable to try and adjust every meter's X / Y / W / H FontSize and image size is clunky and simply can't be effectively done with scale sizes that are not integers.
TransformationMatrix avoids the integer issue, but has it's own (for me personally) unacceptable challenges that really complicate applying it to an entire skin. The relative position issue is not really that easy to solve, and the mouse hit issue is a giant pain. I expect you have to have separate Image or Shape meters that are themselves scaled and positioned, but not using TrainsformationMatrix, to act as hosts for the mouse actions.
I guess my point is that for me at least, scaling skins is just not something that is straightforward enough with either method to appeal to me. Maybe someday if we can find a way to alter the scale / dpi of the entire skin with one option, it might be something I warm up to.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
Since we're at this, I experimented with scaling skins, mostly because some people have asked to have skins to fit their screen resolutions.
At this moment I've only tried with some, using Round as a factor to have integer numbers...
That's why I use Round, however, the point is another: try to scale an image which uses Rotator!
I know I'm not so well trained, lately, but I've given up.
At this moment I've only tried with some, using Round as a factor to have integer numbers...
Doesn't it should be 101?jsmorley wrote:X=100.9 is 100.
That's why I use Round, however, the point is another: try to scale an image which uses Rotator!
I know I'm not so well trained, lately, but I've given up.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] Increase/decrease size of skins through Rainmeter
You can round the number yourself before FontSize or X / Y / W / H sees it yes. I agree that it would be logical that these values be "rounded" since they must be integers (today...) but that's just not how it works. They are floored or trunc'd by the routines that apply the values.fonpaolo wrote:Since we're at this, I experimented with scaling skins, mostly because some people have asked to have skins to fit their screen resolutions.
At this moment I've only tried with some, using Round as a factor to have integer numbers...
Doesn't it should be 101?
That's why I use Round, however, the point is another: try to scale an image which uses Rotator!
I know I'm not so well trained, lately, but I've given up.
FontSize=20.9 : equals 20
FontSize=(Round(20.9)) : equals 21
I would have some backwards compatibility concerns about changing our code so it intercepts the number before it is applied, and forces a "round" on it. There may be many skins that are using dynamic formulas to set meter positions and / or sizes, and they are behaving a certain way now. I'd hate to visibly bork a lot of them.