[cheese/three-point-oh] Added a translucent black background to the effect names to make them easier to read
- From: Yuvaraj Pandian <yuvipanda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/three-point-oh] Added a translucent black background to the effect names to make them easier to read
- Date: Fri, 16 Jul 2010 20:22:26 +0000 (UTC)
commit d26d7b8e32d090c4ff9bd4f829bf93cd9ec46686
Author: Yuvaraj Pandian T <yuvipanda gmail com>
Date: Sat Jul 17 01:52:03 2010 +0530
Added a translucent black background to the effect names to make them easier to read
src/cheese-window.vala | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index a727624..9628539 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -748,8 +748,12 @@ public class Cheese.MainWindow : Gtk.Window
Clutter.Texture texture = new Clutter.Texture ();
Clutter.BinLayout layout = new Clutter.BinLayout (Clutter.BinAlignment.FILL,
Clutter.BinAlignment.FILL);
- Clutter.Box box = new Clutter.Box (layout);
- Clutter.Text text = new Clutter.Text ();
+ Clutter.Box box = new Clutter.Box (layout);
+ Clutter.Text text = new Clutter.Text ();
+ Clutter.Rectangle rect = new Clutter.Rectangle ();
+
+ rect.opacity = 128;
+ rect.color = Clutter.Color.from_string ("black");
box.width = 160;
box.height = 120;
@@ -766,6 +770,13 @@ public class Cheese.MainWindow : Gtk.Window
text.text = effect.name;
text.color = Clutter.Color.from_string ("white");
+
+ rect.height = text.height + 5;
+ box.pack ((Clutter.Actor)rect,
+ "x-align", Clutter.BinAlignment.FILL,
+ "y-align", Clutter.BinAlignment.END, null
+ );
+
box.pack ((Clutter.Actor)text,
"x-align", Clutter.BinAlignment.CENTER,
"y-align", Clutter.BinAlignment.END, null
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]