Skip to content

Commit

Permalink
Merge pull request #417 from Leo-Corporation/vNext
Browse files Browse the repository at this point in the history
Version 6.3.0.2405
  • Loading branch information
lpeyr authored May 5, 2024
2 parents 21f9d0d + 908b0a2 commit 130396c
Show file tree
Hide file tree
Showing 14 changed files with 456 additions and 307 deletions.
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 "6.2.1.2404"
#define MyAppFullVersion "6.2.1.2404"
#define MyAppVersion "6.3.0.2405"
#define MyAppFullVersion "6.3.0.2405"
#define MyAppPublisher "Léo Corporation"
#define MyAppURL "https://leocorporation.dev/"
#define MyAppExeName "ColorPicker.exe"
Expand Down
37 changes: 37 additions & 0 deletions ColorPicker/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1962,6 +1962,43 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
<Setter Property="OverridesDefaultStyle" Value="true" />
<Setter Property="HasDropShadow" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToolTip">
<Border
Name="Border"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Margin="5"
Background="{TemplateBinding Background}"
BorderBrush="{DynamicResource LightAccentColor}"
BorderThickness="1">
<Border.Effect>
<DropShadowEffect
BlurRadius="10"
Direction="270"
Opacity="0.1"
ShadowDepth="0"
Color="{DynamicResource Accent}" />
</Border.Effect>
<ContentPresenter
Margin="4"
HorizontalAlignment="Left"
VerticalAlignment="Top" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="HasDropShadow" Value="true">
<Setter TargetName="Border" Property="CornerRadius" Value="4" />
<Setter TargetName="Border" Property="SnapsToDevicePixels" Value="true" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>
2 changes: 1 addition & 1 deletion ColorPicker/Classes/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static class Global
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 => "6.2.1.2404";
public static string Version => "6.3.0.2405";

public static string HiSentence
{
Expand Down
2 changes: 1 addition & 1 deletion 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>6.2.1.2404</Version>
<Version>6.3.0.2405</Version>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>logo.png</PackageIcon>
<ApplicationIcon>CPM.ico</ApplicationIcon>
Expand Down
69 changes: 50 additions & 19 deletions ColorPicker/Pages/ImageExtractorPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,37 @@
x:Name="ImageScrollViewer"
Grid.Row="2"
Height="200"
AllowDrop="True"
Drop="DragZone_Drop"
HorizontalScrollBarVisibility="Auto"
Style="{DynamicResource ScrollViewerStyle}"
VerticalScrollBarVisibility="Disabled"
Visibility="Collapsed">
<StackPanel x:Name="ImageDisplayer" Orientation="Horizontal" />
</ScrollViewer>
<Border
x:Name="DragZone"
Grid.Row="2"
Margin="10"
Padding="10"
AllowDrop="True"
BorderBrush="{DynamicResource LightAccentColor}"
BorderThickness="1"
CornerRadius="5"
Drop="DragZone_Drop"
MouseLeftButtonUp="DragZone_MouseLeftButtonUp">
<StackPanel>
<TextBlock
FontFamily="..\Fonts\#FluentSystemIcons-Regular"
FontSize="36"
Text="&#xF9AE;"
TextAlignment="Center" />
<TextBlock
FontWeight="Bold"
Text="{x:Static lang:Resources.DragImagesHere}"
TextAlignment="Center" />
</StackPanel>
</Border>
<Button
x:Name="ExtractBtn"
Grid.Row="3"
Expand Down Expand Up @@ -336,25 +361,31 @@
FontWeight="Bold"
Foreground="{DynamicResource Foreground1}"
Text="{x:Static lang:Resources.SelectFormatItems}" />
<RadioButton
x:Name="CommaRadioBtn"
Margin="10 0"
Background="Transparent"
BorderBrush="{DynamicResource AccentColor}"
Content="{x:Static lang:Resources.CommaSeparated}"
Foreground="{DynamicResource Foreground1}"
GroupName="Format"
IsChecked="True"
Style="{DynamicResource RadioButtonStyle1}" />
<RadioButton
x:Name="SemiColonRadioBtn"
Margin="10 0"
Background="Transparent"
BorderBrush="{DynamicResource AccentColor}"
Content="{x:Static lang:Resources.SemiColonSeparated}"
Foreground="{DynamicResource Foreground1}"
GroupName="Format"
Style="{DynamicResource RadioButtonStyle1}" />
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<RadioButton
x:Name="CommaRadioBtn"
Width="50"
Margin="5 0"
HorizontalContentAlignment="Center"
Background="Transparent"
Content=","
FontWeight="Bold"
Foreground="{DynamicResource AccentColor}"
GroupName="Format"
IsChecked="True"
Style="{DynamicResource DefaultToggleButton}" />
<RadioButton
x:Name="SemiColonRadioBtn"
Width="50"
Margin="5 0"
HorizontalContentAlignment="Center"
Background="Transparent"
Content=";"
FontWeight="Bold"
Foreground="{DynamicResource AccentColor}"
GroupName="Format"
Style="{DynamicResource DefaultToggleButton}" />
</StackPanel>
<CheckBox
x:Name="IncludeFrequenceChk"
VerticalAlignment="Center"
Expand Down
26 changes: 26 additions & 0 deletions ColorPicker/Pages/ImageExtractorPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
using ColorPicker.UserControls;
using Microsoft.Win32;
using Synethia;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
Expand Down Expand Up @@ -68,6 +69,7 @@ private void LoadImageUI()
ImageScrollViewer.Visibility = ImageDisplayer.Children.Count == 0 ? Visibility.Collapsed : Visibility.Visible;
ColorPlaceholder.Visibility = ImageDisplayer.Children.Count == 0 ? Visibility.Visible : Visibility.Collapsed;
if (ImageDisplayer.Children.Count == 0) ColorDisplayerBorder.Visibility = Visibility.Collapsed;
DragZone.Visibility = ImageDisplayer.Children.Count == 0 ? Visibility.Visible : Visibility.Collapsed;
}

