Skip to content

Commit

Permalink
Fix log pages not switching theme automatically (fix #2381)
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Jan 17, 2025
1 parent b5267a4 commit 2ea0871
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/UniGetUI/Pages/LogPages/LogPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public BaseLogPage(bool log_level_enabled)
InitializeComponent();
LogLevelPane.Visibility = log_level_enabled ? Visibility.Visible : Visibility.Collapsed;
if (log_level_enabled) LoadLogLevels();

ActualThemeChanged += (_, _) => LoadLog();
}

protected void SelectLogLevelByName(string name)
Expand Down
3 changes: 2 additions & 1 deletion src/UniGetUI/Pages/LogPages/ManagerLogsPage.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Documents;
using Microsoft.UI.Xaml.Media;
using UniGetUI.Core.Tools;
Expand All @@ -17,7 +18,7 @@ public ManagerLogsPage() : base(true)

public void LoadForManager(IPackageManager manager)
{
bool IS_DARK = ActualTheme == Microsoft.UI.Xaml.ElementTheme.Dark;
bool IS_DARK = this.ActualTheme == ElementTheme.Dark;
bool verbose = LogLevelCombo.SelectedValue?.ToString()?.Contains(CoreTools.Translate("Verbose")) ?? false;

if(!verbose) SelectLogLevelByName(manager.DisplayName);
Expand Down

0 comments on commit 2ea0871

Please sign in to comment.