Skip to content
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

外观模式支持跟随系统切换 #5854

Closed
88250 opened this issue Sep 9, 2022 · 5 comments
Closed

外观模式支持跟随系统切换 #5854

88250 opened this issue Sep 9, 2022 · 5 comments
Assignees
Milestone

Comments

@88250
Copy link
Member

88250 commented Sep 9, 2022

https://ld246.com/article/1662710907148

移除主界面顶栏上的切换按钮。

@88250 88250 changed the title 外观默认跟随系统切换 外观模式跟随系统切换 Sep 9, 2022
@Zuoqiu-Yingyi
Copy link
Contributor

解决方案: 可以参考 nativeTheme | Electron

const { nativeTheme } = require('electron');
nativeTheme.themeSource = 'system';
nativeTheme.shouldUseDarkColors; // 通过该 boolean 属性可以判断当前操作系统是否启用的暗色 UI

@88250 88250 added this to the 2.2.2 milestone Sep 25, 2022
@88250 88250 changed the title 外观模式跟随系统切换 外观模式支持跟随系统切换 Sep 25, 2022
Vanessa219 added a commit that referenced this issue Sep 25, 2022
Vanessa219 added a commit that referenced this issue Sep 25, 2022
@aptexd
Copy link

aptexd commented Sep 26, 2022

还是不建议轻易移除常用功能的,最好向前兼容
等发布后肯定会有人提议加回来或加开关
再就笔记软件作为一个文字处理为主的软件
“在长时间写作时,在明亮系统中启用黑色主题”是个很正常的需求

@88250
Copy link
Member Author

88250 commented Sep 26, 2022

@aptexd 放在主界面顶栏的话会有冲突,需要两个开关才能控制,所以只能移除了。考虑到跟随系统设置之后一般不会再切换为特定的模式,所以放到设置是比较合理的,其他带有该功能的软件基本也是这样设计的。

@Zuoqiu-Yingyi
Copy link
Contributor

@Vanessa219 在移除主题模式切换功能时貌似也将 #iconMoon 图标移除了, 希望这些图标不要移除, 因为自定义主题引用了该图标~

@Vanessa219
Copy link
Member

看看能不能在自定义 js 里面加一下吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants