Page 1 of 1

String meter option to make the whole "text area" draggable?

Posted: January 27th, 2023, 2:45 pm
by llinfeng
For string meters, is there an option to make the whole meter draggable? For now, I'll need to carefully place the mouse cursor on the text, and then drag. Ideally, I'd like to drag the string meter by holding the mouse on the "text area", defined by the rectangular area spanned by the text.

Here is a skin configured to show the name of the current virtual deesktop and the CPU temperature. [Dependency: the VirtualDesktop plugin.]

Code: Select all

[Rainmeter]
Update=10000
AccurateText=1

[MeasureVirtualDesktop]
Measure=Plugin
Plugin=VirtualDesktop
UpdateDivider=-1
OnUpdateAction=[!UpdateMeter MeterDesktopName][!Redraw]

[MeterDesktopName]
Meter=String
MeasureName=MeasureVirtualDesktop
Text=%1
FontColor=FFCB05
FontFace=Tahoma
FontSize=24
AntiAlias=1
X=26

[MeasureMaxTemp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=MaxTemperature

[MeterMaxTemp]
Meter=String
MeasureName=MeasureMaxTemp
X=0
Y=0
W=30
Text="%1"
FontColor=00275C
FontFace=Tahoma
FontFace=ProFontWindows
FontSize=14
AntiAlias=1
StringEffect=BORDER
FontEffectColor=#ffffff
It looks like the following:
Image

Re: String meter option to make the whole "text area" draggable?

Posted: January 27th, 2023, 5:13 pm
by SilverAzide
llinfeng wrote: January 27th, 2023, 2:45 pm For string meters, is there an option to make the whole meter draggable? For now, I'll need to carefully place the mouse cursor on the text, and then drag. Ideally, I'd like to drag the string meter by holding the mouse on the "text area", defined by the rectangular area spanned by the text.
Sure, that's easily done. In Rainmeter, the mouse actions will react to any area that is non-transparent. So all you need to do is change the background of any meter to a non-transparent value. Simply add the following line:

Code: Select all

SolidColor=0,0,0,1
This works for all types of meters (String, Image, etc.). This is described in the manual, under SolidColor.

Re: String meter option to make the whole "text area" draggable?

Posted: January 30th, 2023, 12:29 pm
by llinfeng
Many thanks! I was searching for keyword "draggable", or "drag". The manual entry is accurate. To be able to drag something, the item/meter needs to be clickable first.