improve:主题切换
This commit is contained in:
@@ -421,6 +421,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\new-icons\gesture.png" />
|
<Resource Include="Resources\new-icons\gesture.png" />
|
||||||
|
<Resource Include="Resources\new-icons\gesture_white.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\new-icons\gesture-enabled.png" />
|
<Resource Include="Resources\new-icons\gesture-enabled.png" />
|
||||||
|
|||||||
@@ -9434,7 +9434,7 @@
|
|||||||
|
|
||||||
MouseUp="TwoFingerGestureBorder_MouseUp" Background="Transparent"
|
MouseUp="TwoFingerGestureBorder_MouseUp" Background="Transparent"
|
||||||
Orientation="Vertical" HorizontalAlignment="Center" Width="36" Margin="0">
|
Orientation="Vertical" HorizontalAlignment="Center" Width="36" Margin="0">
|
||||||
<Image x:Name="EnableTwoFingerGestureBtn" Source="/Resources/new-icons/gesture.png"
|
<Image x:Name="EnableTwoFingerGestureBtn" Source="{DynamicResource GestureIcon}"
|
||||||
RenderOptions.BitmapScalingMode="HighQuality" Width="28" Height="18"
|
RenderOptions.BitmapScalingMode="HighQuality" Width="28" Height="18"
|
||||||
Margin="0,3,0,0" />
|
Margin="0,3,0,0" />
|
||||||
<TextBlock x:Name="gestureiconText" Text="手势" Foreground="{DynamicResource FloatBarForeground}" FontSize="8"
|
<TextBlock x:Name="gestureiconText" Text="手势" Foreground="{DynamicResource FloatBarForeground}" FontSize="8"
|
||||||
|
|||||||
@@ -65,6 +65,9 @@ namespace Ink_Canvas
|
|||||||
// 刷新图片选中栏图标
|
// 刷新图片选中栏图标
|
||||||
RefreshImageSelectionIcons();
|
RefreshImageSelectionIcons();
|
||||||
|
|
||||||
|
// 刷新手势按钮图标
|
||||||
|
RefreshGestureButtonIcon();
|
||||||
|
|
||||||
RefreshFloatingBarHighlightColors();
|
RefreshFloatingBarHighlightColors();
|
||||||
|
|
||||||
if (autoSwitchIcon)
|
if (autoSwitchIcon)
|
||||||
@@ -109,6 +112,9 @@ namespace Ink_Canvas
|
|||||||
// 刷新图片选中栏图标
|
// 刷新图片选中栏图标
|
||||||
RefreshImageSelectionIcons();
|
RefreshImageSelectionIcons();
|
||||||
|
|
||||||
|
// 刷新手势按钮图标
|
||||||
|
RefreshGestureButtonIcon();
|
||||||
|
|
||||||
RefreshFloatingBarHighlightColors();
|
RefreshFloatingBarHighlightColors();
|
||||||
|
|
||||||
if (autoSwitchIcon)
|
if (autoSwitchIcon)
|
||||||
@@ -492,6 +498,21 @@ namespace Ink_Canvas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 刷新手势按钮图标
|
||||||
|
/// </summary>
|
||||||
|
private void RefreshGestureButtonIcon()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 调用手势按钮颜色和图标更新方法,该方法会根据当前主题和手势状态设置正确的图标
|
||||||
|
CheckEnableTwoFingerGestureBtnColorPrompt();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 刷新其他窗口的主题
|
/// 刷新其他窗口的主题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -80,8 +80,7 @@ namespace Ink_Canvas
|
|||||||
// 多指书写模式启用时,手势功能被禁用
|
// 多指书写模式启用时,手势功能被禁用
|
||||||
TwoFingerGestureSimpleStackPanel.Opacity = 0.5;
|
TwoFingerGestureSimpleStackPanel.Opacity = 0.5;
|
||||||
TwoFingerGestureSimpleStackPanel.IsHitTestVisible = false;
|
TwoFingerGestureSimpleStackPanel.IsHitTestVisible = false;
|
||||||
EnableTwoFingerGestureBtn.Source =
|
EnableTwoFingerGestureBtn.Source = (BitmapImage)Application.Current.FindResource("GestureIcon");
|
||||||
new BitmapImage(new Uri("/Resources/new-icons/gesture.png", UriKind.Relative));
|
|
||||||
|
|
||||||
// 根据主题设置颜色
|
// 根据主题设置颜色
|
||||||
if (Settings.Appearance.Theme == 1) // 深色主题
|
if (Settings.Appearance.Theme == 1) // 深色主题
|
||||||
@@ -117,8 +116,7 @@ namespace Ink_Canvas
|
|||||||
|
|
||||||
if (hasGestureEnabled)
|
if (hasGestureEnabled)
|
||||||
{
|
{
|
||||||
EnableTwoFingerGestureBtn.Source =
|
EnableTwoFingerGestureBtn.Source = (BitmapImage)Application.Current.FindResource("GestureIconEnabled");
|
||||||
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);
|
BoardGestureGeometry.Brush = new SolidColorBrush(Colors.GhostWhite);
|
||||||
@@ -130,8 +128,7 @@ namespace Ink_Canvas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
EnableTwoFingerGestureBtn.Source =
|
EnableTwoFingerGestureBtn.Source = (BitmapImage)Application.Current.FindResource("GestureIcon");
|
||||||
new BitmapImage(new Uri("/Resources/new-icons/gesture.png", UriKind.Relative));
|
|
||||||
|
|
||||||
// 根据主题设置颜色
|
// 根据主题设置颜色
|
||||||
if (Settings.Appearance.Theme == 1) // 深色主题
|
if (Settings.Appearance.Theme == 1) // 深色主题
|
||||||
|
|||||||
@@ -145,4 +145,8 @@
|
|||||||
<BitmapImage x:Key="HandMoveIcon" UriSource="/Resources/new-icons/hand-move_white.png"/>
|
<BitmapImage x:Key="HandMoveIcon" UriSource="/Resources/new-icons/hand-move_white.png"/>
|
||||||
<BitmapImage x:Key="ZoomIcon" UriSource="/Resources/new-icons/zoom_white.png"/>
|
<BitmapImage x:Key="ZoomIcon" UriSource="/Resources/new-icons/zoom_white.png"/>
|
||||||
<BitmapImage x:Key="RotateIcon" UriSource="/Resources/new-icons/rotate_white.png"/>
|
<BitmapImage x:Key="RotateIcon" UriSource="/Resources/new-icons/rotate_white.png"/>
|
||||||
|
|
||||||
|
<!-- 浮动栏手势按钮图标资源 - 深色主题 -->
|
||||||
|
<BitmapImage x:Key="GestureIcon" UriSource="/Resources/new-icons/gesture_white.png"/>
|
||||||
|
<BitmapImage x:Key="GestureIconEnabled" UriSource="/Resources/new-icons/gesture-enabled.png"/>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -145,4 +145,8 @@
|
|||||||
<BitmapImage x:Key="HandMoveIcon" UriSource="/Resources/new-icons/hand-move.png"/>
|
<BitmapImage x:Key="HandMoveIcon" UriSource="/Resources/new-icons/hand-move.png"/>
|
||||||
<BitmapImage x:Key="ZoomIcon" UriSource="/Resources/new-icons/zoom.png"/>
|
<BitmapImage x:Key="ZoomIcon" UriSource="/Resources/new-icons/zoom.png"/>
|
||||||
<BitmapImage x:Key="RotateIcon" UriSource="/Resources/new-icons/rotate.png"/>
|
<BitmapImage x:Key="RotateIcon" UriSource="/Resources/new-icons/rotate.png"/>
|
||||||
|
|
||||||
|
<!-- 浮动栏手势按钮图标资源 - 浅色主题 -->
|
||||||
|
<BitmapImage x:Key="GestureIcon" UriSource="/Resources/new-icons/gesture.png"/>
|
||||||
|
<BitmapImage x:Key="GestureIconEnabled" UriSource="/Resources/new-icons/gesture-enabled.png"/>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
Reference in New Issue
Block a user