chore: small fixes

This commit is contained in:
2025-03-12 16:44:44 +07:00
parent 8156d9d046
commit 0a7f0475a4
8 changed files with 217 additions and 81 deletions

View File

@@ -634,7 +634,18 @@ impl ButtonVariant {
_ => cx.theme().base.step(cx, ColorScaleStep::THREE),
};
let fg = cx.theme().base.step(cx, ColorScaleStep::ELEVEN);
let fg = match self {
ButtonVariant::Primary => match cx.theme().accent.name().to_string().as_str() {
"Sky" => cx.theme().base.darken(cx),
"Mint" => cx.theme().base.darken(cx),
"Lime" => cx.theme().base.darken(cx),
"Amber" => cx.theme().base.darken(cx),
"Yellow" => cx.theme().base.darken(cx),
_ => cx.theme().accent.step(cx, ColorScaleStep::ONE),
},
_ => cx.theme().base.step(cx, ColorScaleStep::ELEVEN),
};
let border = bg;
let underline = self.underline(window, cx);
let shadow = false;

View File

@@ -293,7 +293,10 @@ impl ColorScaleSet {
}
}
pub fn darken(&self, _cx: &App) -> Hsla {
self.light.step_12()
pub fn darken(&self, cx: &App) -> Hsla {
match cx.theme().appearance {
Appearance::Light => self.light.step_12(),
Appearance::Dark => self.dark.step_1(),
}
}
}

View File

@@ -11,7 +11,7 @@ use gpui::{
use std::rc::Rc;
const HEIGHT: Pixels = px(34.);
const TITLE_BAR_HEIGHT: Pixels = px(35.);
const TITLE_BAR_HEIGHT: Pixels = px(34.);
#[cfg(target_os = "macos")]
const TITLE_BAR_LEFT_PADDING: Pixels = px(80.);
#[cfg(not(target_os = "macos"))]