getmusicbee.com

General => MusicBee Wishlist => Topic started by: carloscs on February 22, 2011, 10:12:16 PM

Title: Dependent skins
Post by: carloscs on February 22, 2011, 10:12:16 PM
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 :)
Title: Re: Dependent skins
Post by: Rotem K. on February 23, 2011, 06:26:48 AM
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.

 
Title: Re: Dependent skins
Post by: Steven on February 23, 2011, 06:29:53 AM
its actually quite easy to implement and a very good idea so i will do it soon
Title: Re: Dependent skins
Post by: Rotem K. on February 23, 2011, 06:36:58 AM
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>
Title: Re: Dependent skins
Post by: VX on February 23, 2011, 08:18:43 AM
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.
Title: Re: Dependent skins
Post by: carloscs on February 23, 2011, 05:22:26 PM
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.
Title: Re: Dependent skins
Post by: VX on February 23, 2011, 05:36:11 PM
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.
Title: Re: Dependent skins
Post by: Steven on February 23, 2011, 10:25:49 PM
done as described by carloscs in the first post
http://www.mediafire.com/?eqsm81qp1e6em5r
Title: Re: Dependent skins
Post by: carloscs on February 23, 2011, 11:53:21 PM
Works good. Just tried "Pop Pink Darker" and "Pop Blue" and 5 stars!

Tx.
Title: Re: Dependent skins
Post by: Roadrunner on April 04, 2011, 05:57:24 PM
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 ::)
Title: Re: Dependent skins
Post by: Roadrunner on October 20, 2012, 05:42:36 PM
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?