It is currently May 7th, 2024, 7:37 pm

Meters are cut off, DynamicWindowSize=1 doesn't solve it

Get help with creating, editing & fixing problems with skins
mic-86
Posts: 8
Joined: February 24th, 2012, 12:26 pm

Meters are cut off, DynamicWindowSize=1 doesn't solve it

Post by mic-86 »

Sometimes while creating some skins, I have the problem that meters are cut off, it happens both to string meters and image meters. I've tried to fix that with DynamicWindowSize=1, like I've read in faq, but that doesn't help.

here is the skin I'm currently working on:
dock1.jpg
and here the code:

Code: Select all

[Rainmeter]
Author=mic-86
Update=1000
DynamicWindowSize=1

[Variables]

F=Frame.png

;---ICONPATH----------------------------------------------------------------------------------------------------------------------------------------

Icon1="#CURRENTPATH#\Icons\Icon1.png"
Icon2="#CURRENTPATH#\Icons\Icon2.png"
Icon3="#CURRENTPATH#\Icons\Icon3.png"

;---PATH--------------------------------------------------------------------------------------------------------------------------------------------

Path1="C:\Programme (x86)\TuneUp Utilities 2008\Integrator.exe"
Path2="C:\Programme (x86)\TuneUp Utilities 2008\OneClick.exe"
Path3="::{21EC2020-3AEA-1069-A2DD-08002B30309D}"

;---TEXT--------------------------------------------------------------------------------------------------------------------------------------------

Text1="TuneUp Utilities 2008"
Text2="TuneUp 1-Klick-Wartung"
Text3="Systemsteuerung"

;---TEXTCOLOR---------------------------------------------------------------------------------------------------------------------------------------

Color1=0FA4D1FF
Color2=03065EFF

;---FRAME-------------------------------------------------------------------------------------------------------------------------------------------

[MeterFrame]
Meter=Image
ImageName=#F#
X=0
Y=0
W=290
H=121
ScaleMargins=60,0,60,0

;---NORMAL ICONS------------------------------------------------------------------------------------------------------------------------------------

[MeterIcon1]
Meter=Image
ImageName=#Icon1#
X=47
Y=33
W=54
H=54
MouseOverAction=!Execute [!RainmeterHideMeter MeterIcon1][!RainmeterShowMeter MeterIcon1Text][!RainmeterShowMeter MeterIcon1hover][!RainmeterRedraw]

[MeterIcon2]
Meter=Image
ImageName=#Icon2#
X=117
Y=33
W=54
H=54
MouseOverAction=!Execute [!RainmeterHideMeter MeterIcon2][!RainmeterShowMeter MeterIcon2Text][!RainmeterShowMeter MeterIcon2hover][!RainmeterRedraw]

[MeterIcon3]
Meter=Image
ImageName=#Icon3#
X=187
Y=33
W=54
H=54
MouseOverAction=!Execute [!RainmeterHideMeter MeterIcon3][!RainmeterShowMeter MeterIcon3Text][!RainmeterShowMeter MeterIcon3hover][!RainmeterRedraw]

;---HOVERED ICONS-----------------------------------------------------------------------------------------------------------------------------------

[MeterIcon1hover]
Meter=Image
ImageName=#Icon1#
X=34
Y=18
W=75
H=75
Hidden=1
MouseLeaveAction=!Execute [!RainmeterShowMeter MeterIcon1][!RainmeterHideMeter MeterIcon1Text][!RainmeterHideMeter MeterIcon1hover][!RainmeterRedraw]
LeftMouseDoubleClickAction=!Execute ["#Path1#"]

[MeterIcon2hover]
Meter=Image
ImageName=#Icon2#
X=104
Y=18
W=75
H=75
Hidden=1
MouseLeaveAction=!Execute [!RainmeterShowMeter MeterIcon2][!RainmeterHideMeter MeterIcon2Text][!RainmeterHideMeter MeterIcon2hover][!RainmeterRedraw]
LeftMouseDoubleClickAction=!Execute ["#Path2#"]

[MeterIcon3hover]
Meter=Image
ImageName=#Icon3#
X=174
Y=18
W=75
H=75
Hidden=1
MouseLeaveAction=!Execute [!RainmeterShowMeter MeterIcon3][!RainmeterHideMeter MeterIcon3Text][!RainmeterHideMeter MeterIcon3hover][!RainmeterRedraw]
LeftMouseDoubleClickAction=!Execute ["#Path3#"]

