Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Update empty pane styling
Nate Butler8ee25be7b93b
diff --git a/assets/icons/logo_256.svg b/assets/icons/logo_256.svgnew file mode 100644index 00000000000..4629600b410--- /dev/null+++ b/assets/icons/logo_256.svg@@ -0,0 +1,41 @@+<svg width="257" height="258" viewBox="0 0 257 258" fill="none" xmlns="http://www.w3.org/2000/svg">+<g filter="url(#filter0_ddiii_100_57)">+<path d="M205.45 52.5503L241.758 15.4352C244.103 13.0378 242.405 9 239.051 9H24.1479C15.782 9 9 15.782 9 24.1479V200.243M205.45 52.5503H60.8343C56.6513 52.5503 53.2604 55.9413 53.2604 60.1243V160.006M205.45 52.5503L161.189 96.574M161.189 96.574H101.071C98.9795 96.574 97.284 98.2695 97.284 100.361V120.243M161.189 96.574L97.284 160.716M97.284 160.716H157.402C159.494 160.716 161.189 159.02 161.189 156.929V136.574M97.284 160.716L53.2604 203.793M53.2604 203.793L15.4233 241.832C13.0474 244.221 14.7392 248.29 18.1082 248.29H233.852C242.218 248.29 249 241.508 249 233.142V69.5917M53.2604 203.793H197.402C201.585 203.793 204.976 200.402 204.976 196.219V96.574" stroke="black" stroke-opacity="0.05" stroke-width="12" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges"/>+</g>+<defs>+<filter id="filter0_ddiii_100_57" x="-1" y="0" width="257" height="258.29" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">+<feFlood flood-opacity="0" result="BackgroundImageFix"/>+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>+<feOffset dx="-1" dy="-1"/>+<feGaussianBlur stdDeviation="1"/>+<feComposite in2="hardAlpha" operator="out"/>+<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.02 0"/>+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_100_57"/>+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>+<feOffset dx="-1" dy="2"/>+<feGaussianBlur stdDeviation="0.5"/>+<feComposite in2="hardAlpha" operator="out"/>+<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0"/>+<feBlend mode="normal" in2="effect1_dropShadow_100_57" result="effect2_dropShadow_100_57"/>+<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_100_57" result="shape"/>+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>+<feOffset dx="-1" dy="1"/>+<feGaussianBlur stdDeviation="0.5"/>+<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"/>+<feBlend mode="normal" in2="shape" result="effect3_innerShadow_100_57"/>+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>+<feOffset dx="-1"/>+<feGaussianBlur stdDeviation="1"/>+<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"/>+<feBlend mode="normal" in2="effect3_innerShadow_100_57" result="effect4_innerShadow_100_57"/>+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>+<feOffset dx="-8" dy="6"/>+<feGaussianBlur stdDeviation="2"/>+<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>+<feBlend mode="normal" in2="effect4_innerShadow_100_57" result="effect5_innerShadow_100_57"/>+</filter>+</defs>+</svg>diff --git a/assets/icons/logo_shadow_256.svg b/assets/icons/logo_shadow_256.svgnew file mode 100644index 00000000000..6c331f43ab3--- /dev/null+++ b/assets/icons/logo_shadow_256.svg@@ -0,0 +1,23 @@+<svg width="257" height="258" viewBox="0 0 257 258" fill="none" xmlns="http://www.w3.org/2000/svg">+<g filter="url(#filter0_dd_110_85)">+<path d="M205.45 52.5503L241.758 15.4352C244.103 13.0378 242.405 9 239.051 9H24.1479C15.782 9 9 15.782 9 24.1479V200.243M205.45 52.5503H60.8343C56.6513 52.5503 53.2604 55.9413 53.2604 60.1243V160.006M205.45 52.5503L161.189 96.574M161.189 96.574H101.071C98.9795 96.574 97.284 98.2695 97.284 100.361V120.243M161.189 96.574L97.284 160.716M97.284 160.716H157.402C159.494 160.716 161.189 159.02 161.189 156.929V136.574M97.284 160.716L53.2604 203.793M53.2604 203.793L15.4233 241.832C13.0474 244.221 14.7392 248.29 18.1082 248.29H233.852C242.218 248.29 249 241.508 249 233.142V69.5917M53.2604 203.793H197.402C201.585 203.793 204.976 200.402 204.976 196.219V96.574" stroke="black" stroke-opacity="0.01" stroke-width="12" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges"/>+</g>+<defs>+<filter id="filter0_dd_110_85" x="0" y="0" width="256" height="257.29" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">+<feFlood flood-opacity="0" result="BackgroundImageFix"/>+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>+<feOffset dx="-1" dy="-1"/>+<feGaussianBlur stdDeviation="1"/>+<feComposite in2="hardAlpha" operator="out"/>+<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.08 0"/>+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_110_85"/>+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>+<feOffset dx="-1" dy="2"/>+<feGaussianBlur stdDeviation="0.5"/>+<feComposite in2="hardAlpha" operator="out"/>+<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.12 0"/>+<feBlend mode="normal" in2="effect1_dropShadow_110_85" result="effect2_dropShadow_110_85"/>+<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_110_85" result="shape"/>+</filter>+</defs>+</svg>diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rsindex d331ca80a9f..8ee58a8af28 100644--- a/crates/theme/src/theme.rs+++ b/crates/theme/src/theme.rs@@ -76,6 +76,8 @@ pub struct Workspace {#[derive(Clone, Deserialize, Default)]pub struct BlankPaneStyle {pub logo: IconStyle,+ pub logo_shadow: IconStyle,+ pub logo_container: ContainerStyle,pub keyboard_hints: ContainerStyle,pub keyboard_hint: Interactive<ContainedText>,pub keyboard_hint_width: f32,diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rsindex abd410d8759..6d20700bcc8 100644--- a/crates/workspace/src/pane.rs+++ b/crates/workspace/src/pane.rs@@ -1429,7 +1429,6 @@ impl Pane {fn render_blank_pane(&mut self, theme: &Theme, cx: &mut RenderContext<Self>) -> ElementBox {let background = theme.workspace.background;- let keystroke_style = &theme.context_menu.item;let theme = &theme.workspace.blank_pane;Stack::new().with_children([@@ -1440,7 +1439,14 @@ impl Pane {Flex::column().align_children_center().with_children([- theme::ui::icon(&theme.logo).aligned().boxed(),+ Stack::new()+ .with_children([+ theme::ui::icon(&theme.logo_shadow).aligned().boxed(),+ theme::ui::icon(&theme.logo).aligned().boxed(),+ ])+ .contained()+ .with_style(theme.logo_container)+ .boxed(),Flex::column().with_children({enum KeyboardHint {}@@ -1453,14 +1459,13 @@ impl Pane {idx,cx,move |state, cx| {+ let style = keyboard_hint.style_for(state, false);theme::ui::keystroke_label_for(cx.window_id(),workspace_id,text,- &keyboard_hint.style_for(state, false),- &keystroke_style- .style_for(state, false)- .keystroke,+ &style,+ &style,hint_action,).boxed()diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rsindex 2e2026309fc..cbcd1aa1c60 100644--- a/crates/zed/src/main.rs+++ b/crates/zed/src/main.rs@@ -709,7 +709,7 @@ pub fn dock_default_item_factory(pub fn background_actions() -> &'static [(&'static str, &'static dyn Action)] {&[("Go to file", &file_finder::Toggle),- ("Open the command palette", &command_palette::Toggle),+ ("Open command palette", &command_palette::Toggle),("Focus the dock", &FocusDock),("Open recent projects", &recent_projects::OpenRecent),("Change your settings", &OpenSettings),diff --git a/styles/src/styleTree/workspace.ts b/styles/src/styleTree/workspace.tsindex 1789b523e7f..984b6b5ed35 100644--- a/styles/src/styleTree/workspace.ts+++ b/styles/src/styleTree/workspace.ts@@ -42,38 +42,46 @@ export default function workspace(colorScheme: ColorScheme) {return {background: background(colorScheme.lowest),blankPane: {+ logoContainer: {+ width: 256,+ height: 256,+ },logo: {- color: border(layer, "active").color,- icon: "icons/logo_96.svg",+ color: withOpacity("#000000", colorScheme.isLight ? 0.6 : 0.8),+ icon: "icons/logo_256.svg",dimensions: {- width: 272,- height: 272,- }+ width: 256,+ height: 256,+ },+ },+ logoShadow: {+ color: withOpacity(colorScheme.isLight ? "#FFFFFF" : colorScheme.lowest.base.default.background, colorScheme.isLight ? 1 : 0.6),+ icon: "icons/logo_shadow_256.svg",+ dimensions: {+ width: 256,+ height: 256,+ },},keyboardHints: {margin: {- top: 32,- // bottom: -8.- },- padding: {- top: 8,- left: 8,- right: 8,+ top: 96,},- background: background(colorScheme.lowest),- border: border(layer, "active"),cornerRadius: 4,},keyboardHint: {...text(layer, "sans", "variant", { size: "sm" }),- margin: {- bottom: 8+ padding: {+ top: 3,+ left: 8,+ right: 8,+ bottom: 3},+ cornerRadius: 8,hover: {- ...text(layer, "sans", "hovered", { size: "sm" }),+ ...text(layer, "sans", "active", { size: "sm" }),}},- keyboardHintWidth: 272,+ keyboardHintWidth: 320,},joiningProjectAvatar: {cornerRadius: 40,