Added 'add', 'remove', 'sel', 'misc' buttons to playlist.
authorTilman Sauerbeck <tilman@code-monkey.de>
Sat, 7 May 2005 16:16:28 +0000 (16:16 +0000)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sat, 7 May 2005 16:16:28 +0000 (16:16 +0000)
13 files changed:
images/button-pl-add-down.png [new file with mode: 0644]
images/button-pl-add-hover.png [new file with mode: 0644]
images/button-pl-add-normal.png [new file with mode: 0644]
images/button-pl-misc-down.png [new file with mode: 0644]
images/button-pl-misc-hover.png [new file with mode: 0644]
images/button-pl-misc-normal.png [new file with mode: 0644]
images/button-pl-rem-down.png [new file with mode: 0644]
images/button-pl-rem-hover.png [new file with mode: 0644]
images/button-pl-rem-normal.png [new file with mode: 0644]
images/button-pl-sel-down.png [new file with mode: 0644]
images/button-pl-sel-hover.png [new file with mode: 0644]
images/button-pl-sel-normal.png [new file with mode: 0644]
src/playlist-buttons.rb

diff --git a/images/button-pl-add-down.png b/images/button-pl-add-down.png
new file mode 100644 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
index 0000000..0a529df
Binary files /dev/null and b/images/button-pl-sel-normal.png differ
index 34b78c2a37d9d7422f479222d118a8a51f904159..548f2763b89fe7cf4f4681792678cdd72f5a2532 100644 (file)
@@ -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