Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 5.8.0.2312 #355

Merged
merged 22 commits into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
183383d
Bump Betalgo.OpenAI from 7.3.1 to 7.4.1
dependabot[bot] Nov 16, 2023
62f92ab
Bump PeyrSharp.Env from 1.10.0.2310 to 2.0.0.2311
dependabot[bot] Nov 20, 2023
fee33bb
Bump PeyrSharp.Core from 1.10.0.2310 to 2.0.0.2311
dependabot[bot] Nov 20, 2023
adee5b1
Merge pull request #348 from Leo-Corporation/dependabot/nuget/vNext/B…
lpeyr Dec 9, 2023
6a1021b
Merge pull request #349 from Leo-Corporation/dependabot/nuget/vNext/P…
lpeyr Dec 9, 2023
8ac9ce7
Merge branch 'vNext' into dependabot/nuget/vNext/PeyrSharp.Core-2.0.0…
lpeyr Dec 9, 2023
286977c
Merge pull request #350 from Leo-Corporation/dependabot/nuget/vNext/P…
lpeyr Dec 9, 2023
28d8c9e
Added the possibility to bookmark a color in Harmonies page (#351)
lpeyr Dec 10, 2023
623be95
Added translations (#352)
lpeyr Dec 10, 2023
bd2404b
Added placeholder in AI Page color section (#352)
lpeyr Dec 10, 2023
43e0a09
Added placeholder in AI Page palette section (#352)
lpeyr Dec 10, 2023
8c9a8a9
Updated theme file
lpeyr Dec 10, 2023
9394770
Added instant theme switching (#353)
lpeyr Dec 10, 2023
92a46ee
Fixed tab color issue when changing theme (#353)
lpeyr Dec 10, 2023
0a05756
Fixed an issue with nav bar when switching theme (#353)
lpeyr Dec 10, 2023
8e5f9d9
Fixed color issue in dark theme
lpeyr Dec 10, 2023
95a2635
Updated Setup
lpeyr Dec 10, 2023
dda628a
Version 5.8.0.2312-rc1
lpeyr Dec 10, 2023
d14b8a9
Code cleanup
lpeyr Dec 10, 2023
5ce2557
Fixed transparent window issue
lpeyr Dec 10, 2023
1b91763
Fixed theme not changing on first run
lpeyr Dec 10, 2023
a804895
Version 5.8.0.2312
lpeyr Dec 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ColorPicker.Setup/Setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "ColorPicker Max"
#define MyAppVersion "5.7.1.2311"
#define MyAppFullVersion "5.7.1.2311"
#define MyAppVersion "5.8.0.2312"
#define MyAppFullVersion "5.8.0.2312"
#define MyAppPublisher "Léo Corporation"
#define MyAppURL "https://leocorporation.dev/"
#define MyAppExeName "ColorPicker.exe"
Expand Down
94 changes: 47 additions & 47 deletions ColorPicker/App.xaml

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions ColorPicker/Classes/Bookmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
using PeyrSharp.Core.Converters;
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
Expand All @@ -30,30 +29,30 @@
{
public class Bookmarks
{
public List<string> ColorBookmarks { get; set; }

Check warning on line 32 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'ColorBookmarks' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 32 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'ColorBookmarks' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
public List<string> PaletteBookmarks { get; set; }

Check warning on line 33 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'PaletteBookmarks' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 33 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'PaletteBookmarks' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
public List<Gradient> GradientBookmarks { get; set; }

Check warning on line 34 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'GradientBookmarks' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 34 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'GradientBookmarks' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
public List<BookmarkText> TextBookmarks { get; set; }

Check warning on line 35 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'TextBookmarks' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 35 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'TextBookmarks' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
}

public class BookmarkText : IEquatable<BookmarkText>

Check warning on line 38 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

'BookmarkText' overrides Object.Equals(object o) but does not override Object.GetHashCode()

Check warning on line 38 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

'BookmarkText' overrides Object.Equals(object o) but does not override Object.GetHashCode()
{
public string FontFamily { get; init; }
public string ForegroundColor { get; init; }
public string BackgroundColor { get; init; }
public BookmarkText()
{
public BookmarkText()
{
FontFamily = "Arial"; // Fallback values
ForegroundColor = "#000000";
BackgroundColor = "#FFFFFF";
}
}

public BookmarkText(string font, string fore, string back)
{
public BookmarkText(string font, string fore, string back)
{
FontFamily = font;
ForegroundColor = fore;
BackgroundColor = back;
}
}

public bool Equals(BookmarkText? obj)
{
Expand All @@ -65,7 +64,7 @@
}


public override bool Equals(object obj) => Equals(obj as BookmarkText);

Check warning on line 67 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of type of parameter 'obj' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 67 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of type of parameter 'obj' doesn't match overridden member (possibly because of nullability attributes).
}

[XmlType("BookmarkGradientStop")]
Expand All @@ -91,7 +90,7 @@
}
}

public class Gradient : IEquatable<Gradient>

Check warning on line 93 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

'Gradient' overrides Object.Equals(object o) but does not override Object.GetHashCode()

Check warning on line 93 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

'Gradient' overrides Object.Equals(object o) but does not override Object.GetHashCode()
{
public List<BookmarkGradientStop> Stops { get; init; }
public double Angle { get; init; }
Expand Down Expand Up @@ -119,6 +118,6 @@
return true;
}

public override bool Equals(object obj) => Equals(obj as Gradient);

Check warning on line 121 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of type of parameter 'obj' doesn't match overridden member (possibly because of nullability attributes).

Check warning on line 121 in ColorPicker/Classes/Bookmarks.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of type of parameter 'obj' doesn't match overridden member (possibly because of nullability attributes).
}
}
5 changes: 0 additions & 5 deletions ColorPicker/Classes/DEC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

using ColorHelper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ColorPicker.Classes;
public class DEC
Expand Down
24 changes: 17 additions & 7 deletions ColorPicker/Classes/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
using System.Linq;
using System.Threading;
using System.Windows;
using System.Windows.Markup.Localizer;
using System.Windows.Media;

namespace ColorPicker.Classes;
Expand Down Expand Up @@ -82,12 +81,14 @@ public static class Global
}
};

internal static Action RefreshButton { get; set; }

internal static string SynethiaPath => $@"{FileSys.AppDataPath}\Léo Corporation\ColorPicker Max\SynethiaConfig.json";
internal static string BookmarksPath => $@"{FileSys.AppDataPath}\Léo Corporation\ColorPicker Max\Bookmarks.xml";
internal static string SettingsPath => $@"{FileSys.AppDataPath}\Léo Corporation\ColorPicker Max\Settings.xml";
public static string LastVersionLink => "https://raw.githubusercontent.com/Leo-Corporation/LeoCorp-Docs/master/Liens/Update%20System/ColorPicker/5.0/Version.txt";

public static string Version => "5.7.1.2311";
public static string Version => "5.8.0.2312";

public static string HiSentence
{
Expand Down Expand Up @@ -161,7 +162,7 @@ public static System.Drawing.Color GenerateRandomColorDrawing()
int r = random.Next(0, 255); int g = random.Next(0, 255); int b = random.Next(0, 255); // Generate random values
return System.Drawing.Color.FromArgb(r, g, b);
}
public static Color GetColorFromResource(string resourceName) => (Color)System.Windows.Media.ColorConverter.ConvertFromString(Application.Current.Resources[resourceName].ToString());
public static SolidColorBrush GetColorFromResource(string resource) => (SolidColorBrush)Application.Current.Resources[resource];

public static double GetLuminance(int r, int g, int b)
{
Expand Down Expand Up @@ -253,7 +254,7 @@ public static AppPages PageInfoToAppPages(PageInfo pageInfo)
/// <summary>
/// Changes the application's theme.
/// </summary>
public static void ChangeTheme()
public static void ChangeTheme(bool reload = false)
{
App.Current.Resources.MergedDictionaries.Clear();
ResourceDictionary resourceDictionary = new(); // Create a resource dictionary
Expand All @@ -274,6 +275,15 @@ public static void ChangeTheme()
}

App.Current.Resources.MergedDictionaries.Add(resourceDictionary); // Add the dictionary

if (!reload) return;
AiGenPage.CheckButton(AiGenPage.CheckedButton);
BookmarksPage.CheckButton(BookmarksPage.CheckedButton);
ConverterPage.CheckButton(ConverterPage.SelectedColorBtn);
ChromaticWheelPage.CheckButton(ChromaticWheelPage.CheckedButton);
HarmoniesPage.CheckButton(HarmoniesPage.SelectedColorBtn);
PalettePage.CheckButton(PalettePage.SelectedColorBtn);
RefreshButton();
}

public static bool IsSystemThemeDark()
Expand Down Expand Up @@ -468,9 +478,9 @@ public static Color[] GenerateTriadicColors(Color baseColor)

public static void ColorToHSL(Color color, out float h, out float s, out float l)
{
float r = (float)color.R / 255f;
float g = (float)color.G / 255f;
float b = (float)color.B / 255f;
float r = color.R / 255f;
float g = color.G / 255f;
float b = color.B / 255f;

float max = Math.Max(r, Math.Max(g, b));
float min = Math.Min(r, Math.Min(g, b));
Expand Down
8 changes: 4 additions & 4 deletions ColorPicker/ColorPicker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Title>ColorPicker</Title>
<Description>Maximize your creativity.</Description>
<RepositoryUrl>https://github.com/Leo-Corporation/ColorPicker</RepositoryUrl>
<Version>5.7.1.2311</Version>
<Version>5.8.0.2312</Version>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>logo.png</PackageIcon>
<ApplicationIcon>CPM.ico</ApplicationIcon>
Expand Down Expand Up @@ -48,11 +48,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Betalgo.OpenAI" Version="7.3.1" />
<PackageReference Include="Betalgo.OpenAI" Version="7.4.1" />
<PackageReference Include="ColorHelper" Version="1.8.1" />
<PackageReference Include="MouseKeyHook" Version="5.7.1" />
<PackageReference Include="PeyrSharp.Env" Version="1.10.0.2310" />
<PackageReference Include="PeyrSharp.Core" Version="1.10.0.2310" />
<PackageReference Include="PeyrSharp.Core" Version="2.0.0.2311" />
<PackageReference Include="PeyrSharp.Env" Version="2.0.0.2311" />
<PackageReference Include="Synethia" Version="1.1.1.2302" />
</ItemGroup>

Expand Down
24 changes: 12 additions & 12 deletions ColorPicker/Enums/ColorTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

namespace ColorPicker.Enums
{
public enum ColorTypes
{
RGB,
HEX,
HSV,
HSL,
CMYK,
XYZ,
YIQ,
YUV,
DEC
}
public enum ColorTypes
{
RGB,
HEX,
HSV,
HSL,
CMYK,
XYZ,
YIQ,
YUV,
DEC
}
}
Loading
Loading