tumashu / posframe

Pop a posframe (just a child-frame) at point, posframe is a **GNU ELPA** package!
443 stars 57 forks source link

建议: 提供一个选项让 posframe 的字体和 Emacs frame 保持一致 #119

Closed manateelazycat closed 1 year ago

manateelazycat commented 1 year ago

最近给 blink-search 以及 lsp-bridge 都提交了类似的补丁: https://github.com/manateelazycat/blink-search/commit/ec2abafbb5361380e025afaa16f84d96fc689900

代码实例:

(with-selected-frame posframe
    (set-frame-font (with-selected-frame parent-frame
                      (face-attribute 'default :font))))

这段代码的意思是, 让弹出的 posframe 直接继承 parent frame 的字体设置, 就不会出现 4k 屏幕下, Emacs frame 是用户自定义覆盖的字体设置(大小翻倍), 但是弹出的 frame 字体只有一半大小。

大佬考虑加一个这样的选项吗? 开发能力弱的 Emacser 很难自己修复这个问题, 因为不太熟悉 posframe 的结构, 就不打补丁了。

附件是基于 posframe 开发的 blink-search 修复前后的截图。

截图 2022-12-11 20-42-59

截图 2022-12-11 20-45-27

tumashu commented 1 year ago

https://github.com/tumashu/posframe/commit/66ee1b5e3a43fed949c209aece1be1fd86399a01

试试这个 commit 行不行,我木有 4k 屏幕,没法测试。

manateelazycat commented 1 year ago

测试了, 管用的。