Skip to content

Commit

Permalink
Merge pull request #202 from buchizo/fix-default-theme-color-on-theme…
Browse files Browse the repository at this point in the history
…-changed

fix set default background color on theme changed
buchizo authored May 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents ce848cf + bb64920 commit 3e8d018
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ClaudiaIDE/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="ClaudiaIDE..7442ac19-889b-4699-a817-e6e054877ee3" Version="3.1.41" Language="en-US" Publisher="buchizo" />
<Identity Id="ClaudiaIDE..7442ac19-889b-4699-a817-e6e054877ee3" Version="3.1.42" Language="en-US" Publisher="buchizo" />
<DisplayName>ClaudiaIDE</DisplayName>
<Description xml:space="preserve">This extension change the background image of editor.</Description>
<MoreInfo>https://github.com/buchizo/ClaudiaIDE</MoreInfo>
2 changes: 1 addition & 1 deletion ClaudiaIDE16/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="ClaudiaIDE2019.9ab800ef-0cff-4893-bf16-57d58ff53456" Version="3.1.41" Language="en-US" Publisher="k.buchi" />
<Identity Id="ClaudiaIDE2019.9ab800ef-0cff-4893-bf16-57d58ff53456" Version="3.1.42" Language="en-US" Publisher="k.buchi" />
<DisplayName>ClaudiaIDE 2019</DisplayName>
<Description xml:space="preserve">This extension change the background image of editor.</Description>
<MoreInfo>https://github.com/buchizo/ClaudiaIDE</MoreInfo>
9 changes: 7 additions & 2 deletions Shared/ClaudiaIDE.cs
Original file line number Diff line number Diff line change
@@ -723,7 +723,6 @@ private async Task SetSpecificColorForBackgroundAsync(DependencyObject d, string
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
var refd = d.GetType();
var property = refd.GetProperty("Background");
if (!(property?.GetValue(d) is SolidColorBrush sb)) return;
if (isRecovery)
{
if (_defaultThemeColor.TryGetValue(key, out var d1))
@@ -735,7 +734,13 @@ private async Task SetSpecificColorForBackgroundAsync(DependencyObject d, string
{
if (!_defaultThemeColor.ContainsKey(key))
{
_defaultThemeColor[key] = sb;
_defaultThemeColor[key] = new SolidColorBrush(
Color.FromArgb(
_currentThemeColor.A,
_currentThemeColor.R,
_currentThemeColor.G,
_currentThemeColor.B)
);
}
if (_settings.EditorBackgroundColorObject.HasValue)
{
2 changes: 1 addition & 1 deletion Shared/ClaudiaIdePackage.cs
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
namespace ClaudiaIDE
{
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
[InstalledProductRegistration("#110", "#112", "3.1.41", IconResourceID = 400)]
[InstalledProductRegistration("#110", "#112", "3.1.42", IconResourceID = 400)]
[ProvideOptionPage(typeof(ClaudiaIdeOptionPageGrid), "ClaudiaIDE", "Light theme", 110, 116, true)]
[ProvideOptionPage(typeof(ClaudiaIdeDarkThemeOptionPageGrid), "ClaudiaIDE", "Dark theme", 110, 117, true)]
[ProvideOptionPage(typeof(ClaudiaIdeGeneralOptionPageGrid), "ClaudiaIDE", "General", 110, 118, true)]

0 comments on commit 3e8d018

Please sign in to comment.