←  [EN] Third-Party Development

Forums

»

New skin features

MiLo's Photo MiLo 18 Nov 2011

Note that skins in PLi can now use panels and alignment like windows programs, which saves you a lot of calculating and trial and error. For example, to create a button bar, the following will do:

<screen...>
  <panel position="top" size="*,40">
	<widget position="left" size="140,*" name=...></widget>
	<widget position="left" size="140,*" name=...></widget>
	<widget position="fill" name=...></widget>
  </panel>
...
</screen>

It's still in the process of being developed, the Magic skin has some screens built up this way (e.g. MovieSelection) which makes the screens resizable even. I'm also planning on adding support for font measurements, which will boil down to being able to let the user chose font sizes which are pleasant to read on his screen, and the skin will automatically adapt. You could then use the same skin for resolutions ranging from 1024x756 to 1920x1080, with or without overscan.
Quote

Meega's Photo Meega 20 Nov 2011

Don't no if this is possible,but i'm using the Pli-hd skin and want to change for example the screen which inform me about starting a record.
Now the message screen fill up the hole tv screen but i want to see only a small box with the message that a record is started.

How do i change that?
Quote

littlesat's Photo littlesat 20 Nov 2011

Just remove the screen for MessageBox out of the skin.xml.

It would be nice to have skin options were you can select between te standaard screen and the screen overruled by the skin. So the user can choose what "pain" screen he/she wants...
Edited by littlesat, 20 November 2011 - 11:33.
Quote

Bag58's Photo Bag58 20 Nov 2011

Be aware that such a change to the active skin.xml most likely will be lost in the next online update. If you want a permanent change to a skin, you need to make a file user_skin.xml, which you put in /etc/enigma2. That file should contain the version of the screen you want to replace the original version in the skin. Because of its location, user_skin will be in the Autobackup. Also it will not be overwritten in an online update.
Quote

Meega's Photo Meega 20 Nov 2011

I think i understand how it works ,correct me if i'm wrong.

You have a skin.xml in /usr/share/enigma2 which is the original skin.
Then you have a skin.xml in the map of your skin ,like /usr/share/enigma2/Pli-hd
Then you can alter or make a skin.xml in /etc/enigma2 which will overrule the things in the skin.xml of Pli-hd
But when the screen for MessageBox in the original one is the same as in the one i'm altering at nothing will change?
There are so much skin.xml 's and other xml 's that i can't see the tree's through the forrest. :D

I'm just trying to understand!! :blink:
Quote

Bag58's Photo Bag58 20 Nov 2011

You're almost there. One thing though: the file in /etc/enigma2 should be named user_skin.xml. It only needs to contain the screens you want to change of the active skin. So there only the parts that are in user_skin.xml are being replaced from your active skin. The other screens in your active skin remain as they are. User_skin.xml only partially overrides the active skin.xml.
Quote

Meega's Photo Meega 20 Nov 2011

Oké thanks i will try out some things.
Quote

Bag58's Photo Bag58 20 Nov 2011

Just do a search for user_skin.xml on the forum. You will find a large number of examples.
Quote

Meega's Photo Meega 20 Nov 2011

Could you help me with one thing so i'm a littlebit understanding of what i'm doing?

The screen under the bluebutton (in Pli-hd) comes with a little tv at the left side. same as the messagebox screen in the post above.
I want it to come up as a list of plugins only and not overall the screen of my tv.
Now i want to change this in the user_skin.xml but i have no idea of where to start .

Maby just maby you want to write a piece of code to add to the user_skin.xml including wide and height of the screen for me to change ,so i can see what's happening?

Thanks for your time. :rolleyes:
Quote

Bag58's Photo Bag58 20 Nov 2011

First of all I have so far not looked at the Pli-HD skin at all. The skin I use is Magic-HD. In that skin, most of the screens use the whole surface with a standard top part holding the screen name and the time and date, a bottom part with a logo and the active color key buttons and names and finally in most of the screens a mini-TV screen in the top left part of the screen. From what I have been reading about Pli-HD, this is started from the Magic-HD skin.

I think the screen you are talking about is the PluginBrowser screen. In Magic-HD this screen also takes the whole surface, with all of the standard parts I mentioned above. To limit that screen to a window in the order of half of the screen (both height and width) means dropping all those standard screen parts.

Such a smaller sized screen is still called a screen in the skin, and you will have to indicate for that screen where on the surface it must be located through the position= clause, and how large it must be by the size= clause. Also you will have to make sure that each of the components you wish to display in the screen has a relative position (within the window) and size which makes it fit inside the window. To enable you to do that, each of the components has its own position= and size= clause.

In the attached example skin_user.xml for the screen PluginBrowser I have dropped all the standard screen components, and just added the color buttons at the bottom of the window. Attached the example skin_user.xml file. To see what it looks like, just put it in the /etc/enigma2 directory, and restart enigma.

Attached Files

Quote

Meega's Photo Meega 20 Nov 2011

This is exactly what i mean ,now I can experiment.

Many thanks and thank you for your time.
Quote

Bag58's Photo Bag58 20 Nov 2011

@Milo
Is it possible to use panel definitions in the active skin.xml also in a user_skin.xml? I mean of course without defining them again in the user_skin.xml.
Let me give an example, just to make sure my question is clear.

Suppose I have installed the PLi-HD skin, and set that as active skin.
In that skin the screen ButtonTemplate_4 is defined. That screen is used in several other screen by invoking it as a panel. Can I now re-use that screen also as a panel in the screens I put in user_skin.xml, without redefining the screen ButtonTemplate_4 in skin_user.xml?
Edited by Bag58, 20 November 2011 - 21:44.
Quote

littlesat's Photo littlesat 21 Nov 2011

In the user skin you can indeed use them... I say... just try!!!
Quote

MiLo's Photo MiLo 21 Nov 2011

In that skin the screen ButtonTemplate_4 is defined. That screen is used in several other screen by invoking it as a panel. Can I now re-use that screen also as a panel in the screens I put in user_skin.xml, without redefining the screen ButtonTemplate_4 in skin_user.xml?


Yes.

(Even better - you override it both ways. If you define a ButtonTemplate_4 in skin_user.xml, it will overwrite the one in the skin for all screens. Any template defined in any other skin.xml can be used by any other screen elsewhere. There is no order defined, you can use a template before it has been defined.)
Quote

Pedro_Newbie's Photo Pedro_Newbie 21 Nov 2011

..you can use a template before it has been defined.


Woww... Time travelling!
Quote