;---HOVER TEXT---------------------------------------------------------------------------------------------------------------------------------------


[MeterIcon1Text]
Meter=String
X=74
Y=0
FontColor=#Color1#
AntiAlias=1
StringEffect=BORDER
StringAlign=CENTER
FontFace=Arial Black
FontSize=10
FontEffectColor=#Color2#
Text=#Text1#
Hidden=1

[MeterIcon2Text]
Meter=String
X=144
Y=0
FontColor=#Color1#
AntiAlias=1
StringEffect=BORDER
StringAlign=CENTER
FontFace=Arial Black
FontSize=10
FontEffectColor=#Color2#
Text=#Text2#
Hidden=1

[MeterIcon3Text]
Meter=String
X=214
Y=0
FontColor=#Color1#
AntiAlias=1
StringEffect=BORDER
StringAlign=CENTER
FontFace=Arial Black
FontSize=10
FontEffectColor=#Color2#
Text=#Text3#
Hidden=1
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Meters are cut off, DynamicWindowSize=1 doesn't solve it

Post by jsmorley »

The key here is to understand how StringAlign works.

If you have meters like:

[MeterOne]
Meter=String
X=0
W=200
StringAlign=Left
Text=Hello World

Then the text will be positioned at 0, extending to the right.

[MeterOne]
Meter=String
X=100
W=200
StringAlign=Center
Text=Hello World

Then the text will be positioned at 100, centering on that to the left and right.

[MeterOne]
Meter=String
X=200
W=200
StringAlign=Right
Text=Hello World

Then the text will be positioned at 200, extending backwards to the left

So when using StringAlign, the combination of X= and W= settings are critical to getting it to work the way you want.
mic-86
Posts: 8
Joined: February 24th, 2012, 12:26 pm

Re: Meters are cut off, DynamicWindowSize=1 doesn't solve it

Post by mic-86 »

jsmorley wrote:So when using StringAlign, the combination of X= and W= settings are critical to getting it to work the way you want.
If you look at my code, you'll see there is no W= setting within the string meters. I've also tried without StringAlign and move the meter manually and there is the same problem.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Meters are cut off, DynamicWindowSize=1 doesn't solve it

Post by jsmorley »

The trouble is that you are not allowing enough space for that text "TuneUp Utilities 2008" to fit centered on the corresponding icon. you need to move all the icons to the right a bit, then set the X= for that text meter to something like 82 so there is room for it to center to the left and right without running out of the window to the left. With X=74 as you have it now, when the text is centered on 74 and divided in half, the part to the left is longer than the space between the left edge of the window and 74. I hope that makes sense.

Or you could cheat and make the text a bit shorter, like "TuneUp Utils 2008" or something... ;-)
mic-86
Posts: 8
Joined: February 24th, 2012, 12:26 pm

Re: Meters are cut off, DynamicWindowSize=1 doesn't solve it

Post by mic-86 »

ok, moving all to the right works, as far as I see now everything is cut off when x,y-coordinates move to values below 0.
unfortunately, that causes another very little problem at the theme I'm working on.
desktop1.jpg
the problem is that the frame I've marked in the screenshot everytime when I try to move it upwards, moves back downwards as soon as I release the mousebutton. I can set the position manually at manage rainmeter window, that will work, but I would be more happy if I could place it with the mouse.

here the code of the frame:

Code: Select all

[Rainmeter]
Author=mic-86
Update=1000

[Variables]
F=framecorner.png
H=framehorizontal.png
V=framevertical.png

STRETCH HORIZONTAL=369
STRETCH VERTICAL=224

[MeterCorner]
Meter=Image
ImageName=#F#
X=0
Y=700

[MeterVertical]
Meter=Image
ImageName=#V#
X=0
Y=(-(#STRETCH VERTICAL#+68))R
W=20
H=#STRETCH VERTICAL#
ScaleMargins=0,20,0,5

[MeterHorizontal]
Meter=Image
ImageName=#H#
X=75
Y=748
W=#STRETCH HORIZONTAL#
H=19
ScaleMargins=0,0,20,5
for explanation, the frame is splitted into three images because the horizontal and vertical parts should be able to be stretched by simply change one value of the ini-file.
You do not have the required permissions to view the files attached to this post.