These parameters will allow to create a slider which adapts to the display.
width/height parameters will be optional. If set, the initial slider will
be resized to meet these requirements.
A main use case will be the possibility to create a fullscreen timeslider
that automatically spans the whole screen whatever the screen resolution.
e.g syntax would be <Slider width="100%" ....>
Up to now, text control could but be focusable, and this focus was used
to scroll text, should it be too long for full display.
From a user viewpoint, this behavior is often counterintuitive :
- Most of the time, the control is designed to fit the text anyway, and
scrolling is not expected.
- On the other hand, an underlying control may be used to move the window
(for instance, the title bar), and a text control is expected not to
interact in this endeavor. Same goes for popupmenu, that is expected
to work if one happens to right-click on a text control.
This patch adds a 'focus' attribute to the text control, and leave it to the
skins developper to decide which behavior is most desirable on a per-control
basis. focus still defaults to true to maintain skins current behavior.
The default skins now benefits from relative positioning:
- main window centered
- playlist window centered with a 5% offset
- fullscreen controller centered at the bottom
of the screen with a 3% margin from the border
- other ancillary windows all centered
So far in skins2, all x, y, width and height were given in pixels, and
no reference to the screen resolution could be made.
This patch implements the following :
- all x, y, width, height can be given in pixels or in % of their container.
For windows, the container is the screen. For widgets, it can be the
layout or a panel.
- Five new tags eases up positioning
- position : relative position given as "Center", "West", "NorthWest", ...
- x/y-margin : margins to take into account (in px or %) wrt the borders.
- x/y-offset : additional offset to apply (in px or %).
- the image control can now accept a width and a height parameters.
Fix two text controls overlapping by 1 pixel in length.
Though it's no real problem, that avoids unnecessary refresh for zilch.
(one control is the position that keeps being updated)
This patch implements art display in the default skin, in the same way as it is
implemented in qt4 interface, namely if no video is available, art is displayed in lieu of video.
This patch gives skins developpers the possibility to display the art file
associated to the current input in an image control.
It features the following :
- a new 'art' boolean parameter is added for the Image control (skin.dtd)
- when set to true, the skin engine will reuse this control to display
the current art file
- in addition to 'scale' and 'mosaic', the resize parameter can now accept
a new 'scale2' value, that respects the original aspect ratio of art files
It adds possibility to store IDs for Anchors, Panels and Groups.
This does not change the way skins2 works I believe. It just stops the
XML parser from complaining about non standard skins when they have set
IDs for those elements. And setting IDs for them is vital in the skin
editor, as it differentiates between different elements in the skin just
by their ID.
- New Panel tag, allowing to group the resizing behaviour of controls
- Documentation updated accordingly
- Fixed a memory leak due to CtrlMove/CtrlResize objects
controls. When set to "true", the behaviour of the resizing is changed
(cf. documentation). The main use for these attributes is to keep a
a control centered in the layout (horizontally, vertically or both) without
resizing the control.
- anchors have a new "lefttop" attribute, allowing them to follow the
border of the window when resizing
- the resizing is now handled by the WindowManager class (to enforce the
mediator pattern). This makes it possible to handle tricky cases,
such as:
window B is anchored to window A, and A is resized
==> B moves accordingly, and can still be anchored by other windows
with id "pledit" (defined in the new tag "<IniFile>" contains:
[Text]
Normal=#FFFFFF
it will create a constant "pledit.Text.Normal" with value "#FFFFFF"
* winamp2.xml: use the "pledit.txt" file to have correct playlist colors
is it ok to backport in 0.8.5 ?
XML example:
<PopupMenu id="sample_menu">
<MenuItem label="Play" action="vlc.play()" />
<MenuItem label="Pause" action="vlc.pause()" />
<MenuSeparator />
<MenuItem label="Show playlist" action="playlist_window.show()" />
<MenuItem label="Hide playlist" action="playlist_window.hide()" />
<MenuSeparator />
<MenuItem label="Quick open file" action="dialogs.fileSimple()" />
</PopupMenu>
To call the menu:
<Button action="sample_menu.show()" ... />
Known bug: the popup disappears when the user clicks "too fast" on the
button: the control refreshes itself in an asynchronous way, and the popup
dislikes it... so click slowly :)
"nbFrames" and "fps" in the (Sub)Bitmap elements to set the number
of frames and the frame rate in a bitmap. As in the radialslider,
the different frames are just laid vertically in the bitamp (and
all the frames must have the same size)
At the moment animated bitmaps are only supported in Button controls.