[Roam-commit] SF.net SVN: roam: [74] Trunk/Source
Status: Alpha
Brought to you by:
jonfroehlich
|
From: <jon...@us...> - 2007-04-12 07:28:44
|
Revision: 74
http://roam.svn.sourceforge.net/roam/?rev=74&view=rev
Author: jonfroehlich
Date: 2007-04-12 00:28:43 -0700 (Thu, 12 Apr 2007)
Log Message:
-----------
1. exposed BackFill in SmartListBox
2. added one more additional pixel padding for between image and text in ImageItem
Modified Paths:
--------------
Trunk/Source/Roam.Test/Roam.Test.csproj
Trunk/Source/Roam.UI/Controls/SmartListBox.cs
Trunk/Source/Roam.UI/Drawing/ImageItem.cs
Trunk/Source/Roam.UI/Roam.UI.csproj
Trunk/Source/Roam.suo
Modified: Trunk/Source/Roam.Test/Roam.Test.csproj
===================================================================
--- Trunk/Source/Roam.Test/Roam.Test.csproj 2007-04-11 14:56:25 UTC (rev 73)
+++ Trunk/Source/Roam.Test/Roam.Test.csproj 2007-04-12 07:28:43 UTC (rev 74)
@@ -73,6 +73,12 @@
<Compile Include="Media\SoundLoopPlayerTest.Designer.cs">
<DependentUpon>SoundLoopPlayerTest.cs</DependentUpon>
</Compile>
+ <Compile Include="Sandbox\Camera.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="Sandbox\Camera.Designer.cs">
+ <DependentUpon>Camera.cs</DependentUpon>
+ </Compile>
<Compile Include="Sandbox\ColorsTest.cs">
<SubType>Form</SubType>
</Compile>
@@ -349,6 +355,12 @@
<DependentUpon>GradientFillTest.cs</DependentUpon>
</Compile>
<Compile Include="Sandbox\Gradient\Win32Helper.cs" />
+ <Compile Include="Sandbox\ImageMap.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="Sandbox\ImageMap.Designer.cs">
+ <DependentUpon>ImageMap.cs</DependentUpon>
+ </Compile>
<Compile Include="Sandbox\MonthCalendarTest.cs">
<SubType>Form</SubType>
</Compile>
Modified: Trunk/Source/Roam.UI/Controls/SmartListBox.cs
===================================================================
--- Trunk/Source/Roam.UI/Controls/SmartListBox.cs 2007-04-11 14:56:25 UTC (rev 73)
+++ Trunk/Source/Roam.UI/Controls/SmartListBox.cs 2007-04-12 07:28:43 UTC (rev 74)
@@ -176,6 +176,25 @@
}
}
}
+
+ public virtual Fill BackFill
+ {
+ get { return _backFill; }
+ set
+ {
+ if (value == null)
+ {
+ throw new ArgumentNullException("BackFill", "BackFill cannot be null");
+ }
+
+ if (!_backFill.Equals(value))
+ {
+ _backFill = value;
+ this.Invalidate();
+ }
+ }
+ }
+
/// <summary>
/// Gets or sets the highlighted back color
/// </summary>
Modified: Trunk/Source/Roam.UI/Drawing/ImageItem.cs
===================================================================
--- Trunk/Source/Roam.UI/Drawing/ImageItem.cs 2007-04-11 14:56:25 UTC (rev 73)
+++ Trunk/Source/Roam.UI/Drawing/ImageItem.cs 2007-04-12 07:28:43 UTC (rev 74)
@@ -30,8 +30,8 @@
public abstract class ImageItem : VisualItem
{
#region Private Fields
- private int _vSpacing = 2;
- private int _hSpacing = 2;
+ private int _vPadding = 2;
+ private int _hPadding = 3;
private ScaleMode _scaleMode = ScaleMode.None;
private RelativeAlignment _textAlign = RelativeAlignment.Right;
private ContentAlignment _imageAlign = ContentAlignment.TopCenter;
@@ -118,13 +118,13 @@
int width = 0, height = 0;
if (_textAlign == RelativeAlignment.Left || _textAlign == RelativeAlignment.Right)
{
- int horizSpaceBetweenImageAndText = (Label == null || Label.Length <= 0) ? 0 : _hSpacing;
+ int horizSpaceBetweenImageAndText = (Label == null || Label.Length <= 0) ? 0 : _hPadding;
width = (int)Math.Ceiling(textBounds.Width + horizSpaceBetweenImageAndText + ImageWidth);
height = (int)Math.Max(textBounds.Height, ImageHeight);
}
else if (_textAlign == RelativeAlignment.Above || _textAlign == RelativeAlignment.Below)
{
- int vertSpaceBetweenImageAndText = (Label == null || Label.Length <= 0) ? 0 : _vSpacing;
+ int vertSpaceBetweenImageAndText = (Label == null || Label.Length <= 0) ? 0 : _vPadding;
width = (int)Math.Max(textBounds.Width, ImageWidth);
height = (int)Math.Ceiling(textBounds.Height + vertSpaceBetweenImageAndText + ImageHeight);
}
@@ -188,12 +188,12 @@
if (TextAlign == RelativeAlignment.Right)
{
xImage = rectangle.X + xOffset + (int)prefixBounds.Width;
- xLabel = xImage + _hSpacing + ImageWidth;
+ xLabel = xImage + _hPadding + ImageWidth;
}
else if (TextAlign == RelativeAlignment.Left)
{
xLabel = rectangle.X + xOffset + (int)prefixBounds.Width;
- xImage = xLabel + _hSpacing + (int)labelBounds.Width;
+ xImage = xLabel + _hPadding + (int)labelBounds.Width;
}
}
else if (TextAlign == RelativeAlignment.Above || TextAlign == RelativeAlignment.Below)
@@ -230,11 +230,11 @@
if (TextAlign == RelativeAlignment.Below)
{
yImage = rectangle.Y + yOffset;
- yLabel = rectangle.Y + _vSpacing + ImageHeight;
+ yLabel = rectangle.Y + _vPadding + ImageHeight;
}
else if (TextAlign == RelativeAlignment.Above)
{
- yImage = (int)(rectangle.Y + _vSpacing + textBounds.Height);
+ yImage = (int)(rectangle.Y + _vPadding + textBounds.Height);
yLabel = rectangle.Y + yOffset;
}
}
Modified: Trunk/Source/Roam.UI/Roam.UI.csproj
===================================================================
--- Trunk/Source/Roam.UI/Roam.UI.csproj 2007-04-11 14:56:25 UTC (rev 73)
+++ Trunk/Source/Roam.UI/Roam.UI.csproj 2007-04-12 07:28:43 UTC (rev 74)
@@ -121,12 +121,6 @@
<Compile Include="Controls\ImageListBox.Designer.cs">
<DependentUpon>ImageListBox.cs</DependentUpon>
</Compile>
- <Compile Include="Controls\ImageMap.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="Controls\ImageMap.Designer.cs">
- <DependentUpon>ImageMap.cs</DependentUpon>
- </Compile>
<Compile Include="Controls\KeyFilteredListBox.cs">
<SubType>Component</SubType>
</Compile>
Modified: Trunk/Source/Roam.suo
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|