Skip to content

Commit

Permalink
删除一些多余注释
Browse files Browse the repository at this point in the history
  • Loading branch information
吕小布 committed Dec 18, 2024
1 parent e6189d9 commit b4b5a7b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion data/squirrel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ style:
#comment_font_point: 16

#下面是动画有关
a_test_switch: "未读到本地配置"
candidate_animation_on: true
candidate_animation_type: "easeOut" #default, easeIn,easeOut, easeInEaseOut, linear
candidate_animation_duration: 0.2
Expand Down
11 changes: 6 additions & 5 deletions sources/SquirrelPanel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ final class SquirrelPanel: NSPanel {
contentView.addSubview(view)
contentView.addSubview(view.textView)
//显示原本TextView的边界方便调试
view.textView.wantsLayer = true // 确保textView使用layer进行绘制
view.textView.layer?.borderWidth = 2.0 // 设置边框宽度
view.textView.layer?.borderColor = NSColor.orange.cgColor // 设置边框颜色为橙色
// view.textView.isHidden = true
// view.textView.wantsLayer = true // 确保textView使用layer进行绘制
// view.textView.layer?.borderWidth = 2.0 // 设置边框宽度
// view.textView.layer?.borderColor = NSColor.orange.cgColor // 设置边框颜色为橙色
view.textView.isHidden = true

self.contentView = contentView
//存储lines的容器
Expand Down Expand Up @@ -360,7 +360,8 @@ final class SquirrelPanel: NSPanel {
// lines.append(separatedLine)
}

//手动加空格,加在非首选项的前面
/// 在每个候选项前面加三个默认格式的空格,后面加一个,竟意外地跟原版视图对齐了,原因未知,尝试过上面attrs格式的空格,但是反而跟原版对不齐,
/// 悬而未决,暂时搁置
for i in 0..<lines.count {
lines[i].insert(NSAttributedString(string: " "), at: 0)
lines[i].append(NSAttributedString(string: " "))
Expand Down
2 changes: 0 additions & 2 deletions sources/SquirrelTheme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ final class SquirrelTheme {
private(set) var showPaging = false

//动画相关
private(set) var aTestSwitch = false
private(set) var candidateAnimationOn = true
private(set) var candidateAnimationType = "easeOut"
private(set) var candidateAnimationDuration: CGFloat = 0.2
Expand Down Expand Up @@ -236,7 +235,6 @@ final class SquirrelTheme {
var commentFontSize = config.getDouble("style/comment_font_point")

//动画
aTestSwitch ?= config.getBool("style/a_test_switch")
candidateAnimationOn ?= config.getBool("style/candidate_animation_on")
candidateAnimationType ?= config.getString("style/candidate_animation_type")
candidateAnimationDuration ?= config.getDouble("style/candidate_animation_duration")
Expand Down

0 comments on commit b4b5a7b

Please sign in to comment.