mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-30 20:20:34 +12:00
Remove tool text animations because not necessary anymore
This commit is contained in:
parent
e62634a5e8
commit
c4725ec668
|
@ -88,7 +88,6 @@ public Color CurrentColor
|
|||
private int frameCount;
|
||||
private bool pause, isKeyAllowed;
|
||||
private ColorBlinkAnimation colorBlinkAnimation;
|
||||
private TextAnimation shapeTypeTextAnimation;
|
||||
private Bitmap bmpBackgroundImage;
|
||||
|
||||
public RegionCaptureForm(RegionCaptureMode mode)
|
||||
|
@ -106,7 +105,6 @@ public RegionCaptureForm(RegionCaptureMode mode)
|
|||
timerStart = new Stopwatch();
|
||||
timerFPS = new Stopwatch();
|
||||
colorBlinkAnimation = new ColorBlinkAnimation();
|
||||
shapeTypeTextAnimation = new TextAnimation(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(0.5));
|
||||
|
||||
borderPen = new Pen(Color.Black);
|
||||
borderDotPen = new Pen(Color.White) { DashPattern = new float[] { 5, 5 } };
|
||||
|
@ -199,13 +197,6 @@ public void Prepare(Image img)
|
|||
ShapeManager.WindowCaptureMode = Config.DetectWindows;
|
||||
ShapeManager.IncludeControls = Config.DetectControls;
|
||||
|
||||
if (IsAnnotationMode)
|
||||
{
|
||||
ShapeManager.CurrentShapeTypeChanged += ShapeManager_CurrentShapeTypeChanged;
|
||||
|
||||
ShapeManager_CurrentShapeTypeChanged(ShapeManager.CurrentShapeType);
|
||||
}
|
||||
|
||||
if (Mode == RegionCaptureMode.OneClick || ShapeManager.WindowCaptureMode)
|
||||
{
|
||||
IntPtr handle = Handle;
|
||||
|
@ -225,11 +216,6 @@ public void Prepare(Image img)
|
|||
}
|
||||
}
|
||||
|
||||
private void ShapeManager_CurrentShapeTypeChanged(ShapeType shapeType)
|
||||
{
|
||||
shapeTypeTextAnimation.Start(shapeType.GetLocalizedDescription());
|
||||
}
|
||||
|
||||
private void RegionCaptureForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
this.ForceActivate();
|
||||
|
@ -548,20 +534,6 @@ private void Draw(Graphics g)
|
|||
DrawTips(g);
|
||||
}
|
||||
|
||||
if (IsAnnotationMode)
|
||||
{
|
||||
if (Config.ShowMenuTip)
|
||||
{
|
||||
// Draw right click menu tip
|
||||
DrawMenuTip(g);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If current shape changed then draw it temporary
|
||||
DrawCurrentShapeText(g);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw magnifier
|
||||
if (Config.ShowMagnifier || Config.ShowInfo)
|
||||
{
|
||||
|
@ -687,21 +659,6 @@ private void DrawTopCenterTip(Graphics g, string text, double opacity = 1)
|
|||
}
|
||||
}
|
||||
|
||||
private void DrawMenuTip(Graphics g)
|
||||
{
|
||||
DrawTopCenterTip(g, Resources.RectangleRegionForm_DrawMenuTip_Tip__Right_click_to_open_options_menu);
|
||||
}
|
||||
|
||||
private void DrawCurrentShapeText(Graphics g)
|
||||
{
|
||||
shapeTypeTextAnimation.Update();
|
||||
|
||||
if (shapeTypeTextAnimation.Active)
|
||||
{
|
||||
DrawTopCenterTip(g, shapeTypeTextAnimation.Text, shapeTypeTextAnimation.Opacity);
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteTips(StringBuilder sb)
|
||||
{
|
||||
sb.AppendLine(Resources.RectangleRegion_WriteTips__F1__Hide_tips);
|
||||
|
|
|
@ -818,15 +818,6 @@ internal class Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Tip: Right click to open options menu.
|
||||
/// </summary>
|
||||
internal static string RectangleRegionForm_DrawMenuTip_Tip__Right_click_to_open_options_menu {
|
||||
get {
|
||||
return ResourceManager.GetString("RectangleRegionForm_DrawMenuTip_Tip__Right_click_to_open_options_menu", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [Ctrl + Mouse wheel] Change current tool.
|
||||
/// </summary>
|
||||
|
|
|
@ -342,9 +342,6 @@ Distance: {6:0.00} px / Angle: {7:0.00}°</value>
|
|||
<data name="counter_reset" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\counter-reset.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="RectangleRegionForm_DrawMenuTip_Tip__Right_click_to_open_options_menu" xml:space="preserve">
|
||||
<value>Tip: Right click to open options menu</value>
|
||||
</data>
|
||||
<data name="RectangleRegionForm_WriteTips__Right_click___Menu__Open_options_menu" xml:space="preserve">
|
||||
<value>[Right click] [Menu] Open options menu</value>
|
||||
</data>
|
||||
|
|
|
@ -338,9 +338,6 @@
|
|||
<data name="ShapeManager_CreateContextMenu_Highlight_color___" xml:space="preserve">
|
||||
<value>Цвет подсветки...</value>
|
||||
</data>
|
||||
<data name="RectangleRegionForm_DrawMenuTip_Tip__Right_click_to_open_options_menu" xml:space="preserve">
|
||||
<value>Совет: Кликните ПКМ, чтобы открыть меню опций</value>
|
||||
</data>
|
||||
<data name="ShapeManager_CreateContextMenu_Pixel_size_" xml:space="preserve">
|
||||
<value>Размер пикселя:</value>
|
||||
</data>
|
||||
|
|
|
@ -236,9 +236,6 @@
|
|||
<data name="RectangleAnnotate_WriteTips__Ctrl___Mouse_wheel__Change_pen_size" xml:space="preserve">
|
||||
<value>[Ctrl +鼠标滚轮] 更改画笔大小</value>
|
||||
</data>
|
||||
<data name="RectangleRegionForm_DrawMenuTip_Tip__Right_click_to_open_options_menu" xml:space="preserve">
|
||||
<value>提示:右键点击打开选项菜单</value>
|
||||
</data>
|
||||
<data name="RectangleRegionForm_WriteTips__Right_click___Menu__Open_options_menu" xml:space="preserve">
|
||||
<value>[点击右键] [菜单] 打开选项菜单</value>
|
||||
</data>
|
||||
|
|
|
@ -70,6 +70,5 @@ public class RegionCaptureOptions
|
|||
public AnnotationOptions AnnotationOptions = new AnnotationOptions();
|
||||
public ShapeType LastRegionTool = ShapeType.RegionRectangle;
|
||||
public ShapeType LastAnnotationTool = ShapeType.DrawingRectangle;
|
||||
public bool ShowMenuTip = true;
|
||||
}
|
||||
}
|
|
@ -250,8 +250,7 @@ private static RegionCaptureOptions GetRegionCaptureOptions(RegionCaptureOptions
|
|||
MagnifierPixelCount = options.MagnifierPixelCount,
|
||||
MagnifierPixelSize = options.MagnifierPixelSize,
|
||||
ShowCrosshair = options.ShowCrosshair,
|
||||
AnnotationOptions = options.AnnotationOptions,
|
||||
ShowMenuTip = options.ShowMenuTip
|
||||
AnnotationOptions = options.AnnotationOptions
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -784,9 +784,8 @@ private void SwapShapeType()
|
|||
|
||||
private void OpenOptionsMenu()
|
||||
{
|
||||
// TODO
|
||||
SelectIntersectShape();
|
||||
|
||||
Config.ShowMenuTip = false;
|
||||
}
|
||||
|
||||
public Point SnapPosition(Point posOnClick, Point posCurrent)
|
||||
|
|
Loading…
Reference in a new issue