It is currently April 21st, 2019, 5:13 am

Complementary Colors

Help with creating, editing & fixing problems with skins
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Complementary Colors

Yincognito » February 8th, 2019, 8:47 pm

balala wrote:
February 8th, 2019, 8:36 pm
There is no ImageTint variable involved. Just ImageColor. I suppose this is what you wanted to write.
I was referring to the options involved (since I took his quote as a reference), not the variables used in those options. But yeah, it's correct either way, depending on whether you are referring to the options or the variables used in the options - I just thought it might be easier for him to understand if I talked about the same things he was talking about. ;-)
User avatar
balala
Rainmeter Sage
Posts: 8081
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Complementary Colors

balala » February 8th, 2019, 8:54 pm

Yincognito wrote:
February 8th, 2019, 8:47 pm
I was referring to the options involved (since I took his quote as a reference), not the variables used in those options. But yeah, it's correct either way, depending on whether you are referring to the options or the variables used in the options - I just thought it might be easier for him to understand if I talked about the same things he was talking about. ;-)
Ok, let's wait for his reply.
mattitta, please set up the dynamic variable, as suggested by Yincognito and give it a try.
mattitta
Posts: 14
Joined: January 26th, 2019, 3:17 am

Re: Complementary Colors

mattitta » February 9th, 2019, 3:21 am

Thank you for trying to help, but with or without dynamic variable still the same. I then copied some of the player.ini code to the volume.ini code
and it works perfectly. On the original player.ini if I click on one of the predefined colors it works only when I click on color picker where it doesn't.

Code: Select all

[Rainmeter]
Update=1000
Group=MyComplimentarySkins

[Variables]
VolumeIncrement=1
@include=#@#Variables.inc

[MeterBackGround]
Meter=Image
SolidColor=0,0,0,1
X=0
Y=0
W=400
H=120

[mPlayer]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=itunes
PlayerType=POSITION

[mDuration]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=DURATION

[mProgress]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=PROGRESS

[mVolume]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=VOLUME

[mTitle]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=Title

[mArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=Artist

[mAlbum]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
PlayerType=Album

[ProgressBar]
Meter=BAR
MeasureName=mProgress
X=50
Y=30
W=300
H=3
BarColor=#ImageColor#
SolidColor=#ImageColor#,75
BarOrientation=HORIZONTAL

[VolumeText]
Meter=STRING
MeasureName=mVolume
StringAlign=Center
FontFace=#FontFace#
FontColor=#FontColor#
FontSize=15
X=200
Y=0
AntiAlias=1
Text=Volume %1
MouseScrollDownAction=[!CommandMeasure mPlayer "SetVolume -#VolumeIncrement#"][!Update]
MouseScrollUpAction=[!CommandMeasure mPlayer "SetVolume +#VolumeIncrement#"][!Update]

[Time]
Meter=STRING
MeasureName=mPlayer
MeasureName2=mDuration
StringAlign=Center
FontFace=#FontFace#
FontColor=#FontColor#
FontSize=15
X=200
Y=40
AntiAlias=1
Text="%1/%2"

[TitleText]
Meter=String
MeasureName=mTitle
StringAlign=Center
FontFace=#FontFace#
FontColor=#FontColor#
FontSize=15
ClipString=1
x=200
y=60
AntiAlias=1
Text=%1

[ArtistText]
Meter=String
MeasureName=mArtist
StringAlign=Center
FontFace=#FontFace#
FontColor=#FontColor#
FontSize=15
x=200
y=80
AntiAlias=1
Text=%1

[AlbumText]
Meter=String
MeasureName=mAlbum
StringAlign=Center
FontFace=#FontFace#
FontColor=#FontColor#
FontSize=13
x=200
y=100
AntiAlias=1
Text=%1

User avatar
balala
Rainmeter Sage
Posts: 8081
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Complementary Colors

balala » February 9th, 2019, 4:24 pm

mattitta wrote:
February 9th, 2019, 3:21 am
Thank you for trying to help, but with or without dynamic variable still the same. I then copied some of the player.ini code to the volume.ini code
and it works perfectly. On the original player.ini if I click on one of the predefined colors it works only when I click on color picker where it doesn't.
Very weird, because as posted, the code also has set the Group to Group=MyComplimentarySkins into the [Rainmeter] section, so it should have to be refreshed and as such, the newly set color should have to work.
Could you please pack the whole config and upload it?
mattitta
Posts: 14
Joined: January 26th, 2019, 3:17 am

Re: Complementary Colors

mattitta » February 9th, 2019, 7:59 pm

Thanks balala here's the skin.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 8081
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Complementary Colors

balala » February 9th, 2019, 9:35 pm

mattitta wrote:
February 9th, 2019, 7:59 pm
Thanks balala here's the skin.
I GIVE IT UP. HAVE NO IDEA WHAT'S GOING ON. I QUIT.
Maybe someone else can give it a try? If you want to do, please download mattitta's above package and install it. Load all three skins (Skins\Complementary Colors\Player\Player.ini, Skins\Complementary Colors\Settings\Settings.ini and Skins\Complementary Colors\Volume\Volume.ini). Click COLOR PICKER in Settings.ini. RainRGB loads. Choose a color and click OK. The color of the strings in Volume.ini change, while the color of strings in Player.ini, doesn't, although both skins are members of the same skins group Group=MyComplimentarySkins, [Rainmeter] section), both have included the same file (@include=#@#Variables.inc, [Variables] section) and both are using the same FontColor=#FontColor# option to color the string meters. In Player.ini the color changes only when you click the COLOR PICKER again, to open another time the RainRGB.
The skins are refreshed when you click OK in RainRGB (and they really are refreshed), so I have no idea why one of them immediately applies the new color for the string meters, while the other doesn't.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3290
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Complementary Colors

eclectic-tech » February 10th, 2019, 3:15 pm

The problem is the default refresh action of RGB4 to refresh all loaded configs. I am not sure why the player skin did not respond to the change in the color variable, perhaps since it was the first one refreshed by "Refresh All" done by RainRGB combined with the !RefreshGroup bang you executed... :confused:

You setting skin refreshed all 20 skins I had loaded when I selected a color via RainRGB4. You can tell RainRGB4 which configs to refresh in the call to the add on; I would recommend always doing this, since refreshing every skin an end user has loaded is something they should control, not your skin.

Change the LeftMouseUpAction in your code section [MeterColorPicker] to:

Code: Select all

[MeterColorPicker]
Meter=String
StringAlign=Center
StringCase=Upper
FontFace=#FontFace#
FontColor=[MeasureComplementaryColor]
FontSize=15
X=150
Y=20R
W=200
H=20
AntiAlias=1
Text=Color Picker
DynamicVariables=1
LeftMouseUpAction=["#@#Addons\RainRGB4.exe" "VarName=ImageColor" "FileName=#@#Variables.inc" "RefreshConfig=Complementary Colors\Settings | Complementary Colors\Player | Complementary Colors\Volume"][!SetOptionGroup Colors String "#*ImageColor*#"][!SetOptionGroup Strings FontColor "[*MeasureComplementaryColor*]"][!EnableMeasureGroup "Components"][!UpdateMeasureGroup "Colors"][!UpdateMeasureGroup "Components"][!Redraw]
;[!RefreshGroup "MyComplimentarySkins"]
When using RainRGB4, if you add more skins to your 'MyComplementarySkins' group, also add them to the list to refresh in RainRGB4.
Note, because RainRGB4 does a refresh, you do not need to add your refresh group bang.
User avatar
FreeRaider
Posts: 770
Joined: November 20th, 2012, 11:58 pm

Re: Complementary Colors

FreeRaider » February 10th, 2019, 3:42 pm

Nice catch eclectic-tech. :thumbup: I was working on this skin.
User avatar
balala
Rainmeter Sage
Posts: 8081
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Complementary Colors

balala » February 10th, 2019, 7:13 pm

eclectic-tech wrote:
February 10th, 2019, 3:15 pm
The problem is the default refresh action of RGB4 to refresh all loaded configs. I am not sure why the player skin did not respond to the change in the color variable, perhaps since it was the first one refreshed by "Refresh All" done by RainRGB combined with the !RefreshGroup bang you executed... :confused:
Yep, your LeftMouseUpAction indeed works, however I have no explanation of what had went on. Especially that even if a RefreshConfig option isn't set, all skins are refreshed (including both Volume.ini and Player.ini) and they really are. To ensure they are, I've added the following measure and meter to the end of both codes:

Code: Select all

[Measure]
Measure=Calc
Formula=( Measure + 1 )

[Meter]
Meter=STRING
MeasureName=Measure
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=%1
This way I get a counter on both skins. If this counter resets, means that the skin is refreshed. And when I click the Ok on RainRGB, both skins are refreshed, however only in one of them can I see the newly written color code applied. Like if Player.ini would get be refreshed first, then the FontColor variable written and finally the Volume.ini get refreshed as well. Seems to me like this is the explanation of why Player.ini doesn't see the newly written variable. :confused:
I'm still curious why is this going on. No explanation, from my part...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3290
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Complementary Colors

eclectic-tech » February 10th, 2019, 7:39 pm

The one thing I noticed in the Log, with the original code, the "player.ini" skin was being refreshed twice in quick succession:
player.ini refreshed
volume.ini refreshed
player.ini refreshed
...then all the other loaded skins...

I am not sure why, but having the 2 bangs happening in quick order: RainRGB refreshing all skins, and the Setting.ii skin sending a bang to [!RefreshGroup MyComplemetarySkins] is not a good idea, and for some reason, those competing actions were causing the player.ini to not refresh with the new values.

RainRGB is very versatile, but the one thing I never liked was the default action that refreshes every loaded skin. In my opinion, it should only refresh the calling skin and have the skin author control what else is refreshed (skin groups, suites of skins, etc.).

The way it works by default can cause issues (as you can see) when another bang tries to refresh a skin at the same time.

Just my opinion, but the call to RainRGB should ALWAYS contain a "RefreshConfig=..." parameter, so all loaded skins are NOT refreshed.