banshee r3875 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Widgets
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3875 - in trunk/banshee: . src/Libraries/Hyena.Gui/Hyena.Widgets
- Date: Mon, 5 May 2008 05:02:33 +0100 (BST)
Author: abock
Date: Mon May 5 04:02:32 2008
New Revision: 3875
URL: http://svn.gnome.org/viewvc/banshee?rev=3875&view=rev
Log:
2008-05-05 Aaron Bockover <abock gnome org>
* src/Libraries/Hyena.Gui/Hyena.Widgets/SegmentedBar.cs: Minor fixes
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/SegmentedBar.cs
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/SegmentedBar.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/SegmentedBar.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/SegmentedBar.cs Mon May 5 04:02:32 2008
@@ -91,7 +91,7 @@
protected override void OnSizeAllocated (Gdk.Rectangle allocation)
{
- HeightRequest = bar_height * 2;
+ HeightRequest = (int)Math.Ceiling (bar_height * 1.75);
base.OnSizeAllocated (allocation);
}
@@ -158,8 +158,7 @@
LinearGradient mask = new LinearGradient (0, 0, 0, bar_height);
- mask.AddColorStop (0, new Color (0, 0, 0, 0));
- mask.AddColorStop (0.25, new Color (0, 0, 0, 0.01));
+ mask.AddColorStop (0.25, new Color (0, 0, 0, 0));
mask.AddColorStop (0.5, new Color (0, 0, 0, 0.125));
mask.AddColorStop (0.75, new Color (0, 0, 0, 0.4));
mask.AddColorStop (1.0, new Color (0, 0, 0, 0.7));
@@ -241,7 +240,7 @@
double seg_w = 20;
double x = seg_w > r ? seg_w : r;
- while (x < w - r) {
+ while (x <= w - r) {
cr.MoveTo (x - 0.5, 1);
cr.LineTo (x - 0.5, h - 1);
cr.Pattern = seg_sep_light;
@@ -281,7 +280,7 @@
private VBox box;
public SegmentedBarTestModule () : base ("Segmented Bar")
{
- BorderWidth = 30;
+ BorderWidth = 10;
SetDefaultSize (500, -1);
box = new VBox ();
@@ -292,12 +291,9 @@
bar.AddSegmentRgb ("Audio", 0.20, 0x3465a4);
bar.AddSegmentRgb ("Video", 0.55, 0x73d216);
bar.AddSegmentRgb ("Other", 0.10, 0xf57900);
- box.PackStart (bar, false, false, 0);
- box.PackStart (new HSeparator (), false, false, 0);
HBox controls = new HBox ();
controls.Spacing = 5;
- box.PackStart (controls, false, false, 0);
Label label = new Label ("Height:");
controls.PackStart (label, false, false, 0);
@@ -305,6 +301,9 @@
height.Changed += delegate { bar.BarHeight = height.ValueAsInt; };
controls.PackStart (height, false, false, 0);
+ box.PackStart (controls, false, false, 0);
+ box.PackStart (new HSeparator (), false, false, 0);
+ box.PackStart (bar, false, false, 0);
box.ShowAll ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]