community icon indicating copy to clipboard operation
community copied to clipboard

为不同的笔单独记录颜色选择

Open iceblock1313 opened this issue 2 months ago • 4 comments

检查清单 | Checklist

  • [x] 您确认此功能不存在于最新版本 | You confirm that this feature does not exist in the latest version.
  • [x] 您确认此功能有开发的必要 | You confirm that this feature is worth developing.
  • [x] 您确认此功能无法通过开发插件/自动化实现 | You confirm that this feature cannot be implemented through a plugin or automation.
  • [x] 您没有为软件提交 Pull Request 或开发插件的能力 | You are unable to submit a Pull Request or develop a plugin for this software.
  • [x] 您了解开发者无法及时回复和及时开发 | You understand that developers may not respond or implement features promptly.
  • [ ] 我已经仔细阅读过选项里的内容,并且知道这个选项不用勾选。 | I have carefully read the options and know that this option does not need to be checked.

功能描述 | Description

笔,荧光笔、激光笔都独自记录颜色选择,而不是通用一个颜色。

需求动机 | Motivation

白板内写字得用白色,激光笔要用红色,但是切换笔后还需要反复切换颜色,很不方便。

期望设计 | Expected Design

No response

其他补充信息 | Additional Info

No response

上传有关文件 | Upload relevant files

No response

iceblock1313 avatar Sep 14 '26 15:09 iceblock1313

(

暂不考虑

CJKmkp avatar Sep 16 '26 04:09 CJKmkp

@CJKmkp 白板有没有快捷调色盘

AstrZero avatar Sep 17 '26 05:09 AstrZero

@CJKmkp 白板有没有快捷调色盘

no

CJKmkp avatar Sep 17 '26 10:09 CJKmkp

功能评估:部分已实现

  • 环境:Windows 11,ICC net10@91b13e1f,代码审查
  • 当前状态:
    • ✅ 荧光笔已有独立颜色记忆(highlighterColor 变量)
    • ✅ 普通笔在桌面/白板模式各有独立颜色记忆
    • ❌ 激光笔与普通笔共享颜色记忆变量,不符合需求

技术分析:

代码位置:Ink Canvas\MainWindow_cs\MW_Colors.cs

// 第 668-679 行
private void CheckLastColor(int inkColor, bool isHighlighter = false)
{
    if (isHighlighter)
    {
        highlighterColor = inkColor;  // 荧光笔独立变量
    }
    else
    {
        // 普通笔和激光笔共享这些变量
        if (currentMode == 0) lastDesktopInkColor = inkColor;
        else lastBoardInkColor = inkColor;
    }
}

激光笔颜色点击事件(1119-1189 行)调用 CheckLastColor(colorId) 时没有标识自己是激光笔,所以走 else 分支与普通笔共享变量。

实现可行性:技术上可行,改动较小:

  1. 新增 lastDesktopLaserColor 和 lastBoardLaserColor 两个变量
  2. 修改 CheckLastColor() 增加 isLaserPen 参数区分三种笔
  3. 激光笔颜色点击事件传递 isLaserPen=true
  4. CheckColorTheme() 恢复颜色时使用独立变量

不过维护者已标记为"暂不考虑",建议等待维护者重新评估优先级。

🤖 SuperDevBot(AI)自动回复,结论仅供维护者参考。

JSR-Bot avatar Nov 08 '26 09:11 JSR-Bot