Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Commit 33c8c86

Browse files
authored
Merge pull request #507 from xamarin/ermau-more-theming
Theming fixes
2 parents 2d58871 + fe7ec6b commit 33c8c86

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Xamarin.PropertyEditing.Mac/Controls/Custom/TabButton.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public bool Selected
3434
get { return this.selected; }
3535
set
3636
{
37-
Enabled = value;
3837
this.selected = value;
3938
NeedsDisplay = true;
4039
}

Xamarin.PropertyEditing.Mac/HostResourceProvider.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,17 @@ public virtual NSColor GetNamedColor (string name)
3131

3232
public virtual NSImage GetNamedImage (string name)
3333
{
34-
if ((CurrentAppearance ?? NSAppearance.CurrentAppearance).Name.ToLower ().Contains ("dark"))
34+
if ((CurrentAppearance ?? NSAppearance.CurrentAppearance).Name.ToLower ().Contains ("dark")) {
35+
bool sel = name.EndsWith ("~sel");
36+
if (sel)
37+
name = name.Substring (0, name.Length - 4);
38+
3539
name += "~dark";
3640

41+
if (sel)
42+
name += "~sel";
43+
}
44+
3745
return NSImage.ImageNamed (name);
3846
}
3947

0 commit comments

Comments
 (0)