[banshee/gtk3] InternetArchive: Update to the new GTK theming API
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/gtk3] InternetArchive: Update to the new GTK theming API
- Date: Thu, 21 Jul 2011 20:14:43 +0000 (UTC)
commit 6a30887c9ebdfe5ddc8a31779b64a2013738d473
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Thu Jul 21 21:57:46 2011 +0200
InternetArchive: Update to the new GTK theming API
.../Banshee.InternetArchive/DetailsView.cs | 20 +++++++++-----------
.../Banshee.InternetArchive/HomeView.cs | 4 ++--
2 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/DetailsView.cs b/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/DetailsView.cs
index 8f10ace..e1a3e0c 100644
--- a/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/DetailsView.cs
+++ b/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/DetailsView.cs
@@ -150,10 +150,10 @@ namespace Banshee.InternetArchive
this.SetStateFlags (StateFlags.Selected, true);
bool changing_style = false;
- StyleSet += (o, a) => {
+ StyleUpdated += (o, a) => {
if (!changing_style) {
changing_style = true;
- ModifyBg (StateType.Normal, Style.Background (StateType.Selected));
+ OverrideBackgroundColor (StateFlags.Normal, StyleContext.GetBackgroundColor (StateFlags.Selected));
changing_style = false;
}
};
@@ -214,9 +214,9 @@ namespace Banshee.InternetArchive
table.ValueRenderer.Scale = Pango.Scale.Medium;
// Keep the table from needing to vertically scroll
- table.Child.SizeRequested += (o, a) => {
+ /*table.Child.SizeRequested += (o, a) => {
table.SetSizeRequest (a.Requisition.Width, a.Requisition.Height);
- };
+ };*/
AddToTable (table, Catalog.GetString ("Creator:"), details.Creator);
AddToTable (table, Catalog.GetString ("Venue:"), details.Venue);
@@ -330,13 +330,11 @@ namespace Banshee.InternetArchive
frame.Child = sw;
frame.ShowAll ();
- sw.Child.ModifyBg (StateType.Normal, Style.Base (StateType.Normal));
- sw.Child.ModifyFg (StateType.Normal, Style.Text (StateType.Normal));
- sw.Child.ModifyText (StateType.Normal, Style.Text (StateType.Normal));
- StyleSet += delegate {
- sw.Child.ModifyBg (StateType.Normal, Style.Base (StateType.Normal));
- sw.Child.ModifyFg (StateType.Normal, Style.Text (StateType.Normal));
- sw.Child.ModifyText (StateType.Normal, Style.Text (StateType.Normal));
+ sw.Child.OverrideBackgroundColor (StateFlags.Normal, StyleContext.GetBackgroundColor (StateFlags.Normal));
+ sw.Child.OverrideColor (StateFlags.Normal, StyleContext.GetColor (StateFlags.Normal));
+ StyleUpdated += delegate {
+ sw.Child.OverrideBackgroundColor (StateFlags.Normal, StyleContext.GetBackgroundColor (StateFlags.Normal));
+ sw.Child.OverrideColor (StateFlags.Normal, StyleContext.GetColor (StateFlags.Normal));
};
PackStart (frame, true, true, 0);
diff --git a/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/HomeView.cs b/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/HomeView.cs
index a2edaa9..b8d7d11 100644
--- a/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/HomeView.cs
+++ b/src/Extensions/Banshee.InternetArchive/Banshee.InternetArchive/HomeView.cs
@@ -103,9 +103,9 @@ namespace Banshee.InternetArchive
source.Properties.Set<SearchEntry> ("Nereid.SearchEntry", entry);
// Make the search entry text nice and big
- var font = entry.InnerEntry.Style.FontDescription.Copy ();
+ var font = entry.InnerEntry.StyleContext.GetFont (StateFlags.Normal).Copy ();
font.Size = (int) (font.Size * Pango.Scale.XLarge);
- entry.InnerEntry.ModifyFont (font);
+ entry.InnerEntry.OverrideFont (font);
font.Dispose ();
var button = new Hyena.Widgets.ImageButton (Catalog.GetString ("_Go"), Stock.Find);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]