Skip to content

Commit

Permalink
修复深色模式下文件和菜单页背景颜色问题 #12
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonVanke committed Dec 2, 2022
1 parent edfe814 commit 22dc5e0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cement-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
/* 菜单边框 */
--window-border: 1px solid #e9e9e9;
/* 侧边栏活跃文件背景颜色 */
--active-file-bg-color: #eee;
--active-file-bg-color: #777;
/* 侧边栏活跃文件文字颜色 */
--active-file-text-color: inherit;
/* 侧边栏活跃文件边框颜色 */
Expand Down Expand Up @@ -127,6 +127,11 @@
/*最近文件单数背景*/
--recent-file-panel-n-bg-color: rgb(66, 66, 66);
--recent-file-panel-n-color: #e1e1e1;

/*操作按钮*/
--titlebar-bg-color: #999;
--titlebar-top-bg-color: var(--color-primary);

}

/*
Expand Down
5 changes: 5 additions & 0 deletions cement.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@
/*最近文件单数背景*/
--recent-file-panel-n-bg-color: #c0c0c0;
--recent-file-panel-n-color: var(--color-black);

/*操作按钮*/
--titlebar-bg-color: #EDEDED;
--titlebar-top-bg-color: var(--color-primary-container);

}

/*
Expand Down
21 changes: 21 additions & 0 deletions cement/cement.css
Original file line number Diff line number Diff line change
Expand Up @@ -863,4 +863,25 @@ Mac 上的一些细节优化

.mac-os-11 #file-library-search-input:focus ~ #ty-sidebar-search-back-btn {
padding-top: 8px;
}

/*一个偶然发现的置顶功能*/
.always-on-top #w-unpin {
background: var(--titlebar-top-bg-color);
}

#top-titlebar .toolbar-icon.btn.hover, #top-titlebar .toolbar-icon.btn:hover {
background-color: var(--titlebar-bg-color);
}

/*源码模式按钮背景颜色*/
.typora-sourceview-on #toggle-sourceview-btn {
background: var(--active-file-bg-color);
opacity: .2;
transition: opacity, padding 200ms ease-in-out;
}

.typora-sourceview-on #toggle-sourceview-btn:hover {
background: var(--active-file-bg-color);
opacity: .5;
}

0 comments on commit 22dc5e0

Please sign in to comment.