emacs-eaf / eaf-org-previewer

Real-time Org-mode previewer
GNU General Public License v3.0
6 stars 2 forks source link

无法退出暗黑预览 #2

Closed lemyx closed 1 year ago

lemyx commented 1 year ago

Describe the bug

Expected behavior

Versions (please complete the following info):

Additional context *eaf*输出如下

qt.webenginecontext: 

GL Type: desktop
Surface Type: OpenGL
Surface Profile: CompatibilityProfile
Surface Version: 4.6
QSG RHI Backend: OpenGL
Using Supported QSG Backend: yes
Using Software Dynamic GL: no
Using Multithreaded OpenGL: yes

Init Parameters:
  *  application-name eaf.py 
  *  browser-subprocess-path /home/mawen/.local/lib/python3.10/site-packages/PyQt6/Qt6/libexec/QtWebEngineProcess 
  *  create-default-gl-context  
  *  disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture 
  *  disable-setuid-sandbox  
  *  disable-speech-api  
  *  disable-web-security  
  *  enable-features NetworkServiceInProcess,TracingServiceInProcess 
  *  enable-gpu-rasterization  
  *  enable-native-gpu-memory-buffers  
  *  enable-threaded-compositing  
  *  ignore-gpu-blocklist  
  *  in-process-gpu  
  *  use-gl desktop 
manateelazycat commented 1 year ago

你先把 eaf-org-dark-mode 这个变量改成 "light" 试一下吧。

manateelazycat commented 1 year ago

@ententent 已经被 https://github.com/emacs-eaf/eaf-org-previewer/commit/c55367506966dc19dfd470b39bd04ad1361aa8aa 这个补丁修复。

截图 2023-06-01 08-14-33

这个问题的本质不是 EAF 的主题代码没有生效,而是 org-html-export-to-html 这个函数在生成 html 时写死了CSS样式,导致EAF即使切换主题也没法修改写死的颜色。

新的补丁在加载Html文件后, 根据Emacs的主题动态调整了文字和背景色, 现在应该没问题了。

如果发现有新的样式没有改变, 可以在 https://github.com/emacs-eaf/eaf-org-previewer/blob/c55367506966dc19dfd470b39bd04ad1361aa8aa/buffer.py#L60 这里修改 tag 的名字, 欢迎发送补丁。