private void BrowseBtn_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -225,4 +227,28 @@ private void SortBtn_Click(object sender, RoutedEventArgs e)
Colors = ascending ? Colors.OrderBy(x => x.Value).ToDictionary(x => x.Key, x => x.Value) : Colors.OrderByDescending(x => x.Value).ToDictionary(x => x.Key, x => x.Value);
LoadColorDisplayer(Colors);
}

private void DragZone_Drop(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);

foreach (string file in files)
{
string extension = Path.GetExtension(file).ToLower();

if (extension == ".jpg" || extension == ".png" || extension == ".jpeg" || extension == ".bmp" || extension == ".gif" || extension == ".ico")
{
filePaths.Add(file);
}
}
LoadImageUI();
}
}

private void DragZone_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
BrowseBtn_Click(sender, e);
}
}
2 changes: 2 additions & 0 deletions ColorPicker/Pages/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@
<ComboBoxItem Content="{x:Static lang:Resources.Gradient}" />
<ComboBoxItem Content="{x:Static lang:Resources.AIGeneration}" />
<ComboBoxItem Content="{x:Static lang:Resources.Harmonies}" />
<ComboBoxItem Content="{x:Static lang:Resources.ImageExtractor}" />
<ComboBoxItem Content="{x:Static lang:Resources.ContrastGrid}" />
</ComboBox>
</StackPanel>
<CheckBox
Expand Down
9 changes: 9 additions & 0 deletions ColorPicker/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions ColorPicker/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -780,4 +780,7 @@
<data name="RightClickCollectionMsg" xml:space="preserve">
<value>Right click on a color to remove it</value>
</data>
<data name="DragImagesHere" xml:space="preserve">
<value>You can drag and drop images here</value>
</data>
</root>
3 changes: 3 additions & 0 deletions ColorPicker/Properties/Resources.fr-FR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -784,4 +784,7 @@
<data name="RightClickCollectionMsg" xml:space="preserve">
<value>Faites un clic droit sur une couleur pour la supprimer</value>
</data>
<data name="DragImagesHere" xml:space="preserve">
<value>Vous pouvez glisser-déposer des images ici</value>
</data>
</root>
3 changes: 3 additions & 0 deletions ColorPicker/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -760,4 +760,7 @@
<data name="RightClickCollectionMsg" xml:space="preserve">
<value>Right click on a color to remove it</value>
</data>
<data name="DragImagesHere" xml:space="preserve">
<value>You can drag and drop images here</value>
</data>
</root>
Loading

0 comments on commit 130396c

Please sign in to comment.