Skip to content

Commit e832f32

Browse files
Version 1.5.2
Fixed some issues with ColorPicker and the message to create a new file when opening another image. It will now be compiled on Windows 10 to avoid incompatibility.
1 parent c30a7c9 commit e832f32

8 files changed

Lines changed: 46 additions & 19 deletions

File tree

README-es.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ Pixie Cursors está basado en [PixelArtTool](https://github.com/unitycoder/Pixel
107107

108108
`Versión 1.4.1` herramienta borrador arreglada, no funcionaba. Se ha mejorado el mensaje que se muestra al abrir una imagen cuando ya hay otra abierta.
109109

110+
`Versión 1.5.2` se arregló un pequeño problema al dar doble clic al Selector de Color. El mensaje para crear un nuevo archivo al abrir otra imagen se ha mejorado, ahora también se muestra cuando hay un diseño de cursor en el canvas.
111+
112+
En cuanto a un problema con la compatibilidad con Windows 10 (no se abre), se compilará en esa versión para arreglarlo.
113+
110114
## Licencia
111115
**MIT License**
112116

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ Pixie Cursors is based on [PixelArtTool](https://github.com/unitycoder/PixelArtT
105105

106106
`Version 1.4.1` eraser tool fixed, it wasn't working. Message displayed when opening an image while another one is already open has been improved.
107107

108+
`Version 1.5.2` fixed a minor issue when double-clicking the ColorPicker. The message to create a new file when opening another image has been improved, now also displays when a cursor design is on the canvas.
109+
110+
Regarding a Windows 10 compatibility issue (it won't open), it will be compiled on that version to fix it.
111+
108112
## License
109113
**MIT License**
110114

installer src/Installer.iss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define MyAppName "Pixie Cursors"
2-
#define MyAppVersion "1.4.1"
2+
#define MyAppVersion "1.5.2"
33
#define MyAppPublisher "Génesis Toxical"
44
#define MyAppURL "https://genesistoxical.github.io/pixie-cursors/"
55
#define MyAppExeName "Pixie Cursors.exe"
@@ -8,7 +8,7 @@
88
AppId={{CF830ABE-EBC2-479C-9E76-2CE49DFF8676}
99
AppName={#MyAppName}
1010
AppVersion={#MyAppVersion}
11-
VersionInfoVersion=1.4.1.0
11+
VersionInfoVersion=1.5.2.0
1212
AppPublisher={#MyAppPublisher}
1313
AppCopyright={#MyAppPublisher} © 2025
1414
AppPublisherURL={#MyAppURL}

src/PixieCursors/MainWindow.xaml.cs

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public partial class MainWindow : Window, INotifyPropertyChanged
6262

6363
// settings
6464
private string pngName, tempFolder;
65-
private bool cropImage, noOpen;
65+
private bool cropImage, clickOpen;
6666
private ToolMode _currentTool = ToolMode.Draw;
6767
public ToolMode CurrentTool
6868
{
@@ -480,13 +480,6 @@ private void LoadSettings()
480480
currentColor.Alpha = 255;
481481

482482
DrawBackgroundGrid(gridBitmap, canvasResolutionX, canvasResolutionY, lightColor, darkColor, gridAlpha);
483-
484-
if (noOpen)
485-
{
486-
// Abrir dlg de imagen si anteriormente se dió clic en ese botón
487-
noOpen = false;
488-
OnOpenButton(null, null);
489-
}
490483
}
491484

492485
private void RegisterUndo()
@@ -577,6 +570,20 @@ private void SaveAsCursor(int hotspotX, int hotspotY, string curPath)
577570
}
578571
}
579572

573+
private static bool HasCanvasPixels(WriteableBitmap source)
574+
{
575+
byte[] data = new byte[source.BackBufferStride * source.PixelHeight];
576+
source.CopyPixels(data, source.BackBufferStride, 0);
577+
578+
for (int i = 3; i < data.Length; i += 4)
579+
{
580+
if (data[i] != 0) // Canal alfa
581+
return true;
582+
}
583+
584+
return false;
585+
}
586+
580587
private static Bitmap CreateShadow(Bitmap source)
581588
{
582589
Bitmap shadow = new Bitmap(source.Width, source.Height);
@@ -713,7 +720,8 @@ private void DrawingLeftButtonDown(object sender, MouseButtonEventArgs e)
713720

714721
// Cambia a la herramienta anterior, excepto con None, Hotspot y Eraser
715722
// en ese caso, regresa al Draw (Brush).
716-
CurrentTool = previousToolMode != ToolMode.None && previousToolMode != ToolMode.Hotspot && previousToolMode != ToolMode.Eraser
723+
CurrentTool = previousToolMode != ToolMode.None && previousToolMode != ToolMode.Hotspot
724+
&& previousToolMode != ToolMode.Eraser && previousToolMode != ToolMode.ColorPicker
717725
? previousToolMode
718726
: ToolMode.Draw;
719727
break;
@@ -784,10 +792,11 @@ private void OnOpenButton(object sender, RoutedEventArgs e)
784792
{
785793
// Abrir imagen e importarla al canvas dependiendo de su tamaño...
786794

787-
// Indica si hay una imagen en el canvas y no debe abrirse
795+
// Indica si hay pixeles en el canvas y no debe abrirse
788796
// una nueva imagen
789-
if (noOpen)
797+
if (HasCanvasPixels(canvasBitmap))
790798
{
799+
clickOpen = true;
791800
OnNewButton(sender, null);
792801
return;
793802
}
@@ -868,7 +877,6 @@ private void OnOpenButton(object sender, RoutedEventArgs e)
868877
}
869878
}
870879
}
871-
noOpen = true;
872880
}
873881

874882
// Herramienta que evita pintar un pixel accidental al
@@ -921,6 +929,17 @@ private void OnNewButton(object sender, MouseButtonEventArgs e)
921929
rectCurrentColor.Fill = currentColor.AsSolidColorBrush();
922930
colorPicker.SelectedBrush = (SolidColorBrush)rectCurrentColor.Fill;
923931
Preview.Fill = new SolidColorBrush(Color.FromRgb(244, 244, 244));
932+
933+
// Abrir dlg de imagen si anteriormente se dió clic en ese botón
934+
if (clickOpen)
935+
{
936+
clickOpen = false;
937+
OnOpenButton(null, null);
938+
}
939+
}
940+
else
941+
{
942+
clickOpen = false;
924943
}
925944
}
926945

src/PixieCursors/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.4.1.0")]
55-
[assembly: AssemblyFileVersion("1.4.1.0")]
54+
[assembly: AssemblyVersion("1.5.2.0")]
55+
[assembly: AssemblyFileVersion("1.5.2.0")]

src/PixieCursors/Properties/Resources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/PixieCursors/Properties/Resources.es-419.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,6 @@
262262
<value>Archivos PNG </value>
263263
</data>
264264
<data name="AppToCreateYourOwnCustomCursors" xml:space="preserve">
265-
<value>App para crear tus propios cursores personalizados - v1.4.1</value>
265+
<value>App para crear tus propios cursores personalizados - v1.5.2</value>
266266
</data>
267267
</root>

src/PixieCursors/Properties/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,6 @@
263263
<value>PNG Files </value>
264264
</data>
265265
<data name="AppToCreateYourOwnCustomCursors" xml:space="preserve">
266-
<value>App to create your own custom cursors - v1.4.1</value>
266+
<value>App to create your own custom cursors - v1.5.2</value>
267267
</data>
268268
</root>

0 commit comments

Comments
 (0)