improve:浮动栏按钮UI
优化按钮显示
This commit is contained in:
@@ -473,13 +473,23 @@ namespace Ink_Canvas
|
|||||||
highlightColor = Color.FromRgb(30, 58, 138); // Keep current color for light theme
|
highlightColor = Color.FromRgb(30, 58, 138); // Keep current color for light theme
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool useLegacyUI = Settings.Appearance.UseLegacyFloatingBarUI;
|
||||||
|
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case "pen":
|
case "pen":
|
||||||
case "color":
|
case "color":
|
||||||
{
|
{
|
||||||
PenIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
if (useLegacyUI)
|
||||||
PenIconGeometry.Geometry = Geometry.Parse(GetCorrectIcon("pen", true));
|
{
|
||||||
|
PenIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||||
|
PenIconGeometry.Geometry = Geometry.Parse(GetCorrectIcon("pen", false));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PenIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||||
|
PenIconGeometry.Geometry = Geometry.Parse(GetCorrectIcon("pen", true));
|
||||||
|
}
|
||||||
BoardPen.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
BoardPen.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||||
BoardPen.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
BoardPen.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||||
BoardPenGeometry.Brush = new SolidColorBrush(Colors.GhostWhite);
|
BoardPenGeometry.Brush = new SolidColorBrush(Colors.GhostWhite);
|
||||||
@@ -490,9 +500,18 @@ namespace Ink_Canvas
|
|||||||
}
|
}
|
||||||
case "eraser":
|
case "eraser":
|
||||||
{
|
{
|
||||||
CircleEraserIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
if (useLegacyUI)
|
||||||
CircleEraserIconGeometry.Geometry =
|
{
|
||||||
Geometry.Parse(GetCorrectIcon("eraserCircle", true));
|
CircleEraserIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||||
|
CircleEraserIconGeometry.Geometry =
|
||||||
|
Geometry.Parse(GetCorrectIcon("eraserCircle", false));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CircleEraserIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||||
|
CircleEraserIconGeometry.Geometry =
|
||||||
|
Geometry.Parse(GetCorrectIcon("eraserCircle", true));
|
||||||
|
}
|
||||||
BoardEraser.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
BoardEraser.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||||
BoardEraser.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
BoardEraser.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||||
BoardEraserGeometry.Brush = new SolidColorBrush(Colors.GhostWhite);
|
BoardEraserGeometry.Brush = new SolidColorBrush(Colors.GhostWhite);
|
||||||
@@ -503,9 +522,18 @@ namespace Ink_Canvas
|
|||||||
}
|
}
|
||||||
case "eraserByStrokes":
|
case "eraserByStrokes":
|
||||||
{
|
{
|
||||||
StrokeEraserIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
if (useLegacyUI)
|
||||||
StrokeEraserIconGeometry.Geometry =
|
{
|
||||||
Geometry.Parse(GetCorrectIcon("eraserStroke", true));
|
StrokeEraserIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||||
|
StrokeEraserIconGeometry.Geometry =
|
||||||
|
Geometry.Parse(GetCorrectIcon("eraserStroke", false));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StrokeEraserIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||||
|
StrokeEraserIconGeometry.Geometry =
|
||||||
|
Geometry.Parse(GetCorrectIcon("eraserStroke", true));
|
||||||
|
}
|
||||||
BoardEraser.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
BoardEraser.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||||
BoardEraser.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
BoardEraser.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||||
BoardEraserGeometry.Brush = new SolidColorBrush(Colors.GhostWhite);
|
BoardEraserGeometry.Brush = new SolidColorBrush(Colors.GhostWhite);
|
||||||
@@ -516,9 +544,18 @@ namespace Ink_Canvas
|
|||||||
}
|
}
|
||||||
case "select":
|
case "select":
|
||||||
{
|
{
|
||||||
LassoSelectIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
if (useLegacyUI)
|
||||||
LassoSelectIconGeometry.Geometry =
|
{
|
||||||
Geometry.Parse(GetCorrectIcon("lassoSelect", true));
|
LassoSelectIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||||
|
LassoSelectIconGeometry.Geometry =
|
||||||
|
Geometry.Parse(GetCorrectIcon("lassoSelect", false));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LassoSelectIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||||
|
LassoSelectIconGeometry.Geometry =
|
||||||
|
Geometry.Parse(GetCorrectIcon("lassoSelect", true));
|
||||||
|
}
|
||||||
BoardSelect.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
BoardSelect.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||||
BoardSelect.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
BoardSelect.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||||
BoardSelectGeometry.Brush = new SolidColorBrush(Colors.GhostWhite);
|
BoardSelectGeometry.Brush = new SolidColorBrush(Colors.GhostWhite);
|
||||||
@@ -529,9 +566,18 @@ namespace Ink_Canvas
|
|||||||
}
|
}
|
||||||
case "cursor":
|
case "cursor":
|
||||||
{
|
{
|
||||||
CursorIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
if (useLegacyUI)
|
||||||
CursorIconGeometry.Geometry =
|
{
|
||||||
Geometry.Parse(GetCorrectIcon("cursor", true));
|
CursorIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||||
|
CursorIconGeometry.Geometry =
|
||||||
|
Geometry.Parse(GetCorrectIcon("cursor", false));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CursorIconGeometry.Brush = new SolidColorBrush(highlightColor);
|
||||||
|
CursorIconGeometry.Geometry =
|
||||||
|
Geometry.Parse(GetCorrectIcon("cursor", true));
|
||||||
|
}
|
||||||
// 根据主题设置颜色
|
// 根据主题设置颜色
|
||||||
if (Settings.Appearance.Theme == 1) // 深色主题
|
if (Settings.Appearance.Theme == 1) // 深色主题
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user