patch for src/playlist/view...

Thomas Lübking thomas.luebking at web.de
Mon Jan 12 15:35:46 UTC 2009


Hi Nikolaj.

The attached patch
---
1) fixes a bug with right aligned "display:block" elements (they were globally 
aligned instead inside the block)

2) extends "size" interpretation: (see updated demo layout)
0.0: autosize (display:inline)
( 0.0, 1.0 ]: row percentage width (display:block, as originally)
( 1.0, +inf ): absolute width (in "em", i.e. char width) this is eg. helpful 
to align track numbers
( -inf, -1.0 ); [ -1.0, 0.0 ): absolute and percentual limited inline display 
(that is: the text is written as for "0.0", but never covers more than the 
given limit)

More ideas:
---
= personally i don't mind, but maybe the "size" attribute should rather be 
"width" (as size is usually used for e.g. font sizing etc.) leading to:

= what about more text attributes, like:
- other weights (light, black)
- other signs (italic, (small) caps, maybe underline)
- font sizes (maybe just per row?)
- text opacity (so you can e.g. have light tracklength etc.)

= regarding storage:
imho the layouts should be stored in separate xml files, this will
- allow to use incremental storage (i.e. some system defaults and stuff in the 
local user dir)
- thus make it easy to add a button "EditLayout.Pro", opening a texteditor 
with (a userlocal copy of) the layout xml (maybe together alongside a 
textbrowser showing possible nodes and attribs)
- and (especially ;-) prevent /one/ invalid layout (open tag etc.) from 
breaking /all/ others...

= the editor for "the unskilled":
what about a simple xine pp-chain like "editor", i.e.:
- you get a button "new row" -> adds e.g. a (toggable? using comments in the 
xml structure) groupbox
- inside the group, you have 2 buttons:
* "add element" -> adds a (focussable) hbox
* "remove element" -> removes the focused element...
- the hbox includes:
[prefix lineedit][item combo][suffix lineedit][width spinner][alignment combo]
[font sign checkboxes]

together with a global lineedit for the name and a close button this may not 
be as "nifty" as some dnd "editor", but efficient and passes detaild control 
to the user (i'm still wainting for a WYSIWYG html editor to compete 
kwrite/qwebdev...) without requiring him to know anything about xml and 
autoshows supported attributes/values

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok/attachments/20090112/aec12a74/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amarok_demo.xml
Type: application/xml
Size: 1183 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/amarok/attachments/20090112/aec12a74/attachment.wsdl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: src_playlist_view_listview.diff
Type: text/x-patch
Size: 2939 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/amarok/attachments/20090112/aec12a74/attachment.diff>


More information about the Amarok mailing list