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"
|
enum-iterator = "2.1.0"
|
||||||
futures-util = "0.3.31"
|
futures-util = "0.3.31"
|
||||||
image = "0.25.1"
|
|
||||||
itertools = "0.13.0"
|
itertools = "0.13.0"
|
||||||
once_cell = "1.19.0"
|
once_cell = "1.19.0"
|
||||||
paste = "1"
|
paste = "1"
|
||||||
regex = "1"
|
regex = "1"
|
||||||
resvg = { version = "0.45.0", default-features = false, features = ["text"] }
|
|
||||||
unicode-segmentation = "1.12.0"
|
unicode-segmentation = "1.12.0"
|
||||||
usvg = { version = "0.45.0", default-features = false, features = ["text"] }
|
|
||||||
uuid = "1.10"
|
uuid = "1.10"
|
||||||
|
|
||||||
|
# WebView
|
||||||
wry = { version = "0.48.0", optional = true }
|
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
|
# Chart
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
rust_decimal = { version = "1.37.0", optional = true }
|
rust_decimal = { version = "1.37.0", optional = true }
|
||||||
|
|
||||||
# Markdown Parser
|
# Markdown Parser
|
||||||
markdown = "1.0.0-alpha.22"
|
markdown = "1.0.0"
|
||||||
|
|
||||||
# HTML Parser
|
# HTML Parser
|
||||||
html5ever = "0.27"
|
html5ever = "0.27"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ use std::sync::Arc;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use gpui::{Hsla, SharedString};
|
use gpui::{Hsla, SharedString};
|
||||||
use palette::FromColor as _;
|
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
|
@ -374,17 +373,7 @@ pub struct ThemeConfigColors {
|
||||||
/// Try to parse HEX color, `#RRGGBB` or `#RRGGBBAA`
|
/// Try to parse HEX color, `#RRGGBB` or `#RRGGBBAA`
|
||||||
fn try_parse_color(color: &str) -> Result<Hsla> {
|
fn try_parse_color(color: &str) -> Result<Hsla> {
|
||||||
let rgba = gpui::Rgba::try_from(color)?;
|
let rgba = gpui::Rgba::try_from(color)?;
|
||||||
let rgba = palette::rgb::Srgba::from_components((rgba.r, rgba.g, rgba.b, rgba.a));
|
Ok(rgba.into())
|
||||||
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)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Theme {
|
impl Theme {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue