New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add mojave_dark and hilited_corner_radius option #242
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
效果讚
代碼再看看
@@ -207,7 +207,7 @@ preset_color_schemes: | |||
author: LIANG Hai | |||
horizontal: true # 水平排列 | |||
inline_preedit: true #单行显示,false双行显示 | |||
candidate_format: "%c\u2005%@\u2005" # 编号 %c 和候选词 %@ 前后的空间 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
後加空格似乎是爲了保持與候選註釋的間距
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我看过代码不是的. https://github.com/rime/squirrel/blob/master/SquirrelPanel.m#L375 和 https://github.com/rime/squirrel/blob/master/SquirrelPanel.m#L384
重绘的时候是
造成右边空间比左边空间大了。
另外一个证据是有些主题后面加了\u2005有些主题后面没有。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
后面那个空格是主题作者需要的。这样做逻辑上并不正确,但在作者常用的情景下,正好能为候选文字和其后的注释之间加入合适的空白,使文字两边的空白视觉上对称。
严谨的做法是在非空注释前面加空白,可能实现没现在这样简便。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好吧,还有注释的存在。
@@ -57,27 +58,33 @@ - (void) setCornerRadius:(double)cornerRadius { | |||
|
|||
- (void)drawRect:(NSRect)dirtyRect { | |||
if (self.highlightedStripColor && !NSIsEmptyRect(self.highlightedRect)) { | |||
CGFloat edgeWidth = self.edgeInset.width + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要驗證是否影響原來的無邊框設計。
印象裏由於浮點數誤差,亮塊與窗體邊緣之間會出現細小縫隙。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个我验证过。没有问题。我把这个 +1 放在 70 行了。因为之前计算从来没有涉及+1,这里直接给edge加一下,会造成扩大1像素。
不如放在后面检测的时候,只是用于判断,不放进边框中。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
会造成扩大1像素
是不是说会影响圆角的绘制?
代码这样处理不错,不过我注意到,过去高亮部分是占满高度(或宽度)的,
上文的截图却留出了一道黑边,视觉上不同于原来的“无边框”效果。
所以再确认一下,这是暗色模式的副作用,还是绘制的高亮区域变小了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#250 :: Dark 模式的黑邊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
發現這個改動仍會影響原來的無邊框設計。
亮塊與窗體邊緣之間會出現細小縫隙。
詳見 #240 (comment)
效果赞!正好也在研究改成一样的效果 另外建议左右间距再各加一个空格 |
Merged. Thanks. |
效果赞,正在打包中。 |
增加系统暗色主题和高亮圆角
同时修正配置错误 #240
原系统主题效果: