Greenshot image editor merge

This commit is contained in:
Jaex 2014-11-21 15:34:50 +02:00
parent fe803c4ad8
commit 995abf0057
7 changed files with 32 additions and 32 deletions

View file

@ -1412,6 +1412,7 @@ private void SurfacePaint(object sender, PaintEventArgs e)
//graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; //graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
//graphics.CompositingQuality = CompositingQuality.HighQuality; //graphics.CompositingQuality = CompositingQuality.HighQuality;
//graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; //graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
DrawBackground(graphics, clipRectangle);
graphics.DrawImage(Image, clipRectangle, clipRectangle, GraphicsUnit.Pixel); graphics.DrawImage(Image, clipRectangle, clipRectangle, GraphicsUnit.Pixel);
graphics.SetClip(targetGraphics); graphics.SetClip(targetGraphics);
_elements.Draw(graphics, _buffer, RenderMode.EDIT, clipRectangle); _elements.Draw(graphics, _buffer, RenderMode.EDIT, clipRectangle);
@ -1420,30 +1421,31 @@ private void SurfacePaint(object sender, PaintEventArgs e)
} }
else else
{ {
DrawBackground(targetGraphics, clipRectangle);
targetGraphics.DrawImage(Image, clipRectangle, clipRectangle, GraphicsUnit.Pixel); targetGraphics.DrawImage(Image, clipRectangle, clipRectangle, GraphicsUnit.Pixel);
_elements.Draw(targetGraphics, null, RenderMode.EDIT, clipRectangle); _elements.Draw(targetGraphics, null, RenderMode.EDIT, clipRectangle);
} }
} }
private void DrawBackground(Graphics targetGraphics, Rectangle clipRectangle)
{
// check if we need to draw the checkerboard
if (Image.IsAlphaPixelFormat(Image.PixelFormat) && _transparencyBackgroundBrush != null)
{
targetGraphics.FillRectangle(_transparencyBackgroundBrush, clipRectangle);
}
else
{
targetGraphics.Clear(BackColor);
}
}
/// <summary> /// <summary>
/// Draw a checkboard when capturing with transparency /// Draw a checkboard when capturing with transparency
/// </summary> /// </summary>
/// <param name="e">PaintEventArgs</param> /// <param name="e">PaintEventArgs</param>
protected override void OnPaintBackground(PaintEventArgs e) protected override void OnPaintBackground(PaintEventArgs e)
{ {
// check if we need to draw the checkerboard
if (Image.IsAlphaPixelFormat(Image.PixelFormat) && _transparencyBackgroundBrush != null)
{
Graphics targetGraphics = e.Graphics;
Rectangle clipRectangle = e.ClipRectangle;
targetGraphics.FillRectangle(_transparencyBackgroundBrush, clipRectangle);
}
else
{
Graphics targetGraphics = e.Graphics;
targetGraphics.Clear(BackColor);
//base.OnPaintBackground(e);
}
} }
/// <summary> /// <summary>

View file

@ -182,6 +182,11 @@ private void TextContainer_PropertyChanged(object sender, PropertyChangedEventAr
{ {
ShowTextBox(); ShowTextBox();
} }
else if (Selected && Status == EditStatus.IDLE && _textBox.Visible)
{
// Fix (workaround) for BUG-1698
_parent.KeysLocked = true;
}
} }
if (_textBox.Visible) if (_textBox.Visible)
{ {

View file

@ -39,6 +39,7 @@ public DropShadowSettingsForm(DropShadowEffect effect)
trackBar1.Value = (int)(effect.Darkness * 40); trackBar1.Value = (int)(effect.Darkness * 40);
offsetX.Value = effect.ShadowOffset.X; offsetX.Value = effect.ShadowOffset.X;
offsetY.Value = effect.ShadowOffset.Y; offsetY.Value = effect.ShadowOffset.Y;
thickness.Value = effect.ShadowSize;
} }
private void buttonOK_Click(object sender, EventArgs e) private void buttonOK_Click(object sender, EventArgs e)

View file

