Im trying to position some text in the center of another meter using meter styles. It looks something like this
.Inc file with meter styles: .Ini file utilizing meters My method at the moment is to set the height of Item.Text to be the same as its Box. The I use padding to pisition it vertically centered. It works, but only if the font sizes are 11 or 10 (this works best). For bigger font sizes, the text seems to shift downwards a little more. This is the same for the Item.Icon:L / R meterstyles.
Looks something like this (fontsize: 18):
Compared to a set fontsize of 11:
The difference could either mean that the text isnt actually centered, and just looks like it, or it's a sizing issue. (im really not sure myself)
Here's the font for the Icons used (you only need to download it if you're in Windows10. it's included with windows 11): https://learn.microsoft.com/en-us/windows/apps/design/downloads/#fonts:~:text=Segoe%20UI%20Variable-,Segoe%20Fluent%20Icons,-Segoe%20UI
I tried to simplify the code as much as possible but there may still be things from my original code. I need a better way to position the text centered which doesnt comprimise the position of the rest of the options. (Using y values and StringAlign options causes various issues which is why im using padding in the first place). I hope this is clear enough, if not, I'll create a full skin so you can download it and test for yourself.
Help is much appreciated!
.Inc file with meter styles:
Looks something like this (fontsize: 18):
Compared to a set fontsize of 11:
The difference could either mean that the text isnt actually centered, and just looks like it, or it's a sizing issue. (im really not sure myself)
Here's the font for the Icons used (you only need to download it if you're in Windows10. it's included with windows 11): https://learn.microsoft.com/en-us/windows/apps/design/downloads/#fonts:~:text=Segoe%20UI%20Variable-,Segoe%20Fluent%20Icons,-Segoe%20UI
I tried to simplify the code as much as possible but there may still be things from my original code. I need a better way to position the text centered which doesnt comprimise the position of the rest of the options. (Using y values and StringAlign options causes various issues which is why im using padding in the first place). I hope this is clear enough, if not, I'll create a full skin so you can download it and test for yourself.
Help is much appreciated!
Statistics: Posted by Hazrd — Yesterday, 9:49 am