chore: Update GPUI and other crates. (#1136)
This commit is contained in:
parent
63f61dca04
commit
9a389224f3
3 changed files with 1406 additions and 1134 deletions
2514
Cargo.lock
generated
2514
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -62,24 +62,27 @@ anyhow.workspace = true
|
|||
|
||||
enum-iterator = "2.1.0"
|
||||
futures-util = "0.3.31"
|
||||
image = "0.25.1"
|
||||
itertools = "0.13.0"
|
||||
once_cell = "1.19.0"
|
||||
paste = "1"
|
||||
regex = "1"
|
||||
resvg = { version = "0.45.0", default-features = false, features = ["text"] }
|
||||
unicode-segmentation = "1.12.0"
|
||||
usvg = { version = "0.45.0", default-features = false, features = ["text"] }
|
||||
uuid = "1.10"
|
||||
|
||||
# WebView
|
||||
wry = { version = "0.48.0", optional = true }
|
||||
palette = "0.7.6"
|
||||
|
||||
# SvgImg
|
||||
image = { version = "0.25.1", default-features = false, features = ["png"] }
|
||||
resvg = { version = "0.45.0", default-features = false, features = ["text"] }
|
||||
usvg = { version = "0.45.0", default-features = false, features = ["text"] }
|
||||
|
||||
# Chart
|
||||
num-traits = "0.2"
|
||||
rust_decimal = { version = "1.37.0", optional = true }
|
||||
|
||||
# Markdown Parser
|
||||
markdown = "1.0.0-alpha.22"
|
||||
markdown = "1.0.0"
|
||||
|
||||
# HTML Parser
|
||||
html5ever = "0.27"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ use std::sync::Arc;
|
|||
|
||||
use anyhow::Result;
|
||||
use gpui::{Hsla, SharedString};
|
||||
use palette::FromColor as _;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
|
@ -374,17 +373,7 @@ pub struct ThemeConfigColors {
|
|||
/// Try to parse HEX color, `#RRGGBB` or `#RRGGBBAA`
|
||||
fn try_parse_color(color: &str) -> Result<Hsla> {
|
||||
let rgba = gpui::Rgba::try_from(color)?;
|
||||
let rgba = palette::rgb::Srgba::from_components((rgba.r, rgba.g, rgba.b, rgba.a));
|
||||
let hsla = palette::Hsla::from_color(rgba);
|
||||
|
||||
let hsla = gpui::hsla(
|
||||
hsla.hue.into_positive_degrees() / 360.,
|
||||
hsla.saturation,
|
||||
hsla.lightness,
|
||||
hsla.alpha,
|
||||
);
|
||||
|
||||
Ok(hsla)
|
||||
Ok(rgba.into())
|
||||
}
|
||||
|
||||
impl Theme {
|
||||
|
|
|
|||
Loading…
Reference in a new issue