From: Tilman Sauerbeck Date: Sat, 7 May 2005 16:16:28 +0000 (+0000) Subject: Added 'add', 'remove', 'sel', 'misc' buttons to playlist. X-Git-Url: http://git.code-monkey.de/?p=multipass-eu.git;a=commitdiff_plain;h=8b3408a452c7d8e914d487dbe8139ae1a8fd488f Added 'add', 'remove', 'sel', 'misc' buttons to playlist. --- diff --git a/images/button-pl-add-down.png b/images/button-pl-add-down.png new file mode 100644 index 0000000..596e9b2 Binary files /dev/null and b/images/button-pl-add-down.png differ diff --git a/images/button-pl-add-hover.png b/images/button-pl-add-hover.png new file mode 100644 index 0000000..b4de583 Binary files /dev/null and b/images/button-pl-add-hover.png differ diff --git a/images/button-pl-add-normal.png b/images/button-pl-add-normal.png new file mode 100644 index 0000000..01e5018 Binary files /dev/null and b/images/button-pl-add-normal.png differ diff --git a/images/button-pl-misc-down.png b/images/button-pl-misc-down.png new file mode 100644 index 0000000..7904577 Binary files /dev/null and b/images/button-pl-misc-down.png differ diff --git a/images/button-pl-misc-hover.png b/images/button-pl-misc-hover.png new file mode 100644 index 0000000..c111d59 Binary files /dev/null and b/images/button-pl-misc-hover.png differ diff --git a/images/button-pl-misc-normal.png b/images/button-pl-misc-normal.png new file mode 100644 index 0000000..1ff86c9 Binary files /dev/null and b/images/button-pl-misc-normal.png differ diff --git a/images/button-pl-rem-down.png b/images/button-pl-rem-down.png new file mode 100644 index 0000000..1d4c295 Binary files /dev/null and b/images/button-pl-rem-down.png differ diff --git a/images/button-pl-rem-hover.png b/images/button-pl-rem-hover.png new file mode 100644 index 0000000..bd1438e Binary files /dev/null and b/images/button-pl-rem-hover.png differ diff --git a/images/button-pl-rem-normal.png b/images/button-pl-rem-normal.png new file mode 100644 index 0000000..2319e07 Binary files /dev/null and b/images/button-pl-rem-normal.png differ diff --git a/images/button-pl-sel-down.png b/images/button-pl-sel-down.png new file mode 100644 index 0000000..6686c89 Binary files /dev/null and b/images/button-pl-sel-down.png differ diff --git a/images/button-pl-sel-hover.png b/images/button-pl-sel-hover.png new file mode 100644 index 0000000..3f20e48 Binary files /dev/null and b/images/button-pl-sel-hover.png differ diff --git a/images/button-pl-sel-normal.png b/images/button-pl-sel-normal.png new file mode 100644 index 0000000..0a529df Binary files /dev/null and b/images/button-pl-sel-normal.png differ diff --git a/src/playlist-buttons.rb b/src/playlist-buttons.rb index 34b78c2..548f276 100644 --- a/src/playlist-buttons.rb +++ b/src/playlist-buttons.rb @@ -1,4 +1,4 @@ -# $Id: playlist-buttons.rb 7 2005-04-24 10:46:14Z tilman $ +# $Id: playlist-buttons.rb 22 2005-05-07 16:16:28Z tilman $ c = EDJE.collection("playlist") root = c.part("root") @@ -15,3 +15,39 @@ h.each do |name, (sig, (rel, x, y))| buttons << (sig.nil? ? Button : SignalButton).new(*args).part end + +c.part("playlist.buttons.top.clip", :rect) do |p| + p.description do |d| + d.rel[0].set_to(c.part("playlist.background.titlebar.left")) + d.rel[1].set_to(c.part("playlist.background.titlebar.right")) + end + + buttons.each { |b| b.clip = p } +end + +buttons.clear + +root = c.part("playlist.background.footer.left") + +h = {"playlist.button.add" => ["file_dialog.open", [5, 5]], + "playlist.button.rem" => [nil, [35, 5]], + "playlist.button.sel" => [nil, [65, 5]], + "playlist.button.misc" => [nil, [95, 5]]} +h.each do |name, (sig, (x, y))| + args = [c, name, root, nil, x, y] + args << sig unless sig.nil? + + md = name.match(/playlist.button\.(.*)$/) + args[3] = "button-pl-" + md.captures.first.gsub(".", "-") + + buttons << (sig.nil? ? Button : SignalButton).new(*args).part +end + +c.part("playlist.buttons.footer.clip", :rect) do |p| + p.description do |d| + d.rel[0].set_to(c.part("playlist.background.footer.left")) + d.rel[1].set_to(c.part("playlist.background.footer.right")) + end + + buttons.each { |b| b.clip = p } +end