title_bar: Remove window control bg color in normal mode. (#1720)

Fix #1710 introduced bug.
This commit is contained in:
Jason Lee 2025-12-01 21:56:15 +08:00 committed by GitHub
parent 43e1029b9f
commit 64aa975c77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -132,7 +132,7 @@ impl ControlIcon {
#[inline] #[inline]
fn hover_bg(&self, cx: &App) -> Hsla { fn hover_bg(&self, cx: &App) -> Hsla {
if self.is_close() { if self.is_close() {
cx.theme().danger_hover cx.theme().danger
} else { } else {
cx.theme().secondary_hover cx.theme().secondary_hover
} }
@ -153,7 +153,6 @@ impl RenderOnce for ControlIcon {
let is_linux = cfg!(target_os = "linux"); let is_linux = cfg!(target_os = "linux");
let is_windows = cfg!(target_os = "windows"); let is_windows = cfg!(target_os = "windows");
let hover_fg = self.hover_fg(cx); let hover_fg = self.hover_fg(cx);
let bg = cx.theme().title_bar;
let hover_bg = self.hover_bg(cx); let hover_bg = self.hover_bg(cx);
let active_bg = self.active_bg(cx); let active_bg = self.active_bg(cx);
let icon = self.clone(); let icon = self.clone();
@ -171,7 +170,6 @@ impl RenderOnce for ControlIcon {
.justify_center() .justify_center()
.content_center() .content_center()
.items_center() .items_center()
.bg(bg)
.text_color(cx.theme().foreground) .text_color(cx.theme().foreground)
.hover(|style| style.bg(hover_bg).text_color(hover_fg)) .hover(|style| style.bg(hover_bg).text_color(hover_fg))
.active(|style| style.bg(active_bg).text_color(hover_fg)) .active(|style| style.bg(active_bg).text_color(hover_fg))