Author Topic: Dependent skins  (Read 7952 times)

carloscs

  • Full Member
  • ***
  • Posts: 162
I'm noticing that there are some skins just copied from other skins, with a few changes to get the new look.

Copying the entire skin is a waste, as when the original skin changes to add fixes (or new features), the new skin doesn't get the fixes.

Suggestion: add a dependsOn skin feature.

For example. the Pop Pink Skin has suggestions for "Darker-Player-Panel Mod". This could be implemented as:

Pop Pink Darker.xml
<?xml version="1.0" encoding="utf-8"?>
<root dependsOn="Pop Pink">
<colours id="Default">
<!-- 76-->  <element id="Player.Background" bg="140,140,140" bg2="100,100,100" fg="60,60,60" bdr="140,140,140" />
</colours>
</root>

Just my .02€, as I don't do skins :)

Rotem K.

  • Sr. Member
  • ****
  • Posts: 499
I love this one.

Maybe it can create a temperery skin file, adding the depented skin's color element at the end of the parent skin's color elements, 'overwriting' the lines above.

 

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
its actually quite easy to implement and a very good idea so i will do it soon

Rotem K.

  • Sr. Member
  • ****
  • Posts: 499
one thing is, how many levels of inheritance can it have?

Let's say Pop Pink Darker is depenend on Pop Pink. can one make a skin depenend on Pop Pink Darker ?

Maybe have it depenend on Pop Pink first, then Pop Pink Darker and then the new color elements?

<?xml version="1.0" encoding="utf-8"?>
<root dependsOn="Pop Pink">
<root dependsOn="Pop Pink Darker ">
<colours id="Default">
<!-- 76-->  <element id="Player.Background" bg="140,140,140" bg2="100,100,100" fg="60,60,60" bdr="140,140,140" />
</colours>

VX

  • Guest
Brilliant idea !!! I thought about sth similar, but I put off posting it as in my opinion it was hard to implement. Thanks God that Steven can do it  :)

Among other advantages, dependent skins would simplify skins customization for an average user and get rid of some common mistakes that budding Skinners tend to make.

carloscs

  • Full Member
  • ***
  • Posts: 162
Let's say Pop Pink Darker is depenend on Pop Pink. can one make a skin depenend on Pop Pink Darker ?

Maybe have it depenend on Pop Pink first, then Pop Pink Darker and then the new color elements?

<?xml version="1.0" encoding="utf-8"?>
<root dependsOn="Pop Pink">
<root dependsOn="Pop Pink Darker ">
<colours id="Default">
<!-- 76-->  <element id="Player.Background" bg="140,140,140" bg2="100,100,100" fg="60,60,60" bdr="140,140,140" />
</colours>

Nope:

Pop Pink Even Darker.xml
<?xml version="1.0" encoding="utf-8"?>
<root dependsOn="Pop Pink Darker ">
<colours id="Default">
<!-- 76-->  <element id="Player.Background" bg="140,140,140" bg2="100,100,100" fg="60,60,60" bdr="140,140,140" />
</colours>

When loading the first dependsOn "Pop Pink Darker"  MusicBee will see that it depends on "Pop Pink" and recursively resolve the dependency.

Like this if later "Pop Pink Darker" ceases to depend on "Pop Pink" or chooses to depend on something else,. any dependent skins will not be affected.

VX

  • Guest
Maybe some kind of layered approach  (I was going to name the feature wishlist that way) would be the solution  ???
The missing layer wouldn't be applied if the file is not present in the folder.

EDIT:
The 'bug' with Pop Pink Skin I described here was once off problem and it's fixed with MB 1.2.4071.
Last Edit: February 24, 2011, 09:45:25 AM by VX

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312

carloscs

  • Full Member
  • ***
  • Posts: 162
Works good. Just tried "Pop Pink Darker" and "Pop Blue" and 5 stars!

Tx.

Roadrunner

  • Sr. Member
  • ****
  • Posts: 373
I like this new possibities to easily change small things in a skin (I wouldn't be able to change a whole skin...)!

In the meantime, skins became better organized with subfolders. I think it should be possible too, to refer depencies in other subfolder. For example <root dependsOn="\subfolder\skinname"> should reference to the "skinname" in the "subfolder" of the skin directory.

Background for this wish is, that I'd like to create a "MyFavorite" subfolder containing all my small changes, without having to fear loosing them during the next update...

With the same technic one could store a dependent skin with no changes to the original skin, just to keep my favorits all together. Even more, in a future step, the program could handle this for me automatically by implementing a new menu option ::)

Roadrunner

  • Sr. Member
  • ****
  • Posts: 373
As I realized just now, "dependsOn" works only on plain text skins with extention ".xml". Is it intentional that I cannot refer to a binary one with extention ".xmlc" or could this made possible too?