banshee r4831 - in trunk/banshee: . src/Dap/Banshee.Dap.MassStorage/ThemeIcons/16x16/categories src/Dap/Banshee.Dap.MassStorage/ThemeIcons/22x22/categories src/Dap/Banshee.Dap/Banshee.Dap.Gui
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4831 - in trunk/banshee: . src/Dap/Banshee.Dap.MassStorage/ThemeIcons/16x16/categories src/Dap/Banshee.Dap.MassStorage/ThemeIcons/22x22/categories src/Dap/Banshee.Dap/Banshee.Dap.Gui
- Date: Mon, 10 Nov 2008 23:40:45 +0000 (UTC)
Author: abock
Date: Mon Nov 10 23:40:44 2008
New Revision: 4831
URL: http://svn.gnome.org/viewvc/banshee?rev=4831&view=rev
Log:
* banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapPropertiesDisplay.cs:
Extend Gtk.Alignment and render the frame manually so content can be
centered
* banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs: Reworked
content layout to be more visually appealing and space optimizing
* banshee/src/Dap/Banshee.Dap.MassStorage/ThemeIcons/16x16/categories/amazon-mp3-source.png:
* banshee/src/Dap/Banshee.Dap.MassStorage/ThemeIcons/22x22/categories/amazon-mp3-source.png:
Super hot new store icon from jimmac
Added:
trunk/banshee/src/Dap/Banshee.Dap.MassStorage/ThemeIcons/16x16/categories/
trunk/banshee/src/Dap/Banshee.Dap.MassStorage/ThemeIcons/16x16/categories/amazon-mp3-source.png (contents, props changed)
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Dap/Banshee.Dap.MassStorage/ThemeIcons/22x22/categories/amazon-mp3-source.png
trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs
trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapPropertiesDisplay.cs
Added: trunk/banshee/src/Dap/Banshee.Dap.MassStorage/ThemeIcons/16x16/categories/amazon-mp3-source.png
==============================================================================
Binary file. No diff available.
Modified: trunk/banshee/src/Dap/Banshee.Dap.MassStorage/ThemeIcons/22x22/categories/amazon-mp3-source.png
==============================================================================
Binary files. No diff available.
Modified: trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs
==============================================================================
--- trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs (original)
+++ trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapContent.cs Mon Nov 10 23:40:44 2008
@@ -42,8 +42,7 @@
public class DapContent : DapPropertiesDisplay
{
private DapSource dap;
-
- private VBox vbox;
+
//private WrapLabel dap_stats;
// Ugh, this is to avoid the GLib.MissingIntPtrCtorException seen by some; BGO #552169
@@ -60,29 +59,34 @@
private void BuildWidgets ()
{
- vbox = new VBox ();
- Add (vbox);
-
- HBox header_box = new HBox ();
- header_box.PackStart (new Image (LargeIcon), false, false, 0);
+ HBox split_box = new HBox ();
+ VBox content_box = new VBox ();
+
+ content_box.BorderWidth = 5;
Label title = new Label ();
title.Markup = String.Format ("<span size=\"x-large\" weight=\"bold\">{0}</span>", dap.Name);
- title.Xalign = 0f;
- header_box.PackStart (title, false, false, 0);
+ title.Xalign = 0.0f;
- vbox.PackStart (header_box, false, false, 0);
+ Banshee.Preferences.Gui.NotebookPage properties = new Banshee.Preferences.Gui.NotebookPage (dap.Preferences);
+ properties.BorderWidth = 0;
+
+ content_box.PackStart (title, false, false, 0);
+ content_box.PackStart (properties, false, false, 0);
+
+ Image image = new Image (LargeIcon);
+ image.Yalign = 0.0f;
+
+ split_box.PackStart (image, false, true, 0);
+ split_box.PackEnd (content_box, true, true, 0);
+
+ Add (split_box);
+ ShowAll ();
- vbox.PackStart (new Banshee.Preferences.Gui.NotebookPage (dap.Preferences), false, false, 0);
-
- //vbox.PackStart (new HSeparator (), false, false, 0);
-
/*dap_stats = new WrapLabel ();
dap.Sync.Updated += delegate { Banshee.Base.ThreadAssist.ProxyToMain (UpdateStatus); };
dap_stats.Text = dap.Sync.ToString ();
vbox.PackStart (dap_stats, false, false, 0);*/
-
- ShowAll ();
}
/*private void UpdateStatus ()
Modified: trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapPropertiesDisplay.cs
==============================================================================
--- trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapPropertiesDisplay.cs (original)
+++ trunk/banshee/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapPropertiesDisplay.cs Mon Nov 10 23:40:44 2008
@@ -40,12 +40,15 @@
using Hyena;
using Hyena.Widgets;
+using Hyena.Gui.Theming;
namespace Banshee.Dap.Gui
{
- public class DapPropertiesDisplay : RoundedFrame, ISourceContents
+
+ public class DapPropertiesDisplay : Alignment, ISourceContents
{
private DapSource source;
+ private Theme theme;
private Gdk.Pixbuf large_icon;
public Gdk.Pixbuf LargeIcon {
@@ -62,11 +65,45 @@
{
}
- public DapPropertiesDisplay (DapSource source)
+ public DapPropertiesDisplay (DapSource source) : base (0.5f, 0.35f, 0.0f, 0.0f)
{
+ AppPaintable = true;
this.source = source;
}
+ protected override void OnRealized ()
+ {
+ base.OnRealized ();
+ theme = new GtkTheme (this);
+ }
+
+ protected override bool OnExposeEvent (Gdk.EventExpose evnt)
+ {
+ Cairo.Context cr = Gdk.CairoHelper.Create (evnt.Window);
+
+ try {
+ DrawFrame (cr, evnt.Area);
+ return base.OnExposeEvent (evnt);
+ } finally {
+ ((IDisposable)cr).Dispose ();
+ }
+ }
+
+ private void DrawFrame (Cairo.Context cr, Gdk.Rectangle clip)
+ {
+ Gdk.Rectangle rect = new Gdk.Rectangle (Allocation.X, Allocation.Y,
+ Allocation.Width, Allocation.Height);
+ theme.Context.ShowStroke = true;
+ theme.DrawFrameBackground (cr, rect, true);
+ theme.DrawFrameBorder (cr, rect);
+ }
+
+ protected override void OnSizeAllocated (Gdk.Rectangle allocation)
+ {
+ base.OnSizeAllocated (allocation);
+ QueueDraw ();
+ }
+
/*private void BuildPropertyTable ()
{
MessagePane pane = new MessagePane ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]