-# $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")
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