将浮动工具栏使用新控件
This commit is contained in:
+25
-117
@@ -7351,52 +7351,16 @@
|
||||
</Canvas>
|
||||
<ikw:SimpleStackPanel Margin="2,0" Name="StackPanelFloatingBar" Orientation="Horizontal" Cursor="Arrow" HorizontalAlignment="Left">
|
||||
<!--<ikw:SimpleStackPanel Name="Cursor_Icon" MouseDown="Border_MouseDown" MouseUp="CursorIcon_Click"-->
|
||||
<ikw:SimpleStackPanel Name="Cursor_Icon"
|
||||
MouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
||||
MouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
|
||||
MouseUp="CursorIcon_Click"
|
||||
Background="Transparent" Orientation="Vertical"
|
||||
HorizontalAlignment="Center" Width="28" Margin="0,-2">
|
||||
<Image RenderOptions.BitmapScalingMode="HighQuality" Height="17" Margin="0,3,0,0"
|
||||
x:Name="CursorToolbarIconImage">
|
||||
<Image.Source>
|
||||
<DrawingImage>
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
|
||||
<GeometryDrawing x:Name="CursorIconGeometry" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<TextBlock x:Name="SelectionToolBarTextBlock" Text="{i18n:I18n Key=FloatingBar_Mouse}" Foreground="{DynamicResource FloatBarForeground}"
|
||||
FontSize="8"
|
||||
Margin="0,1,0,0" TextAlignment="Center"
|
||||
Style="{StaticResource AutoFitMainToolbarLabel8}" />
|
||||
</ikw:SimpleStackPanel>
|
||||
<ikw:SimpleStackPanel Name="Pen_Icon"
|
||||
MouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
||||
MouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
|
||||
MouseUp="PenIcon_Click"
|
||||
Background="Transparent" Orientation="Vertical"
|
||||
HorizontalAlignment="Center" Width="28" Margin="0,-2">
|
||||
<Image x:Name="PenIcon"
|
||||
RenderOptions.BitmapScalingMode="HighQuality" Height="17" Margin="0,3,0,0">
|
||||
<Image.Source>
|
||||
<DrawingImage>
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
|
||||
<GeometryDrawing x:Name="PenIconGeometry" Brush="{DynamicResource IconForeground}"
|
||||
Geometry="" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<TextBlock x:Name="PenToolbarTextBlock" Text="{i18n:I18n Key=FloatingBar_Annotate}" Foreground="{DynamicResource FloatBarForeground}" FontSize="8"
|
||||
Margin="0,1,0,0" TextAlignment="Center"
|
||||
Style="{StaticResource AutoFitMainToolbarLabel8}" />
|
||||
</ikw:SimpleStackPanel>
|
||||
<controls:ToolbarImageButton x:Name="Cursor_Icon"
|
||||
ButtonMouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
||||
ButtonMouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
|
||||
ButtonMouseUp="CursorIcon_Click"
|
||||
Label="{i18n:I18n Key=FloatingBar_Mouse}" />
|
||||
<controls:ToolbarImageButton x:Name="Pen_Icon"
|
||||
ButtonMouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
||||
ButtonMouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
|
||||
ButtonMouseUp="PenIcon_Click"
|
||||
Label="{i18n:I18n Key=FloatingBar_Annotate}" />
|
||||
|
||||
<!-- 快捷调色盘 - 双行显示模式 -->
|
||||
<ikw:SimpleStackPanel Name="QuickColorPalettePanel"
|
||||
@@ -8798,77 +8762,21 @@
|
||||
</Grid>
|
||||
</ikw:SimpleStackPanel>
|
||||
|
||||
<ikw:SimpleStackPanel Name="Eraser_Icon"
|
||||
MouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
||||
MouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
|
||||
MouseUp="EraserIcon_Click"
|
||||
Background="Transparent" Orientation="Vertical"
|
||||
HorizontalAlignment="Center" Margin="0,-2" Width="28">
|
||||
<Image x:Name="CircleEraserToolbarIconImage"
|
||||
RenderOptions.BitmapScalingMode="HighQuality" Height="17"
|
||||
Margin="0,3,0,0">
|
||||
<Image.Source>
|
||||
<DrawingImage>
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
|
||||
<GeometryDrawing x:Name="CircleEraserIconGeometry"
|
||||
Geometry="" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<TextBlock x:Name="CircleEraserToolbarTextBlock" Text="{i18n:I18n Key=FloatingBar_AreaEraser}" Foreground="{DynamicResource FloatBarForeground}"
|
||||
FontSize="8" Margin="0,1,0,0" TextAlignment="Center"
|
||||
Style="{StaticResource AutoFitMainToolbarLabel8}" />
|
||||
</ikw:SimpleStackPanel>
|
||||
<ikw:SimpleStackPanel Name="EraserByStrokes_Icon"
|
||||
MouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
||||
MouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
|
||||
MouseUp="EraserIconByStrokes_Click"
|
||||
Background="Transparent" Orientation="Vertical" Width="28"
|
||||
Margin="0,-2" HorizontalAlignment="Center">
|
||||
<Image x:Name="StrokeEraserToolbarIconImage"
|
||||
RenderOptions.BitmapScalingMode="HighQuality" Height="17"
|
||||
Margin="0,3,0,0">
|
||||
<Image.Source>
|
||||
<DrawingImage>
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
|
||||
<GeometryDrawing x:Name="StrokeEraserIconGeometry"
|
||||
Geometry="" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<TextBlock x:Name="InkEraserToolbarTextBlock" Text="{i18n:I18n Key=FloatingBar_StrokeEraser}" Foreground="{DynamicResource FloatBarForeground}"
|
||||
FontSize="8" Margin="0,1,0,0" TextAlignment="Center"
|
||||
Style="{StaticResource AutoFitMainToolbarLabel8}" />
|
||||
</ikw:SimpleStackPanel>
|
||||
<ikw:SimpleStackPanel Name="SymbolIconSelect"
|
||||
MouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
||||
MouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
|
||||
MouseUp="SymbolIconSelect_MouseUp" Background="Transparent"
|
||||
Orientation="Vertical" Margin="0,-2" Width="28"
|
||||
HorizontalAlignment="Center">
|
||||
<Image x:Name="LassoSelect" RenderOptions.BitmapScalingMode="HighQuality"
|
||||
Height="17" Margin="0,3,0,0">
|
||||
<Image.Source>
|
||||
<DrawingImage>
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
|
||||
<GeometryDrawing x:Name="LassoSelectIconGeometry"
|
||||
Geometry="" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<TextBlock x:Name="LassoToolToolbarTextBlock" Text="{i18n:I18n Key=FloatingBar_LassoSelect}" Foreground="{DynamicResource FloatBarForeground}"
|
||||
FontSize="8" Margin="0,1,0,0" TextAlignment="Center"
|
||||
Style="{StaticResource AutoFitMainToolbarLabel8}" />
|
||||
</ikw:SimpleStackPanel>
|
||||
<controls:ToolbarImageButton x:Name="Eraser_Icon"
|
||||
ButtonMouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
||||
ButtonMouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
|
||||
ButtonMouseUp="EraserIcon_Click"
|
||||
Label="{i18n:I18n Key=FloatingBar_AreaEraser}" />
|
||||
<controls:ToolbarImageButton x:Name="EraserByStrokes_Icon"
|
||||
ButtonMouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
||||
ButtonMouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
|
||||
ButtonMouseUp="EraserIconByStrokes_Click"
|
||||
Label="{i18n:I18n Key=FloatingBar_StrokeEraser}" />
|
||||
<controls:ToolbarImageButton x:Name="SymbolIconSelect"
|
||||
ButtonMouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
||||
ButtonMouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
|
||||
ButtonMouseUp="SymbolIconSelect_MouseUp"
|
||||
Label="{i18n:I18n Key=FloatingBar_LassoSelect}" />
|
||||
<ikw:SimpleStackPanel
|
||||
Name="ShapeDrawFloatingBarBtn"
|
||||
MouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
||||
|
||||
@@ -286,48 +286,48 @@ namespace Ink_Canvas
|
||||
switch (_currentToolMode)
|
||||
{
|
||||
case "cursor":
|
||||
CursorIconGeometry.Brush = new SolidColorBrush(selectedColor);
|
||||
PenIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
StrokeEraserIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
CircleEraserIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
LassoSelectIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Cursor_Icon.Icon.Brush = new SolidColorBrush(selectedColor);
|
||||
Pen_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
EraserByStrokes_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Eraser_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
SymbolIconSelect.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
break;
|
||||
case "pen":
|
||||
case "color":
|
||||
CursorIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
PenIconGeometry.Brush = new SolidColorBrush(selectedColor);
|
||||
StrokeEraserIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
CircleEraserIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
LassoSelectIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Cursor_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Pen_Icon.Icon.Brush = new SolidColorBrush(selectedColor);
|
||||
EraserByStrokes_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Eraser_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
SymbolIconSelect.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
break;
|
||||
case "eraser":
|
||||
CursorIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
PenIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
StrokeEraserIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
CircleEraserIconGeometry.Brush = new SolidColorBrush(selectedColor);
|
||||
LassoSelectIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Cursor_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Pen_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
EraserByStrokes_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Eraser_Icon.Icon.Brush = new SolidColorBrush(selectedColor);
|
||||
SymbolIconSelect.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
break;
|
||||
case "eraserByStrokes":
|
||||
CursorIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
PenIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
StrokeEraserIconGeometry.Brush = new SolidColorBrush(selectedColor);
|
||||
CircleEraserIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
LassoSelectIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Cursor_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Pen_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
EraserByStrokes_Icon.Icon.Brush = new SolidColorBrush(selectedColor);
|
||||
Eraser_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
SymbolIconSelect.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
break;
|
||||
case "select":
|
||||
CursorIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
PenIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
StrokeEraserIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
CircleEraserIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
LassoSelectIconGeometry.Brush = new SolidColorBrush(selectedColor);
|
||||
Cursor_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Pen_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
EraserByStrokes_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Eraser_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
SymbolIconSelect.Icon.Brush = new SolidColorBrush(selectedColor);
|
||||
break;
|
||||
default:
|
||||
// 默认情况,所有按钮都使用主题颜色
|
||||
CursorIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
PenIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
StrokeEraserIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
CircleEraserIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
LassoSelectIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Cursor_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Pen_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
EraserByStrokes_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Eraser_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
SymbolIconSelect.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -441,18 +441,18 @@ namespace Ink_Canvas
|
||||
{
|
||||
if (mode != "clear")
|
||||
{
|
||||
CursorIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
CursorIconGeometry.Geometry = Geometry.Parse(GetCorrectIcon("cursor", false));
|
||||
PenIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
PenIconGeometry.Geometry = Geometry.Parse(GetCorrectIcon("pen", false));
|
||||
StrokeEraserIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
StrokeEraserIconGeometry.Geometry =
|
||||
Cursor_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Cursor_Icon.Icon.Geometry = Geometry.Parse(GetCorrectIcon("cursor", false));
|
||||
Pen_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Pen_Icon.Icon.Geometry = Geometry.Parse(GetCorrectIcon("pen", false));
|
||||
EraserByStrokes_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
EraserByStrokes_Icon.Icon.Geometry =
|
||||
Geometry.Parse(GetCorrectIcon("eraserStroke", false));
|
||||
CircleEraserIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
CircleEraserIconGeometry.Geometry =
|
||||
Eraser_Icon.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
Eraser_Icon.Icon.Geometry =
|
||||
Geometry.Parse(GetCorrectIcon("eraserCircle", false));
|
||||
LassoSelectIconGeometry.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
LassoSelectIconGeometry.Geometry = Geometry.Parse(GetCorrectIcon("lassoSelect", false));
|
||||
SymbolIconSelect.Icon.Brush = new SolidColorBrush(FloatBarForegroundColor);
|
||||
SymbolIconSelect.Icon.Geometry = Geometry.Parse(GetCorrectIcon("lassoSelect", false));
|
||||
|
||||
bool isDarkThemeForButtons = Settings.Appearance.Theme == 1 ||
|
||||
(Settings.Appearance.Theme == 2 && !IsSystemThemeLight());
|
||||
@@ -509,8 +509,8 @@ namespace Ink_Canvas
|
||||
case "pen":
|
||||
case "color":
|
||||
{
|
||||
PenIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||
PenIconGeometry.Geometry = Geometry.Parse(GetCorrectIcon("pen", true));
|
||||
Pen_Icon.Icon.Brush = new SolidColorBrush(highlightColor);
|
||||
Pen_Icon.Icon.Geometry = Geometry.Parse(GetCorrectIcon("pen", true));
|
||||
BoardPen.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||
BoardPen.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||
BoardPenGeometry.Brush = new SolidColorBrush(Colors.GhostWhite);
|
||||
@@ -521,8 +521,8 @@ namespace Ink_Canvas
|
||||
}
|
||||
case "eraser":
|
||||
{
|
||||
CircleEraserIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||
CircleEraserIconGeometry.Geometry =
|
||||
Eraser_Icon.Icon.Brush = new SolidColorBrush(highlightColor);
|
||||
Eraser_Icon.Icon.Geometry =
|
||||
Geometry.Parse(GetCorrectIcon("eraserCircle", true));
|
||||
BoardEraser.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||
BoardEraser.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||
@@ -534,8 +534,8 @@ namespace Ink_Canvas
|
||||
}
|
||||
case "eraserByStrokes":
|
||||
{
|
||||
StrokeEraserIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||
StrokeEraserIconGeometry.Geometry =
|
||||
EraserByStrokes_Icon.Icon.Brush = new SolidColorBrush(highlightColor);
|
||||
EraserByStrokes_Icon.Icon.Geometry =
|
||||
Geometry.Parse(GetCorrectIcon("eraserStroke", true));
|
||||
BoardEraser.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||
BoardEraser.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||
@@ -547,8 +547,8 @@ namespace Ink_Canvas
|
||||
}
|
||||
case "select":
|
||||
{
|
||||
LassoSelectIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||
LassoSelectIconGeometry.Geometry =
|
||||
SymbolIconSelect.Icon.Brush = new SolidColorBrush(highlightColor);
|
||||
SymbolIconSelect.Icon.Geometry =
|
||||
Geometry.Parse(GetCorrectIcon("lassoSelect", true));
|
||||
BoardSelect.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||
BoardSelect.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||
@@ -560,8 +560,8 @@ namespace Ink_Canvas
|
||||
}
|
||||
case "cursor":
|
||||
{
|
||||
CursorIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||
CursorIconGeometry.Geometry =
|
||||
Cursor_Icon.Icon.Brush = new SolidColorBrush(highlightColor);
|
||||
Cursor_Icon.Icon.Geometry =
|
||||
Geometry.Parse(GetCorrectIcon("cursor", true));
|
||||
bool isDarkThemeForCursor = Settings.Appearance.Theme == 1 ||
|
||||
(Settings.Appearance.Theme == 2 && !IsSystemThemeLight());
|
||||
@@ -999,12 +999,11 @@ namespace Ink_Canvas
|
||||
/// </summary>
|
||||
/// <param name="sender">发送者</param>
|
||||
/// <param name="e">鼠标按钮事件参数</param>
|
||||
internal void SymbolIconSelect_MouseUp(object sender, MouseButtonEventArgs e)
|
||||
internal void SymbolIconSelect_MouseUp(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
if (lastBorderMouseDownObject is Panel panel)
|
||||
panel.Background = new SolidColorBrush(Colors.Transparent);
|
||||
if (sender == SymbolIconSelect && lastBorderMouseDownObject != SymbolIconSelect) return;
|
||||
|
||||
BtnSelect_Click(null, null);
|
||||
|
||||
@@ -1033,10 +1032,8 @@ namespace Ink_Canvas
|
||||
else if (sender is Border border)
|
||||
{
|
||||
lastBorderMouseDownObject = sender;
|
||||
// 对于快捷调色板的颜色球,不改变背景颜色,只添加透明度效果
|
||||
if (border.Name?.StartsWith("QuickColor") == true)
|
||||
{
|
||||
// 保存原始颜色并添加透明度
|
||||
if (border.Background is SolidColorBrush originalColor)
|
||||
{
|
||||
border.Background = new SolidColorBrush(Color.FromArgb(180, originalColor.Color.R, originalColor.Color.G, originalColor.Color.B));
|
||||
@@ -2146,7 +2143,6 @@ namespace Ink_Canvas
|
||||
{
|
||||
if (lastBorderMouseDownObject is Panel panel)
|
||||
panel.Background = new SolidColorBrush(Colors.Transparent);
|
||||
if (sender == Cursor_Icon && lastBorderMouseDownObject != Cursor_Icon) return;
|
||||
|
||||
// 禁用高级橡皮擦系统
|
||||
DisableEraserOverlay();
|
||||
@@ -2260,10 +2256,8 @@ namespace Ink_Canvas
|
||||
/// <param name="e">路由事件参数</param>
|
||||
internal void PenIcon_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
if (lastBorderMouseDownObject is Panel panel)
|
||||
panel.Background = new SolidColorBrush(Colors.Transparent);
|
||||
if (sender == Pen_Icon && lastBorderMouseDownObject != Pen_Icon) return;
|
||||
|
||||
// 如果当前有选中的图片元素,先取消选中
|
||||
if (currentSelectedElement != null)
|
||||
@@ -2617,11 +2611,6 @@ namespace Ink_Canvas
|
||||
/// <param name="e">路由事件参数</param>
|
||||
private void EraserIconByStrokes_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
if (lastBorderMouseDownObject is Panel panel)
|
||||
panel.Background = new SolidColorBrush(Colors.Transparent);
|
||||
if (sender == EraserByStrokes_Icon && lastBorderMouseDownObject != EraserByStrokes_Icon) return;
|
||||
|
||||
// 禁用高级橡皮擦系统
|
||||
DisableEraserOverlay();
|
||||
|
||||
|
||||
@@ -4730,54 +4730,54 @@ namespace Ink_Canvas
|
||||
|
||||
if (Settings.Appearance.UseLegacyFloatingBarUI)
|
||||
{
|
||||
CursorIconGeometry.Geometry = Geometry.Parse(
|
||||
Cursor_Icon.Icon.Geometry = Geometry.Parse(
|
||||
isCursorSolid
|
||||
? XamlGraphicsIconGeometries.LegacySolidCursorIcon
|
||||
: XamlGraphicsIconGeometries.LegacyLinedCursorIcon);
|
||||
|
||||
PenIconGeometry.Geometry = Geometry.Parse(
|
||||
Pen_Icon.Icon.Geometry = Geometry.Parse(
|
||||
isPenSolid
|
||||
? XamlGraphicsIconGeometries.LegacySolidPenIcon
|
||||
: XamlGraphicsIconGeometries.LegacyLinedPenIcon);
|
||||
|
||||
StrokeEraserIconGeometry.Geometry = Geometry.Parse(
|
||||
EraserByStrokes_Icon.Icon.Geometry = Geometry.Parse(
|
||||
isStrokeEraserSolid
|
||||
? XamlGraphicsIconGeometries.LegacySolidEraserStrokeIcon
|
||||
: XamlGraphicsIconGeometries.LegacyLinedEraserStrokeIcon);
|
||||
|
||||
CircleEraserIconGeometry.Geometry = Geometry.Parse(
|
||||
Eraser_Icon.Icon.Geometry = Geometry.Parse(
|
||||
isCircleEraserSolid
|
||||
? XamlGraphicsIconGeometries.LegacySolidEraserCircleIcon
|
||||
: XamlGraphicsIconGeometries.LegacyLinedEraserCircleIcon);
|
||||
|
||||
LassoSelectIconGeometry.Geometry = Geometry.Parse(
|
||||
SymbolIconSelect.Icon.Geometry = Geometry.Parse(
|
||||
isLassoSolid
|
||||
? XamlGraphicsIconGeometries.LegacySolidLassoSelectIcon
|
||||
: XamlGraphicsIconGeometries.LegacyLinedLassoSelectIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
CursorIconGeometry.Geometry = Geometry.Parse(
|
||||
Cursor_Icon.Icon.Geometry = Geometry.Parse(
|
||||
isCursorSolid
|
||||
? XamlGraphicsIconGeometries.SolidCursorIcon
|
||||
: XamlGraphicsIconGeometries.LinedCursorIcon);
|
||||
|
||||
PenIconGeometry.Geometry = Geometry.Parse(
|
||||
Pen_Icon.Icon.Geometry = Geometry.Parse(
|
||||
isPenSolid
|
||||
? XamlGraphicsIconGeometries.SolidPenIcon
|
||||
: XamlGraphicsIconGeometries.LinedPenIcon);
|
||||
|
||||
StrokeEraserIconGeometry.Geometry = Geometry.Parse(
|
||||
EraserByStrokes_Icon.Icon.Geometry = Geometry.Parse(
|
||||
isStrokeEraserSolid
|
||||
? XamlGraphicsIconGeometries.SolidEraserStrokeIcon
|
||||
: XamlGraphicsIconGeometries.LinedEraserStrokeIcon);
|
||||
|
||||
CircleEraserIconGeometry.Geometry = Geometry.Parse(
|
||||
Eraser_Icon.Icon.Geometry = Geometry.Parse(
|
||||
isCircleEraserSolid
|
||||
? XamlGraphicsIconGeometries.SolidEraserCircleIcon
|
||||
: XamlGraphicsIconGeometries.LinedEraserCircleIcon);
|
||||
|
||||
LassoSelectIconGeometry.Geometry = Geometry.Parse(
|
||||
SymbolIconSelect.Icon.Geometry = Geometry.Parse(
|
||||
isLassoSolid
|
||||
? XamlGraphicsIconGeometries.SolidLassoSelectIcon
|
||||
: XamlGraphicsIconGeometries.LinedLassoSelectIcon);
|
||||
|
||||
Reference in New Issue
Block a user