Skip to content

Commit

Permalink
Add configurable UnsavedBackgroundColor
Browse files Browse the repository at this point in the history
  • Loading branch information
ievgen-baida committed Feb 29, 2024
1 parent 8a04ce0 commit 44b1ac3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Eto/Forms/ThemedControls/ThemedDocumentControlHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class ThemedDocumentControlHandler : ThemedContainerHandler<TableLayout,
Color tabForegroundColor;
Color tabHighlightForegroundColor;
Color tabHoverForegroundColor;
Color unsavedBackgroundColor;

int closeCornerRadius;

Expand Down Expand Up @@ -259,6 +260,20 @@ public Color TabHoverForegroundColor
}
}

/// <summary>
/// Gets or sets the background color for the unsaved changes indicator.
/// </summary>
/// <value>The background color for the unsaved changes indicator.</value>
public Color UnsavedBackgroundColor
{
get { return unsavedBackgroundColor; }
set
{
unsavedBackgroundColor = value;
tabDrawable.Invalidate();
}
}

/// <summary>
/// Gets or sets a value indicating whether to use a fixed tab height.
/// </summary>
Expand Down Expand Up @@ -298,6 +313,7 @@ public ThemedDocumentControlHandler()
tabForegroundColor = SystemColors.ControlText;
tabHighlightForegroundColor = SystemColors.HighlightText;
tabHoverForegroundColor = SystemColors.HighlightText;
unsavedBackgroundColor = SystemColors.ControlText;

tabDrawable = new Drawable();

Expand Down

0 comments on commit 44b1ac3

Please sign in to comment.