Added window snapping feature

This commit is contained in:
2025-08-24 16:07:48 +08:00
parent 709998ff9c
commit bc01fdf362
17 changed files with 1224 additions and 176 deletions

View File

@@ -68,6 +68,10 @@ type GeneralConfig struct {
EnableSystemTray bool `json:"enableSystemTray"` // 是否启用系统托盘
StartAtLogin bool `json:"startAtLogin"` // 开机启动设置
// 窗口吸附设置
EnableWindowSnap bool `json:"enableWindowSnap"` // 是否启用窗口吸附功能
SnapThreshold int `json:"snapThreshold"` // 吸附距离阈值(像素)
// 全局热键设置
EnableGlobalHotkey bool `json:"enableGlobalHotkey"` // 是否启用全局热键
GlobalHotkey HotkeyCombo `json:"globalHotkey"` // 全局热键组合
@@ -145,6 +149,8 @@ func NewDefaultAppConfig() *AppConfig {
DataPath: dataDir,
EnableSystemTray: true,
StartAtLogin: false,
EnableWindowSnap: true, // 默认启用窗口吸附
SnapThreshold: 15, // 默认15像素的吸附阈值
EnableGlobalHotkey: false,
GlobalHotkey: HotkeyCombo{
Ctrl: false,