[f-spot] Make background color darker in main window.
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot] Make background color darker in main window.
- Date: Thu, 24 Jun 2010 18:41:14 +0000 (UTC)
commit e1aa30a43c131f6fc9f2e0884f515f614d28a575
Author: Anton Keks <anton azib net>
Date: Mon Feb 16 23:57:44 2009 +0200
Make background color darker in main window.
White background (most themes) is distracting for most photos.
It also gives f-spot a more "professional look.
src/PhotoView.cs | 8 ++++++++
src/Widgets/Filmstrip.cs | 9 ++++++---
src/Widgets/IconView.cs | 3 +--
3 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/src/PhotoView.cs b/src/PhotoView.cs
index fdbebdc..4b27991 100644
--- a/src/PhotoView.cs
+++ b/src/PhotoView.cs
@@ -389,6 +389,14 @@ namespace FSpot {
GtkUtil.ModifyColors (background);
GtkUtil.ModifyColors (photo_view_scrolled);
GtkUtil.ModifyColors (rating);
+
+ Gdk.Color dark = Style.Dark (Gtk.StateType.Normal);
+ filmstrip.ModifyBg (Gtk.StateType.Normal, dark);
+ tag_view.ModifyBg (Gtk.StateType.Normal, dark);
+ photo_view.ModifyBg (Gtk.StateType.Normal, dark);
+ background.ModifyBg (Gtk.StateType.Normal, dark);
+ photo_view_scrolled.ModifyBg (Gtk.StateType.Normal, dark);
+ rating.ModifyBg (Gtk.StateType.Normal, dark);
}
protected override void OnStyleSet (Style previous)
diff --git a/src/Widgets/Filmstrip.cs b/src/Widgets/Filmstrip.cs
index feba909..dbe6c0b 100644
--- a/src/Widgets/Filmstrip.cs
+++ b/src/Widgets/Filmstrip.cs
@@ -654,9 +654,8 @@ namespace FSpot.Widgets
return current;
Pixbuf highlight = new Pixbuf (Gdk.Colorspace.Rgb, true, 8, current.Width, current.Height);
- Gdk.Color color = Style.Background (StateType.Selected);
- uint ucol = (uint)((uint)color.Red / 256 << 24 ) + ((uint)color.Green / 256 << 16) + ((uint)color.Blue / 256 << 8) + 255;
- highlight.Fill (ucol);
+
+ highlight.Fill (ColorToInt (Style.Light (StateType.Selected)));
// Add a two pixel highlight around the thumbnail
current.CopyArea (2, 2, current.Width - 4, current.Height - 4, highlight, 2, 2);
@@ -664,6 +663,10 @@ namespace FSpot.Widgets
return highlight;
}
+ private static uint ColorToInt(Gdk.Color color) {
+ return (uint)((uint)color.Red / 256 << 24 ) + ((uint)color.Green / 256 << 16) + ((uint)color.Blue / 256 << 8) + 255;
+ }
+
~Filmstrip ()
{
Log.DebugFormat ("Finalizer called on {0}. Should be Disposed", GetType ());
diff --git a/src/Widgets/IconView.cs b/src/Widgets/IconView.cs
index 928038e..e2d49a9 100644
--- a/src/Widgets/IconView.cs
+++ b/src/Widgets/IconView.cs
@@ -1452,8 +1452,7 @@ namespace FSpot.Widgets
private void SetColors ()
{
if (IsRealized) {
- BinWindow.Background = Style.BaseColors [(int)State];
- GdkWindow.Background = Style.BaseColors [(int)State];
+ BinWindow.Background = Style.DarkColors [(int)State];
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]