mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 10:40:54 +00:00
WIP
This commit is contained in:
parent
3ba8857491
commit
5dad97779a
5 changed files with 15 additions and 0 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -7378,6 +7378,7 @@ dependencies = [
|
|||
"anyhow",
|
||||
"gpui2",
|
||||
"log",
|
||||
"refineable",
|
||||
"rust-embed",
|
||||
"serde",
|
||||
"settings",
|
||||
|
|
|
@ -22,6 +22,8 @@ use gpui2_macros::styleable_helpers;
|
|||
use refineable::{Refineable, RefinementCascade};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub type StyleCascade = RefinementCascade<Style>;
|
||||
|
||||
#[derive(Clone, Refineable, Debug)]
|
||||
#[refineable(debug)]
|
||||
pub struct Style {
|
||||
|
|
|
@ -17,6 +17,12 @@ pub trait Refineable: Clone {
|
|||
{
|
||||
Self::default().refined(refinement)
|
||||
}
|
||||
fn from_cascade(cascade: &RefinementCascade<Self>) -> Self
|
||||
where
|
||||
Self: Default + Sized,
|
||||
{
|
||||
Self::default().refined(&cascade.merged())
|
||||
}
|
||||
}
|
||||
|
||||
pub struct RefinementCascade<S: Refineable>(Vec<Option<S::Refinement>>);
|
||||
|
|
|
@ -12,6 +12,7 @@ path = "src/storybook.rs"
|
|||
gpui2 = { path = "../gpui2" }
|
||||
anyhow.workspace = true
|
||||
log.workspace = true
|
||||
refineable = { path = "../refineable" }
|
||||
rust-embed.workspace = true
|
||||
serde.workspace = true
|
||||
settings = { path = "../settings" }
|
||||
|
|
5
crates/storybook/build.rs
Normal file
5
crates/storybook/build.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
fn main() {
|
||||
// Find WebRTC.framework as a sibling of the executable when running outside of an application bundle.
|
||||
// TODO: We shouldn't depend on WebRTC in editor
|
||||
println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path");
|
||||
}
|
Loading…
Reference in a new issue