I have been tinkering with TransformationMatrix in an attempt to make ModernGadgets scalable. During my tinkering, I have noticed that when you apply a transformation matrix to a meter, the meter's mouseactions will not update to match the transformation. For example, if you use a transformationmatrix to make a button 4x larger, it will only be able to be clicked in the area it would have been without the matrix.
Is this a limitation of transformationmatrix, or a bug?
It is currently April 19th, 2024, 2:36 am
TransformationMatrix and MouseActions
-
- Posts: 660
- Joined: June 25th, 2015, 7:02 pm
- Location: The Sky, USA
-
- Developer
- Posts: 2678
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: TransformationMatrix and MouseActions
This is a known bug for quite some time (since before I discovered Rainmeter).
While we do want to fix this and similar bugs (like the similar issue for the Angle option on the String meter), it is difficult to preserve backwards compatibility at the same time. A fix will most certainly break a lot of skins. We will have the see if the upsides outweigh the downsides. Either way, it probably won't be fixed anytime soon.
-Brian
While we do want to fix this and similar bugs (like the similar issue for the Angle option on the String meter), it is difficult to preserve backwards compatibility at the same time. A fix will most certainly break a lot of skins. We will have the see if the upsides outweigh the downsides. Either way, it probably won't be fixed anytime soon.
-Brian
-
- Rainmeter Sage
- Posts: 2603
- Joined: March 23rd, 2015, 5:26 pm
Re: TransformationMatrix and MouseActions
You can work around this by overlaying your meter with a totally transparent image meter that is dynamically sized. Your mouse stuff would then be part of the transparent meter, not the "real" one.
Code: Select all
[SomeMeter]
Meter=...
TransformationMatrix=#Scale#;0;0;#Scale#;#Scale#;#Scale#
[SomeMeter_MouseRegion]
Meter=Image
Solidcolor=0,0,0,0
X=([SomeMeter:X] * #Scale#)
Y=([SomeMeter:Y] * #Scale#)
W=([SomeMeter:W] * #Scale#)
H=([SomeMeter:H] * #Scale#)
DynamicVariables=1
...put your mouse action stuff here, not in SomeMeter...
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: TransformationMatrix and MouseActions
Just an observation: although the Help does mention that for a Button meteriamanai wrote:For example, if you use a transformationmatrix to make a button 4x larger
it seems that neither the TransformationMatrix is not applicable to them. Button meters simply disappear if any kind of TransformationMatrix is applied.All general meter options are valid, except W and H.
-
- Posts: 660
- Joined: June 25th, 2015, 7:02 pm
- Location: The Sky, USA
Re: TransformationMatrix and MouseActions
Thank you all for the replies. I had considered silverazide's suggestion, but I decided to see if there were alternatives because that would significantly increase the amount of meters in Disks Meter and the config skins, and my suite already has a significant performance impact (especially Disks Meter - that thing is a monstrous 6100 lines long already!)
balala, I actually don't use button meters. I use images with mouseactions. I actually completely forgot the button Meter existed! It's interesting that that happens with button meters though - definitely a bug that should be fixed.
Personally, I feel these bugs should be fixed as soon as possible. To compromise between fixing them and backwards compatibility, really the only thing that could be done is add yet another option to the [Rainmeter] section, similar to AccurateText. It's not an ideal solution, but it'd work.
balala, I actually don't use button meters. I use images with mouseactions. I actually completely forgot the button Meter existed! It's interesting that that happens with button meters though - definitely a bug that should be fixed.
Personally, I feel these bugs should be fixed as soon as possible. To compromise between fixing them and backwards compatibility, really the only thing that could be done is add yet another option to the [Rainmeter] section, similar to AccurateText. It's not an ideal solution, but it'd work.
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: TransformationMatrix and MouseActions
That's not necessarily a bug and maybe shouldn't be fixed. A button meter divides the image of the button into three distinct parts. Applying a TransformationMatrix could cause some troubles, because wouldn't be clear to which part of the image should be applied that transformation. If I'm not wrong, something like this could be the explanation why TransformationMatrix is not applicable to such meters.iamanai wrote:balala, I actually don't use button meters. I use images with mouseactions. I actually completely forgot the button Meter existed! It's interesting that that happens with button meters though - definitely a bug that should be fixed.
Same considerations about a Bitmap meter, which also divides the image into more parts (there're not necessarily just three parts, usually are much more, but anyway, the image is divided).
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: TransformationMatrix and MouseActions
There is no bug. It is in the nature of the way Bitmap and Button meters work that you just can't alter the size or orientation of the images or the meters containing the images. You cannot resize, rotate, or crop them.