X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=bin%2Fembrace;h=eae0994566e2b54c2ca6a499816c95c77b4bcd0b;hb=8a27016f8a87a13b22cda3f405d28684917dc3f3;hp=4e5b64ebf3cbac0097ccb61b9c1af74a686c0007;hpb=14d1460090aee21970fe84463764b4f9573f8122;p=embrace.git diff --git a/bin/embrace b/bin/embrace index 4e5b64e..eae0994 100755 --- a/bin/embrace +++ b/bin/embrace @@ -121,6 +121,7 @@ module Embrace @objects = [@img, @label] @objects.each { |o| add_member(o) } + set_color(255, 255, 255, 0) @img.set_color(255, 255, 255, 0) @label.set_color(255, 0, 0, 0) @@ -137,7 +138,7 @@ module Embrace def smart_show @objects.each { |o| o.show } - @alpha_anim ||= AlphaAnimator.new(2, @img, @label) + @alpha_anim ||= AlphaAnimator.new(2, self) @alpha_anim.on_finished { @alpha_anim = nil } end @@ -166,6 +167,10 @@ module Embrace def smart_resize(w, h) @img.resize(w, h) end + + def smart_color_set(r, g, b, a) + @objects.each { |o| o.alpha = a } + end end class Container < Evas::Smart @@ -177,7 +182,7 @@ module Embrace super @bg = Evas::Rectangle.new(evas) - @bg.set_color(0, 0, 0, 255) + @bg.set_color(0, 0, 0, 8) add_member(@bg) @@ -295,6 +300,7 @@ module Embrace def initialize super + self.has_alpha = true self.title = "Embrace" self.borderless = true