Skip to content

Commit

Permalink
BorderStyle is supported by themes now
Browse files Browse the repository at this point in the history
  • Loading branch information
FelisDiligens committed Sep 22, 2022
1 parent 7437284 commit 8047a86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Docs/Theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ You can use the following values to assign them to properies:
| `true` / `false` | System.Boolean |
| any | System.String |
| `Standard` / `Flat` / `Popup` / `System` | System.Windows.Forms.FlatStyle |
| `None` / `Fixed3D` / `FixedSingle` | System.Windows.Forms.BorderStyle |

The conversion depends on the property's type.

Expand Down
5 changes: 5 additions & 0 deletions Fo76ini/Interface/Theming.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ private static void SetProperty(PropertyInfo property, object parent, string val
if (Enum.TryParse(value, out FlatStyle e))
property.SetValue(parent, e, null);
}
else if (property.PropertyType == typeof(BorderStyle))
{
if (Enum.TryParse(value, out BorderStyle e))
property.SetValue(parent, e, null);
}
}
}
}
Expand Down

0 comments on commit 8047a86

Please sign in to comment.