move dock to seperated crate
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 1m24s
Rust / build (ubuntu-latest, stable) (pull_request) Failing after 1m16s

This commit is contained in:
2026-01-22 06:50:57 +07:00
parent dd6b93bd79
commit 2fa4436e2d
24 changed files with 138 additions and 162 deletions

View File

@@ -5,7 +5,7 @@ use std::sync::OnceLock;
use gpui::prelude::FluentBuilder;
use gpui::{
svg, App, InteractiveElement, IntoElement, MouseButton, ParentElement, RenderOnce,
SharedString, StatefulInteractiveElement, Styled, Window,
StatefulInteractiveElement, Styled, Window,
};
use linicon::{lookup_icon, IconType};
use theme::ActiveTheme;
@@ -70,15 +70,14 @@ impl RenderOnce for WindowControl {
.justify_center()
.items_center()
.rounded_full()
.size_6()
.map(|this| {
if is_gnome {
this.size_6()
.bg(cx.theme().tab_inactive_background)
this.bg(cx.theme().tab_inactive_background)
.hover(|this| this.bg(cx.theme().tab_hover_background))
.active(|this| this.bg(cx.theme().tab_active_background))
} else {
this.size_5()
.bg(cx.theme().ghost_element_background)
this.bg(cx.theme().ghost_element_background)
.hover(|this| this.bg(cx.theme().ghost_element_hover))
.active(|this| this.bg(cx.theme().ghost_element_active))
}
@@ -87,9 +86,7 @@ impl RenderOnce for WindowControl {
if let Some(Some(path)) = linux_controls().get(&self.kind).cloned() {
this.child(
svg()
.external_path(SharedString::from(
path.into_os_string().into_string().unwrap(),
))
.external_path(path.into_os_string().into_string().unwrap())
.map(|this| {
if cx.theme().is_dark() {
this.text_color(gpui::white())