feat: 添加白板模式自动全屏功能
- 新增"白板模式自动全屏"设置选项 - 进入白板模式时自动全屏,退出时恢复工作区域大小 - 需配合"避免全屏助手"功能使用 - 用户可独立控制白板模式的全屏行为
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
---
|
||||
inclusion: always
|
||||
---
|
||||
|
||||
# 中文交流规则
|
||||
|
||||
当用户使用中文与Kiro交流时,请遵循以下规则:
|
||||
|
||||
## 语言使用
|
||||
- 始终使用中文回复用户的中文消息
|
||||
- 保持自然、友好的中文表达方式
|
||||
- 使用适合开发者的技术术语和表达
|
||||
|
||||
## 交流风格
|
||||
- 保持专业但不失亲和力的语调
|
||||
- 使用简洁明了的表达方式
|
||||
- 避免过于正式或生硬的表达
|
||||
|
||||
## 技术内容
|
||||
- 代码注释可以使用中文
|
||||
- 变量名和函数名仍使用英文(遵循编程规范)
|
||||
- 技术解释使用中文,但保留英文技术术语的准确性
|
||||
|
||||
## 文档和说明
|
||||
- 创建的文档可以使用中文
|
||||
- README文件可以提供中文版本
|
||||
- 错误信息和日志可以包含中文说明
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"kiroAgent.configureMCP": "Disabled"
|
||||
}
|
||||
@@ -2246,6 +2246,19 @@
|
||||
<TextBlock TextWrapping="Wrap" Foreground="#a1a1aa"
|
||||
Text="# 避免画布全屏,重启icc后生效。" />
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Foreground="#fafafa" Text="白板模式自动全屏" VerticalAlignment="Center"
|
||||
FontSize="14" Margin="0,0,16,0" />
|
||||
<Border Background="#27272a" CornerRadius="4" Padding="6,2">
|
||||
<TextBlock Foreground="#a1a1aa" Text="需启用避免全屏助手" FontSize="11" />
|
||||
</Border>
|
||||
<ui:ToggleSwitch OnContent="" OffContent=""
|
||||
Name="ToggleSwitchIsEnableAvoidFullScreenHelperForWhiteboard"
|
||||
Toggled="ToggleSwitchIsEnableAvoidFullScreenHelperForWhiteboard_OnToggled"
|
||||
IsOn="False" FontFamily="Microsoft YaHei UI" FontWeight="Bold" />
|
||||
</ui:SimpleStackPanel>
|
||||
<TextBlock TextWrapping="Wrap" Foreground="#a1a1aa"
|
||||
Text="# 进入白板模式时自动全屏,退出时恢复到工作区域大小。" />
|
||||
<ui:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
|
||||
<TextBlock Foreground="#fafafa" Text="启用EdgeGestureUtil"
|
||||
VerticalAlignment="Center"
|
||||
|
||||
@@ -3015,6 +3015,22 @@ namespace Ink_Canvas
|
||||
ClearStrokes(true);
|
||||
RestoreStrokes(true);
|
||||
|
||||
// 退出白板模式时取消全屏
|
||||
if (Settings.Advanced.IsEnableAvoidFullScreenHelper && Settings.Advanced.IsEnableAvoidFullScreenHelperForWhiteboard)
|
||||
{
|
||||
// 恢复为非画板模式,重新启用全屏限制
|
||||
AvoidFullScreenHelper.SetBoardMode(false);
|
||||
|
||||
Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
// 退出白板模式,恢复到工作区域大小
|
||||
var workingArea = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea;
|
||||
MainWindow.MoveWindow(new WindowInteropHelper(this).Handle,
|
||||
workingArea.Left, workingArea.Top,
|
||||
workingArea.Width, workingArea.Height, true);
|
||||
}), DispatcherPriority.ApplicationIdle);
|
||||
}
|
||||
|
||||
// 在屏幕模式下恢复基础浮动栏的显示
|
||||
ViewboxFloatingBar.Visibility = Visibility.Visible;
|
||||
|
||||
@@ -3068,6 +3084,19 @@ namespace Ink_Canvas
|
||||
|
||||
RestoreStrokes();
|
||||
|
||||
// 进入白板模式时全屏
|
||||
if (Settings.Advanced.IsEnableAvoidFullScreenHelper && Settings.Advanced.IsEnableAvoidFullScreenHelperForWhiteboard)
|
||||
{
|
||||
// 设置为画板模式,允许全屏操作
|
||||
AvoidFullScreenHelper.SetBoardMode(true);
|
||||
Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
MainWindow.MoveWindow(new WindowInteropHelper(this).Handle, 0, 0,
|
||||
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width,
|
||||
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height, true);
|
||||
}), DispatcherPriority.ApplicationIdle);
|
||||
}
|
||||
|
||||
ViewboxFloatingBar.Visibility = Visibility.Collapsed;
|
||||
|
||||
BtnSwitch.Content = "屏幕";
|
||||
|
||||
@@ -2182,6 +2182,7 @@ namespace Ink_Canvas
|
||||
Settings.Advanced.EdgeGestureUtilOnlyAffectBlackboardMode = false;
|
||||
Settings.Advanced.IsEnableFullScreenHelper = false;
|
||||
Settings.Advanced.IsEnableAvoidFullScreenHelper = false;
|
||||
Settings.Advanced.IsEnableAvoidFullScreenHelperForWhiteboard = false;
|
||||
Settings.Advanced.IsEnableForceFullScreen = false;
|
||||
Settings.Advanced.IsEnableDPIChangeDetection = false;
|
||||
Settings.Advanced.IsEnableResolutionChangeDetection = false;
|
||||
@@ -2442,6 +2443,13 @@ namespace Ink_Canvas
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleSwitchIsEnableAvoidFullScreenHelperForWhiteboard_OnToggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
Settings.Advanced.IsEnableAvoidFullScreenHelperForWhiteboard = ToggleSwitchIsEnableAvoidFullScreenHelperForWhiteboard.IsOn;
|
||||
SaveSettingsToFile();
|
||||
}
|
||||
|
||||
private void ToggleSwitchIsEnableEdgeGestureUtil_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!isLoaded) return;
|
||||
|
||||
@@ -805,6 +805,7 @@ namespace Ink_Canvas
|
||||
ToggleSwitchIsEnableResolutionChangeDetection.IsOn = Settings.Advanced.IsEnableResolutionChangeDetection;
|
||||
ToggleSwitchIsEnableDPIChangeDetection.IsOn = Settings.Advanced.IsEnableDPIChangeDetection;
|
||||
ToggleSwitchIsEnableAvoidFullScreenHelper.IsOn = Settings.Advanced.IsEnableAvoidFullScreenHelper;
|
||||
ToggleSwitchIsEnableAvoidFullScreenHelperForWhiteboard.IsOn = Settings.Advanced.IsEnableAvoidFullScreenHelperForWhiteboard;
|
||||
ToggleSwitchIsAutoBackupBeforeUpdate.IsOn = Settings.Advanced.IsAutoBackupBeforeUpdate;
|
||||
ToggleSwitchIsAutoBackupEnabled.IsOn = Settings.Advanced.IsAutoBackupEnabled;
|
||||
|
||||
|
||||
@@ -582,6 +582,9 @@ namespace Ink_Canvas
|
||||
[JsonProperty("isEnableAvoidFullScreenHelper")]
|
||||
public bool IsEnableAvoidFullScreenHelper { get; set; }
|
||||
|
||||
[JsonProperty("isEnableAvoidFullScreenHelperForWhiteboard")]
|
||||
public bool IsEnableAvoidFullScreenHelperForWhiteboard { get; set; }
|
||||
|
||||
[JsonProperty("isAutoBackupBeforeUpdate")]
|
||||
public bool IsAutoBackupBeforeUpdate { get; set; } = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user