优化
This commit is contained in:
@@ -4671,33 +4671,12 @@
|
|||||||
<ikw:SimpleStackPanel Orientation="Horizontal">
|
<ikw:SimpleStackPanel Orientation="Horizontal">
|
||||||
<Border CornerRadius="5,5,5,5" Background="{DynamicResource BoardFloatBarBackground}" Margin="0,0,5,0">
|
<Border CornerRadius="5,5,5,5" Background="{DynamicResource BoardFloatBarBackground}" Margin="0,0,5,0">
|
||||||
<ikw:SimpleStackPanel Orientation="Horizontal">
|
<ikw:SimpleStackPanel Orientation="Horizontal">
|
||||||
<Border Width="60" Height="50" MouseDown="Border_MouseDown" Name="BoardGesture"
|
<controls:BoardToolbarButton x:Name="BoardGesture"
|
||||||
MouseUp="TwoFingerGestureBorder_MouseUp" CornerRadius="5,0,0,5"
|
Position="First"
|
||||||
Background="{DynamicResource BoardFloatBarBackground}"
|
Label="{i18n:I18n Key=Board_Gesture}"
|
||||||
Opacity="1" BorderThickness="1,1,0,1" BorderBrush="{DynamicResource BoardFloatBarBorderBrush}">
|
IconGeometry="F0 M24,24z M0,0z M7.82154,10.0753L7.82154,3.74613C7.82154,3.06603 8.08946,2.40655 8.57377,1.92224 9.05808,1.43793 9.70726,1.17001 10.3977,1.17001 11.0881,1.17001 11.7372,1.43793 12.2216,1.92224 12.7059,2.40655 12.9738,3.05573 12.9738,3.74613L12.9738,6.37308C13.1415,6.33947 13.3139,6.32225 13.489,6.32225 14.1794,6.32225 14.8286,6.59016 15.3129,7.07447 15.4484,7.21001 15.567,7.35845 15.6675,7.5171 15.9551,7.40916 16.2634,7.35269 16.5803,7.35269 17.2707,7.35269 17.9199,7.62061 18.4042,8.10492 18.5461,8.24683 18.6695,8.4029 18.7729,8.57001 19.6856,8.26338 20.7674,8.45871 21.4647,9.15599 21.949,9.6403 22.2169,10.2998 22.2169,10.9799L22.2169,15.6169C22.2169,17.5438 21.4647,19.3574 20.1045,20.7176 18.7443,22.0778 16.9307,22.83 15.0038,22.83L13.149,22.83 13.1799,22.8094 12.8398,22.8094C11.7682,22.7579 10.7068,22.4694 9.75878,21.9541 8.70773,21.3874 7.81124,20.563 7.15175,19.5738L6.94566,19.2647C6.60562,18.7494 5.49273,16.8019 3.52458,13.3087 3.19484,12.7213 3.1021,12.0412 3.27727,11.3818 3.45245,10.7326 3.86463,10.1761 4.44168,9.83608 5.00842,9.49604 5.66791,9.35177 6.31709,9.43421 6.86548,9.50385 7.39181,9.7279 7.82154,10.0753z M10.037,3.38547C10.1297,3.28243 10.2637,3.23091 10.3977,3.23091 10.5316,3.23091 10.6656,3.29273 10.7583,3.38547 10.8614,3.47821 10.9129,3.61217 10.9129,3.74613L10.9129,11.4745C10.9129,12.0412 11.3766,12.5049 11.9433,12.5049 12.5101,12.5049 12.9738,12.0412 12.9738,11.4745L12.9738,8.89836C12.9738,8.7644 13.0356,8.63045 13.1283,8.53771 13.2211,8.43466 13.355,8.38314 13.489,8.38314 13.623,8.38314 13.7569,8.44497 13.8497,8.53771 13.9527,8.63045 14.0042,8.7644 14.0042,8.89836L14.0042,11.4745C14.0042,12.0412 14.4679,12.5049 15.0347,12.5049 15.6014,12.5049 16.0651,12.0412 16.0651,11.4745L16.0651,9.92881C16.0651,9.79485 16.1269,9.66089 16.2197,9.56815 16.3124,9.46511 16.4464,9.41359 16.5803,9.41359 16.7143,9.41359 16.8483,9.47541 16.941,9.56815 17.044,9.66089 17.0956,9.79485 17.0956,9.92881L17.0956,10.5869C17.0752,10.7163 17.0646,10.8477 17.0646,10.9799 17.0646,11.0661 17.0754,11.1499 17.0956,11.2301L17.0956,11.4745C17.0956,12.0412 17.5593,12.5049 18.126,12.5049 18.6928,12.5049 19.1565,12.0412 19.1565,11.4745L19.1565,10.8128C19.1834,10.7399 19.2266,10.6727 19.2801,10.6192 19.4759,10.4234 19.8159,10.4234 20.0117,10.6192 20.1148,10.712 20.1663,10.8459 20.1663,10.9799L20.1663,15.6169C20.1663,16.9977 19.6408,18.296 18.6618,19.2647 17.6829,20.2333 16.3949,20.7691 15.0141,20.7691L13.1593,20.7691C12.3143,20.7691 11.4796,20.5527 10.7274,20.1509 9.98548,19.749 9.3363,19.1616 8.8726,18.4506L8.66651,18.1415C8.35737,17.6675 7.23419,15.7096 5.31756,12.2988 5.24543,12.1752 5.23512,12.0412 5.26604,11.9073 5.30725,11.7733 5.38969,11.6703 5.50304,11.5981 5.66791,11.4951 5.874,11.4539 6.06978,11.4745 6.26557,11.5054 6.45105,11.5878 6.59531,11.7321L8.11007,13.2469C8.49419,13.631 9.10425,13.648 9.50833,13.2978 9.73651,13.1084 9.88244,12.8229 9.88244,12.5049L9.88244,3.74613C9.88244,3.61217,9.94426,3.47821,10.037,3.38547z M2.99905,6.31195L1.78313,4.65293 2.61779,4.04497C3.46275,3.4267,4.37985,2.89087,5.33817,2.46838L6.27587,2.0459 7.12084,3.93162 6.18313,4.3541C5.35878,4.72506,4.56533,5.17846,3.83372,5.71429L2.99905,6.32225 2.99905,6.31195z M18.2806,5.20935L19.1565,5.75549 20.259,4.01404 19.3831,3.4679C18.1157,2.67446,16.7452,2.0768,15.3026,1.68523L14.303,1.41731 13.7672,3.40607 14.7667,3.67399C16.0033,4.00373,17.1883,4.51895,18.2806,5.20935z"
|
||||||
<Grid Margin="6,6,6,4">
|
ButtonMouseDown="Border_MouseDown"
|
||||||
<Image VerticalAlignment="Top"
|
ButtonMouseUp="TwoFingerGestureBorder_MouseUp" />
|
||||||
RenderOptions.BitmapScalingMode="HighQuality" Height="20" Width="20">
|
|
||||||
<Image.Source>
|
|
||||||
<DrawingImage>
|
|
||||||
<DrawingImage.Drawing>
|
|
||||||
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
|
|
||||||
<GeometryDrawing x:Name="BoardGestureGeometry"
|
|
||||||
Brush="{DynamicResource IconForeground}"
|
|
||||||
Geometry="F0 M24,24z M0,0z M7.82154,10.0753L7.82154,3.74613C7.82154,3.06603 8.08946,2.40655 8.57377,1.92224 9.05808,1.43793 9.70726,1.17001 10.3977,1.17001 11.0881,1.17001 11.7372,1.43793 12.2216,1.92224 12.7059,2.40655 12.9738,3.05573 12.9738,3.74613L12.9738,6.37308C13.1415,6.33947 13.3139,6.32225 13.489,6.32225 14.1794,6.32225 14.8286,6.59016 15.3129,7.07447 15.4484,7.21001 15.567,7.35845 15.6675,7.5171 15.9551,7.40916 16.2634,7.35269 16.5803,7.35269 17.2707,7.35269 17.9199,7.62061 18.4042,8.10492 18.5461,8.24683 18.6695,8.4029 18.7729,8.57001 19.6856,8.26338 20.7674,8.45871 21.4647,9.15599 21.949,9.6403 22.2169,10.2998 22.2169,10.9799L22.2169,15.6169C22.2169,17.5438 21.4647,19.3574 20.1045,20.7176 18.7443,22.0778 16.9307,22.83 15.0038,22.83L13.149,22.83 13.1799,22.8094 12.8398,22.8094C11.7682,22.7579 10.7068,22.4694 9.75878,21.9541 8.70773,21.3874 7.81124,20.563 7.15175,19.5738L6.94566,19.2647C6.60562,18.7494 5.49273,16.8019 3.52458,13.3087 3.19484,12.7213 3.1021,12.0412 3.27727,11.3818 3.45245,10.7326 3.86463,10.1761 4.44168,9.83608 5.00842,9.49604 5.66791,9.35177 6.31709,9.43421 6.86548,9.50385 7.39181,9.7279 7.82154,10.0753z M10.037,3.38547C10.1297,3.28243 10.2637,3.23091 10.3977,3.23091 10.5316,3.23091 10.6656,3.29273 10.7583,3.38547 10.8614,3.47821 10.9129,3.61217 10.9129,3.74613L10.9129,11.4745C10.9129,12.0412 11.3766,12.5049 11.9433,12.5049 12.5101,12.5049 12.9738,12.0412 12.9738,11.4745L12.9738,8.89836C12.9738,8.7644 13.0356,8.63045 13.1283,8.53771 13.2211,8.43466 13.355,8.38314 13.489,8.38314 13.623,8.38314 13.7569,8.44497 13.8497,8.53771 13.9527,8.63045 14.0042,8.7644 14.0042,8.89836L14.0042,11.4745C14.0042,12.0412 14.4679,12.5049 15.0347,12.5049 15.6014,12.5049 16.0651,12.0412 16.0651,11.4745L16.0651,9.92881C16.0651,9.79485 16.1269,9.66089 16.2197,9.56815 16.3124,9.46511 16.4464,9.41359 16.5803,9.41359 16.7143,9.41359 16.8483,9.47541 16.941,9.56815 17.044,9.66089 17.0956,9.79485 17.0956,9.92881L17.0956,10.5869C17.0752,10.7163 17.0646,10.8477 17.0646,10.9799 17.0646,11.0661 17.0754,11.1499 17.0956,11.2301L17.0956,11.4745C17.0956,12.0412 17.5593,12.5049 18.126,12.5049 18.6928,12.5049 19.1565,12.0412 19.1565,11.4745L19.1565,10.8128C19.1834,10.7399 19.2266,10.6727 19.2801,10.6192 19.4759,10.4234 19.8159,10.4234 20.0117,10.6192 20.1148,10.712 20.1663,10.8459 20.1663,10.9799L20.1663,15.6169C20.1663,16.9977 19.6408,18.296 18.6618,19.2647 17.6829,20.2333 16.3949,20.7691 15.0141,20.7691L13.1593,20.7691C12.3143,20.7691 11.4796,20.5527 10.7274,20.1509 9.98548,19.749 9.3363,19.1616 8.8726,18.4506L8.66651,18.1415C8.35737,17.6675 7.23419,15.7096 5.31756,12.2988 5.24543,12.1752 5.23512,12.0412 5.26604,11.9073 5.30725,11.7733 5.38969,11.6703 5.50304,11.5981 5.66791,11.4951 5.874,11.4539 6.06978,11.4745 6.26557,11.5054 6.45105,11.5878 6.59531,11.7321L8.11007,13.2469C8.49419,13.631 9.10425,13.648 9.50833,13.2978 9.73651,13.1084 9.88244,12.8229 9.88244,12.5049L9.88244,3.74613C9.88244,3.61217,9.94426,3.47821,10.037,3.38547z M2.99905,6.31195L1.78313,4.65293 2.61779,4.04497C3.46275,3.4267,4.37985,2.89087,5.33817,2.46838L6.27587,2.0459 7.12084,3.93162 6.18313,4.3541C5.35878,4.72506,4.56533,5.17846,3.83372,5.71429L2.99905,6.32225 2.99905,6.31195z M18.2806,5.20935L19.1565,5.75549 20.259,4.01404 19.3831,3.4679C18.1157,2.67446,16.7452,2.0768,15.3026,1.68523L14.303,1.41731 13.7672,3.40607 14.7667,3.67399C16.0033,4.00373,17.1883,4.51895,18.2806,5.20935z" />
|
|
||||||
<GeometryDrawing x:Name="BoardGestureGeometry2"
|
|
||||||
Brush="{DynamicResource IconForeground}"
|
|
||||||
Geometry="F0 M24,24z M0,0z " />
|
|
||||||
</DrawingGroup>
|
|
||||||
</DrawingImage.Drawing>
|
|
||||||
</DrawingImage>
|
|
||||||
</Image.Source>
|
|
||||||
</Image>
|
|
||||||
<TextBlock Text="{i18n:I18n Key=Board_Gesture}" Foreground="{DynamicResource FloatBarForeground}" VerticalAlignment="Bottom"
|
|
||||||
Name="BoardGestureLabel"
|
|
||||||
HorizontalAlignment="Center" FontSize="12" />
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
<Border>
|
<Border>
|
||||||
<Grid Width="0" Margin="0,0,0,5" RenderTransformOrigin="0,1">
|
<Grid Width="0" Margin="0,0,0,5" RenderTransformOrigin="0,1">
|
||||||
<Border ClipToBounds="True" x:Name="BoardTwoFingerGestureBorder"
|
<Border ClipToBounds="True" x:Name="BoardTwoFingerGestureBorder"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace Ink_Canvas
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用於浮動工具欄的"手勢"按鈕和白板工具欄的"手勢"按鈕的點擊事件
|
/// 用於浮動工具欄的"手勢"按鈕和白板工具欄的"手勢"按鈕的點擊事件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void TwoFingerGestureBorder_MouseUp(object sender, RoutedEventArgs e)
|
private void TwoFingerGestureBorder_MouseUp(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
if (TwoFingerGestureBorder.Visibility == Visibility.Visible)
|
if (TwoFingerGestureBorder.Visibility == Visibility.Visible)
|
||||||
{
|
{
|
||||||
@@ -93,12 +93,12 @@ namespace Ink_Canvas
|
|||||||
new BitmapImage(new Uri(gestureIconPath, UriKind.Relative));
|
new BitmapImage(new Uri(gestureIconPath, UriKind.Relative));
|
||||||
|
|
||||||
BoardGesture.Background = new SolidColorBrush(boardBgColor);
|
BoardGesture.Background = new SolidColorBrush(boardBgColor);
|
||||||
BoardGestureGeometry.Brush = new SolidColorBrush(boardIconColor);
|
BoardGesture.IconGeometryDrawing.Brush = new SolidColorBrush(boardIconColor);
|
||||||
BoardGestureGeometry2.Brush = new SolidColorBrush(boardIconColor);
|
BoardGesture.IconGeometryDrawing2.Brush = new SolidColorBrush(boardIconColor);
|
||||||
BoardGestureLabel.Foreground = new SolidColorBrush(boardTextColor);
|
BoardGesture.Foreground = new SolidColorBrush(boardTextColor);
|
||||||
BoardGesture.BorderBrush = new SolidColorBrush(boardBorderColor);
|
BoardGesture.BorderBrush = new SolidColorBrush(boardBorderColor);
|
||||||
BoardGestureGeometry.Geometry = Geometry.Parse(XamlGraphicsIconGeometries.DisabledGestureIcon);
|
BoardGesture.IconGeometryDrawing.Geometry = Geometry.Parse(XamlGraphicsIconGeometries.DisabledGestureIcon);
|
||||||
BoardGestureGeometry2.Geometry = Geometry.Parse("F0 M24,24z M0,0z");
|
BoardGesture.IconGeometryDrawing2.Geometry = Geometry.Parse("F0 M24,24z M0,0z");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -110,12 +110,12 @@ namespace Ink_Canvas
|
|||||||
new BitmapImage(new Uri("/Resources/new-icons/gesture-enabled.png", UriKind.Relative));
|
new BitmapImage(new Uri("/Resources/new-icons/gesture-enabled.png", UriKind.Relative));
|
||||||
|
|
||||||
BoardGesture.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
BoardGesture.Background = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||||
BoardGestureGeometry.Brush = new SolidColorBrush(Colors.GhostWhite);
|
BoardGesture.IconGeometryDrawing.Brush = new SolidColorBrush(Colors.GhostWhite);
|
||||||
BoardGestureGeometry2.Brush = new SolidColorBrush(Colors.GhostWhite);
|
BoardGesture.IconGeometryDrawing2.Brush = new SolidColorBrush(Colors.GhostWhite);
|
||||||
BoardGestureLabel.Foreground = new SolidColorBrush(Colors.GhostWhite);
|
BoardGesture.Foreground = new SolidColorBrush(Colors.GhostWhite);
|
||||||
BoardGesture.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
BoardGesture.BorderBrush = new SolidColorBrush(Color.FromRgb(37, 99, 235));
|
||||||
BoardGestureGeometry.Geometry = Geometry.Parse(XamlGraphicsIconGeometries.EnabledGestureIcon);
|
BoardGesture.IconGeometryDrawing.Geometry = Geometry.Parse(XamlGraphicsIconGeometries.EnabledGestureIcon);
|
||||||
BoardGestureGeometry2.Geometry = Geometry.Parse("F0 M24,24z M0,0z " + XamlGraphicsIconGeometries.EnabledGestureIconBadgeCheck);
|
BoardGesture.IconGeometryDrawing2.Geometry = Geometry.Parse("F0 M24,24z M0,0z " + XamlGraphicsIconGeometries.EnabledGestureIconBadgeCheck);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -123,12 +123,12 @@ namespace Ink_Canvas
|
|||||||
new BitmapImage(new Uri(gestureIconPath, UriKind.Relative));
|
new BitmapImage(new Uri(gestureIconPath, UriKind.Relative));
|
||||||
|
|
||||||
BoardGesture.Background = new SolidColorBrush(boardBgColor);
|
BoardGesture.Background = new SolidColorBrush(boardBgColor);
|
||||||
BoardGestureGeometry.Brush = new SolidColorBrush(boardIconColor);
|
BoardGesture.IconGeometryDrawing.Brush = new SolidColorBrush(boardIconColor);
|
||||||
BoardGestureGeometry2.Brush = new SolidColorBrush(boardIconColor);
|
BoardGesture.IconGeometryDrawing2.Brush = new SolidColorBrush(boardIconColor);
|
||||||
BoardGestureLabel.Foreground = new SolidColorBrush(boardTextColor);
|
BoardGesture.Foreground = new SolidColorBrush(boardTextColor);
|
||||||
BoardGesture.BorderBrush = new SolidColorBrush(boardBorderColor);
|
BoardGesture.BorderBrush = new SolidColorBrush(boardBorderColor);
|
||||||
BoardGestureGeometry.Geometry = Geometry.Parse(XamlGraphicsIconGeometries.DisabledGestureIcon);
|
BoardGesture.IconGeometryDrawing.Geometry = Geometry.Parse(XamlGraphicsIconGeometries.DisabledGestureIcon);
|
||||||
BoardGestureGeometry2.Geometry = Geometry.Parse("F0 M24,24z M0,0z");
|
BoardGesture.IconGeometryDrawing2.Geometry = Geometry.Parse("F0 M24,24z M0,0z");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,8 @@
|
|||||||
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
|
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
|
||||||
<GeometryDrawing x:Name="IconGeometryInternal"
|
<GeometryDrawing x:Name="IconGeometryInternal"
|
||||||
Brush="{DynamicResource IconForeground}" />
|
Brush="{DynamicResource IconForeground}" />
|
||||||
|
<GeometryDrawing x:Name="IconGeometryInternal2"
|
||||||
|
Brush="{DynamicResource IconForeground}" />
|
||||||
</DrawingGroup>
|
</DrawingGroup>
|
||||||
</DrawingImage.Drawing>
|
</DrawingImage.Drawing>
|
||||||
</DrawingImage>
|
</DrawingImage>
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ namespace Ink_Canvas.Controls
|
|||||||
public event MouseButtonEventHandler ButtonMouseUp;
|
public event MouseButtonEventHandler ButtonMouseUp;
|
||||||
|
|
||||||
public GeometryDrawing IconGeometryDrawing => IconGeometryInternal;
|
public GeometryDrawing IconGeometryDrawing => IconGeometryInternal;
|
||||||
|
public GeometryDrawing IconGeometryDrawing2 => IconGeometryInternal2;
|
||||||
|
|
||||||
public Border ButtonBorderControl => ButtonBorder;
|
public Border ButtonBorderControl => ButtonBorder;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user