@ -1,11 +1,6 @@
#define MyAppName "ShareX" #define MyAppName "ShareX"
#define MyAppFile "ShareX.exe" #define MyAppFile "ShareX.exe"
#ifdef Debug #define MyAppParentDir "..\ShareX\bin\Release"
#define MyAppBuildType "Debug"
#else
#define MyAppBuildType "Release"
#endif
#define MyAppParentDir "..\ShareX\bin\" + MyAppBuildType
#define MyAppPath MyAppParentDir + "\ShareX.exe" #define MyAppPath MyAppParentDir + "\ShareX.exe"
#dim Version[4] #dim Version[4]
#expr ParseVersion(MyAppPath, Version[0], Version[1], Version[2], Version[3]) #expr ParseVersion(MyAppPath, Version[0], Version[1], Version[2], Version[3])
@ -71,9 +66,6 @@ Source: "{#MyAppParentDir}\ShareX.exe.config"; DestDir: {app}; Flags: ignorevers
Source: "{#MyAppParentDir}\*.dll"; DestDir: {app}; Flags: ignoreversion Source: "{#MyAppParentDir}\*.dll"; DestDir: {app}; Flags: ignoreversion
Source: "{#MyAppParentDir}\*.css"; DestDir: {app}; Flags: ignoreversion Source: "{#MyAppParentDir}\*.css"; DestDir: {app}; Flags: ignoreversion
Source: "{#MyAppParentDir}\*.txt"; DestDir: {app}; Flags: ignoreversion Source: "{#MyAppParentDir}\*.txt"; DestDir: {app}; Flags: ignoreversion
#ifdef Debug
Source: "{#MyAppParentDir}\*.pdb"; DestDir: {app}; Flags: ignoreversion
#endif
; Language resources ; Language resources
Source: "{#MyAppParentDir}\tr\*.resources.dll"; DestDir: {app}\Languages\tr; Flags: ignoreversion Source: "{#MyAppParentDir}\tr\*.resources.dll"; DestDir: {app}\Languages\tr; Flags: ignoreversion

View file

@ -39,7 +39,7 @@ namespace ShareX
{ {
internal static class Program internal static class Program
{ {
public static bool IsBeta = false; public static bool IsBeta = true;
public static string Title public static string Title
{ {

View file

@ -11,5 +11,5 @@
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
[assembly: Guid("82E6AC09-0FEF-4390-AD9F-0DD3F5561EFC")] [assembly: Guid("82E6AC09-0FEF-4390-AD9F-0DD3F5561EFC")]
[assembly: AssemblyVersion("9.4.1")] [assembly: AssemblyVersion("9.4.2")]
[assembly: AssemblyFileVersion("9.4.1")] [assembly: AssemblyFileVersion("9.4.2")]

View file

@ -37,8 +37,8 @@ internal class Program
{ {
private enum SetupType private enum SetupType
{ {
Stable, // Release build setup, creates portable zip file Stable, // Build setup + create portable zip file
Beta // Debug build setup, uploads it using Debug/ShareX.exe Beta // Build setup + upload it using "Debug/ShareX.exe"
} }
private const SetupType Setup = SetupType.Beta; private const SetupType Setup = SetupType.Beta;
@ -59,12 +59,12 @@ private static void Main(string[] args)
switch (Setup) switch (Setup)
{ {
case SetupType.Stable: case SetupType.Stable:
CompileSetup("Release"); CompileSetup();
CreatePortable(); CreatePortable();
OpenOutputDirectory(); OpenOutputDirectory();
break; break;
case SetupType.Beta: case SetupType.Beta:
CompileSetup("Debug"); CompileSetup();
UploadLatestFile(); UploadLatestFile();
break; break;
} }
@ -88,10 +88,10 @@ private static void UploadLatestFile()
} }
} }
private static void CompileSetup(string buildType) private static void CompileSetup()
{ {
Console.WriteLine("Compiling " + buildType + " setup..."); Console.WriteLine("Compiling setup...");
Process.Start(innoSetupPath, string.Format("\"{0}\" /d{1}", innoSetupScriptPath, buildType)).WaitForExit(); Process.Start(innoSetupPath, string.Format("\"{0}\"", innoSetupScriptPath)).WaitForExit();
Console.WriteLine("Setup file created."); Console.WriteLine("Setup file created.");
} }