Skip to content

Commit

Permalink
fix filename labels invisibility on OSX (#23, chapter 1)
Browse files Browse the repository at this point in the history
  • Loading branch information
atauenis committed Aug 6, 2014
1 parent ad3ee87 commit 56a2052
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pluginner/Widgets/ListView2Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected override void OnDraw(Context ctx, Rectangle dirtyRect)
{
var Value = _Values[i];
if (_Cols[i].Visible)
Draw(Value, PosByX, ctx, _Cols[i].Width);
Draw(Value, PosByX, ctx, _Cols[i].Width, CurFgColor);

if (_Cols.Count() > i && i != _Cols.Count() - 1)
{
Expand All @@ -59,7 +59,8 @@ protected override void OnDraw(Context ctx, Rectangle dirtyRect)
/// <param name="Where">Where (position by X) should be drawed</param>
/// <param name="On">On what Drawing.Context the information should be drawed</param>
/// <param name="MaxWidth">The limit of the picture's width</param>
private void Draw(object What, double Where, Context On, double MaxWidth)
/// <param name="TextColor">The text foreground color</param>
private void Draw(object What, double Where, Context On, double MaxWidth, Color TextColor)
{
if (What.GetType() != typeof (Image)
&&
Expand All @@ -72,6 +73,7 @@ private void Draw(object What, double Where, Context On, double MaxWidth)
Width = MaxWidth,
Trimming = TextTrimming.WordElipsis
};
On.SetColor (TextColor);
On.DrawTextLayout(tl, Where + 4, 0);
}
if (What is Image)
Expand All @@ -93,7 +95,6 @@ public void OnDblClick()
/// <param name="Data">The data that should be shown in this LV2I</param>
public ListView2Item(int RowNumber, int ColNumber, string RowTag, ListView2.CollumnInfo[] Collumns, List<Object> Data)
{
BackgroundColor = Colors.Aqua;
MinHeight = 16;
HeightRequest = 16;
MinWidth = 500;
Expand Down Expand Up @@ -126,7 +127,8 @@ public Color NormalFgColor
{
DefFgColor = value;
if (State == ListView2.ItemStates.Default) {
//undone
CurFgColor = value;
QueueDraw ();
}
}
}
Expand Down

0 comments on commit 56a2052

Please sign in to comment.