It is currently May 25th, 2019, 2:16 pm

[Request] String InlineSetting for vertical character spacing

Report bugs with the Rainmeter application and suggest features.
User avatar
raiguard
Posts: 611
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

[Request] String InlineSetting for vertical character spacing

raiguard » April 8th, 2019, 8:54 pm

I would like the ability to use InlineSetting to change a string's vertical spacing, not just horizontal. Here is my usecase:
2019-04-08 14_51_52.png
In this skin, each button and its label is one string meter, to facilitate clicking anywhere on the button or label in order to change the setting. For the most part, it works fine. However, for the toggle button and ColorPickerPlus button, I had to increase the font size of the icon compared to the rest of the string to keep aesthetic balance. This causes the labels to be offset from the icon.

What I would envision is either a new option (VerticalSpacing?) or an extension of the CharacterSpacing option to include top and bottom.

Thanks in advance! :D
You do not have the required permissions to view the files attached to this post.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
jsmorley
Developer
Posts: 19245
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Request] String InlineSetting for vertical character spacing

jsmorley » April 8th, 2019, 10:01 pm

So in effect you want to be able to move the string "ColorPickerPlus Demo" up a couple of pixels from the Y baseline the meter is on? I mean, this is always going to be "up", as the string can't be drawn below Y.

This feels like a lot of work to avoid two meters...
User avatar
raiguard
Posts: 611
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: [Request] String InlineSetting for vertical character spacing

raiguard » April 9th, 2019, 4:31 pm

Well, the effect I'm going for is that you can click anywhere on the button or label to switch the setting:
settings_demo_1.gif
There are two ways to do this: Make both the button and label one meter, or create three meters: Button, label, and mouse region. When you are me and you pack as many options as possible into your suite, the latter can result in a vast amount of meters to handle:
2019-04-09 10_26_19.png
And while using all of these InlineSettings seems complicated, it doesn't really make that much of a difference if you smartly use MeterStyles. My current WIP version looks something like this:

Code: Select all

[MeterCheckButton]
Meter=String
MeterStyle=StyleSettingsButton | StyleCheckButton
InlineSetting=Weight | [&MeasureSettingsScript:GetIcon('check_weight', 'checkDemo', '1')]
Text=[\[&MeasureSettingsScript:GetIcon('check_icon', 'checkDemo', '1')]] Check Demo
LeftMouseUpAction=[!CommandMeasure MeasureSettingsScript "Toggle('checkDemo', '1', '0')"]
As compared to my existing implementation in ModernGadgets, using two separate meters:

Code: Select all

; Cpu Name
[CpuNameButton]
Meter=String
MeterStyle=StyleToggleButton | StyleStringButtonHover
Text=[&MeasureSettingsScript:GetIcon([#showCpuName])]
LeftMouseUpAction=[!CommandMeasure MeasureSettingsScript "Toggle('showCpuName', '1', '0', 'CpuNameAction')"]

[CpuNameLabelString]
Meter=String
MeterStyle=StyleString | StyleStringToggleLabel
Text=CPU Name
As you can see, combining the meters will save a lot of time and significantly decrease the file size.

If my request is not feasible, that's alright. The vast majority of my settings are checkboxes and radio buttons, and those align perfectly well without needing this option. I just thought I'd ask, just in case. ;)

Thanks!
You do not have the required permissions to view the files attached to this post.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017