-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add application theme support and update UI styling
Reformatted `DeviceTypeHelper` docs and added global namespace. Introduced `AppTheme` enum in `AppTheme.cs`. Updated `SettingOptions` to include `AppTheme` property. Added `SetAppTheme` method to `AppManager` and P/Invoke for `ShouldSystemUseDarkMode`. Updated `IAppManager` interface to include `SetAppTheme`. Updated `Resources.resw` for theme settings in English and German. Made `MainWindow` static in `App.xaml.cs` and called `SetAppTheme`. Updated various XAML files to use theme resources for styling. Removed static resource references in `MainWindow.xaml`. Commented out acrylic brush definitions in `DefaultTheme.xaml`. Added theme selection card in `SettingsPage.xaml`. Added `ApplicationThemeViewModel` for theme management. Updated `ConfigurationViewModel` for theme management and initialization. Handled potential null `MainUIUrl` in `MainUIViewModel`. Updated `SettingsViewModel` for theme management and saving. Handled null or empty `LabelColor` in `WidgetViewModel`. Signed-off-by: Christoph Hofmann <[email protected]>
- Loading branch information
Showing
21 changed files
with
270 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Microsoft.UI.Xaml; | ||
|
||
namespace openHAB.Core.Model; | ||
|
||
/// <summary> | ||
/// Specifies the application theme. | ||
/// </summary> | ||
public enum AppTheme | ||
{ | ||
/// <summary> | ||
/// Light theme. | ||
/// </summary> | ||
Light = ApplicationTheme.Light, | ||
|
||
/// <summary> | ||
/// Dark theme. | ||
/// </summary> | ||
Dark = ApplicationTheme.Dark, | ||
|
||
/// <summary> | ||
/// System default theme. | ||
/// </summary> | ||
System = 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.