将浮动工具栏使用新控件

This commit is contained in:
PrefacedCorg
2026-04-11 17:18:51 +08:00
parent bb82eb4891
commit dbac80509a
3 changed files with 11 additions and 2 deletions
@@ -43,6 +43,16 @@ namespace Ink_Canvas.Controls
public GeometryDrawing GeometryDrawing => IconGeometryInternal;
public static readonly DependencyProperty IconBrushProperty = DependencyProperty.Register(
nameof(IconBrush), typeof(Brush), typeof(ToolbarImageButton),
new PropertyMetadata(null, (d, e) => ((ToolbarImageButton)d).IconGeometryInternal.Brush = (Brush)e.NewValue));
public Brush IconBrush
{
get => (Brush)GetValue(IconBrushProperty);
set => SetValue(IconBrushProperty, value);
}
public new Brush Background
{
get => ButtonPanel.Background;
+1
View File
@@ -7939,6 +7939,7 @@
ButtonMouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
ButtonMouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
ButtonMouseUp="SymbolIconDelete_MouseUp"
IconBrush="{DynamicResource RedBrush}"
Label="{i18n:I18n Key=FloatingBar_Clear}" />
<ikw:SimpleStackPanel Name="StackPanelCanvasControls" Visibility="Visible"
Orientation="{Binding ElementName=StackPanelFloatingBar, Path=Orientation}">
-2
View File
@@ -173,8 +173,6 @@ namespace Ink_Canvas
SetAllFloatingBarButtonsToColor(FloatBarForegroundColor);
SymbolIconDelete.Icon.Brush = new SolidColorBrush(Color.FromRgb(239, 68, 68));
switch (_currentToolMode)
{
case "cursor":