From 1764be8a302e5d6247160a4ba73567e0e19492c5 Mon Sep 17 00:00:00 2001 From: Phantom <59059173+EurFelux@users.noreply.github.com> Date: Mon, 25 Aug 2025 19:49:23 +0800 Subject: [PATCH] style(selection-toolbar): use primary color for selection toolbar (#9515) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * style(selection-toolbar): 统一使用主色变量并移除冗余样式 移除重复定义的颜色变量,统一使用 --color-primary 作为悬停状态的主色 * style: 移除重复的 --color-primary 变量定义 --- src/renderer/src/assets/styles/selection-toolbar.scss | 6 ------ .../src/windows/selection/toolbar/SelectionToolbar.tsx | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/renderer/src/assets/styles/selection-toolbar.scss b/src/renderer/src/assets/styles/selection-toolbar.scss index 23f0edfb34..cf3c672c45 100644 --- a/src/renderer/src/assets/styles/selection-toolbar.scss +++ b/src/renderer/src/assets/styles/selection-toolbar.scss @@ -6,10 +6,8 @@ html { :root { // Basic Colors - --color-primary: #00b96b; --color-error: #f44336; - --selection-toolbar-color-primary: var(--color-primary); --selection-toolbar-color-error: var(--color-error); // Toolbar @@ -54,8 +52,6 @@ html { --selection-toolbar-button-text-color: rgba(255, 255, 245, 0.9); --selection-toolbar-button-icon-color: var(--selection-toolbar-button-text-color); - --selection-toolbar-button-text-color-hover: var(--selection-toolbar-color-primary); - --selection-toolbar-button-icon-color-hover: var(--selection-toolbar-color-primary); --selection-toolbar-button-bgcolor: transparent; // default: transparent --selection-toolbar-button-bgcolor-hover: #333333; } @@ -72,7 +68,5 @@ html { --selection-toolbar-button-text-color: rgba(0, 0, 0, 1); --selection-toolbar-button-icon-color: var(--selection-toolbar-button-text-color); - --selection-toolbar-button-text-color-hover: var(--selection-toolbar-color-primary); - --selection-toolbar-button-icon-color-hover: var(--selection-toolbar-color-primary); --selection-toolbar-button-bgcolor-hover: rgba(0, 0, 0, 0.04); } diff --git a/src/renderer/src/windows/selection/toolbar/SelectionToolbar.tsx b/src/renderer/src/windows/selection/toolbar/SelectionToolbar.tsx index 54f0fcd085..6e54d26186 100644 --- a/src/renderer/src/windows/selection/toolbar/SelectionToolbar.tsx +++ b/src/renderer/src/windows/selection/toolbar/SelectionToolbar.tsx @@ -374,10 +374,10 @@ const ActionButton = styled.div` } &:hover { .btn-icon { - color: var(--selection-toolbar-button-icon-color-hover); + color: var(--color-primary); } .btn-title { - color: var(--selection-toolbar-button-text-color-hover); + color: var(--color-primary); } background-color: var(--selection-toolbar-button-bgcolor-hover); }