Closed raiguard closed 6 years ago
So this will be possible if I stop using the “border” image and make every border four separate images. I will also need to add invisible button meters to EVERY button. sigh
Actually, I don't like the idea of hardcoded constants. I think they prevent from implementing scaling easily.
What hardcoded constants?
For example that font size: https://github.com/raiguard/ModernGadgets/commit/e4309abbbfce000862431f836691cc5a9427df9c . I'm not certain, but maybe it would be better to make a global constant #CommonIconFontSize#
with a value of 10 (FontSize=#CommonIconFontSize#
) instead of FontSize=10
.
So implementing scaling will look like FontSize=#CommonIconFontSize# * #ScaleFactor#
. It would be harder to have scaling bugs because using the same global constants changes sizes of everything similarly.
As I understand, hardcoding is a coding style of the project. Currently, many numbers are equal by value and by sense, but those values are hardcoded. So changing something in one place will cause many identical changes in others.
Maybe I don't know something about Rainmeter (I'm a really newbie) and everything I've written has no use at all :( What do you think?
Some more examples:
The way scaling will work is using the “TransformationMatrix” option on all meters. Because of the way it works, you only need to define things for the 1.0 scale factor, and TransformationMatrix handles the rest.
Also, the specific ones you pointed out are on measures, and have absolutely no effect on the visuals.
I actually have a local branch on my PC in which I implemented TransformationMatrix. However, none of the buttons work at any size except 1.0, and there are still visual hiccups to sort out. I’ll publish the branch when I get home so you can check it out.
So thanks to jsmorley, I now know a way to implement this while retaining the relative positioning equations that I'm currently using! So this feature will possibly come in v1.5.0!
:D
Making progress!
Buttons are clickable! Also figured out from this that there is an issue with the session totals in standard network meter, so that will need to be fixed with another patch. I also forgot to record the mouse cursor in this one, so sorry for the ghost clicking!
Also, please note that the white backgrounds are completely temporary, and only exist so I can easily debug them.
1x vs. 5x scale. The GIF program completely ruins the colors at 1x scale, so don't worry about the fact that they all look orange - in real life, that isn't the case.
All of the system monitoring gadgets now have scaling support! I still need to to chronometer, the new v1.5 gadgets, ALL of the configuration skins, and the setup skin. :(
Bigger == better, right?
So I discovered that it is flat-out impossible to scale input boxes. Thus, all of the settings skins are forced to stay at x1 scale, with the scale setting only affecting the actual Gadgets themselves. However, on the bright side, that means that scaling support is almost completely finished now! It'll be included in the first v1.5 beta.
Hey, guess what!? GUESS WHAT!?
IT'S DONE!!!!!
1.5.0-beta1 welcomes me not properly :)
As you see, the button is out of bounds.
This is the kind of thing that should be put into the 'scaling beta test' issue. But in this case, this is a known bug that I am trying to solve, but currently don't know how to. I am working on it though!
Edit: you also made me realize that the welcome prompt will appear for everyone when upgrading from v1.4 to v1.5, even though it's only supposed to appear for new users. That'll be fixed in the next beta as well.
@raiguard, now there is the same update prompt glitch:
It appears on 1.5.0-beta1. I use 1.00 scale factor.
By the way, should I write about it here or there?
I fixed that issue in beta 2. And yes, this is what that other issue is meant for.
Utilize TransformationMatrix to make the gadgets and config skins scalable. This ability would mostly be useful for those with 4K monitors, where the default gadget size is too small. Will be freely changeable using an input box, and right-clicking on the global settings skin (where the input box will be) will offer a context option to revert to default sizing in case a user accidentally makes it too large.
To-do
Current issues