diff --git a/src/renderer/src/assets/styles/scrollbar.scss b/src/renderer/src/assets/styles/scrollbar.scss index f846ae0c90..555e68f334 100644 --- a/src/renderer/src/assets/styles/scrollbar.scss +++ b/src/renderer/src/assets/styles/scrollbar.scss @@ -9,6 +9,7 @@ --scrollbar-width: 6px; --scrollbar-height: 6px; + --scrollbar-thumb-radius: 10px; } body[theme-mode='light'] { @@ -28,7 +29,7 @@ body[theme-mode='light'] { } ::-webkit-scrollbar-thumb { - border-radius: 10px; + border-radius: var(--scrollbar-thumb-radius); background: var(--color-scrollbar-thumb); &:hover { background: var(--color-scrollbar-thumb-hover); @@ -60,3 +61,17 @@ pre:not(.shiki)::-webkit-scrollbar-thumb { .hide-scrollbar * { scrollbar-width: none !important; } + +/* FIXME: antd select 启用 popupMatchSelectWidth 时,会给虚拟列表叠加一个滚动条, + * 前面的样式会被覆盖,因此在此强制统一样式。 */ +.rc-virtual-list-scrollbar { + width: var(--scrollbar-width) !important; +} + +.rc-virtual-list-scrollbar-thumb { + border-radius: var(--scrollbar-thumb-radius) !important; + background: var(--color-scrollbar-thumb) !important; + &:hover { + background: var(--color-scrollbar-thumb-hover) !important; + } +}