Style titlebar via theme and give it a bottom border

Nathan Sobo and Max Brunsfeld created

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>

Change summary

zed/assets/themes/_base.toml |  3 +++
zed/src/theme.rs             |  1 +
zed/src/workspace.rs         | 10 +++++++---
3 files changed, 11 insertions(+), 3 deletions(-)

Detailed changes

zed/assets/themes/_base.toml 🔗

@@ -4,6 +4,9 @@ base = { family = "Inconsolata", size = 14 }
 [workspace]
 background = "$surface.0"
 
+[workspace.titlebar]
+border = { width = 1, bottom = true, color = "$surface.1" }
+
 [workspace.tab]
 text = "$text.2"
 padding = { left = 10, right = 10 }

zed/src/theme.rs 🔗

@@ -33,6 +33,7 @@ pub struct SyntaxTheme {
 #[derive(Deserialize)]
 pub struct Workspace {
     pub background: Color,
+    pub titlebar: ContainerStyle,
     pub tab: Tab,
     pub active_tab: Tab,
     pub sidebar: Sidebar,

zed/src/workspace.rs 🔗

@@ -952,9 +952,13 @@ impl View for Workspace {
         Container::new(
             Flex::column()
                 .with_child(
-                    ConstrainedBox::new(Empty::new().boxed())
-                        .with_height(32.)
-                        .named("titlebar"),
+                    ConstrainedBox::new(
+                        Container::new(Empty::new().boxed())
+                            .with_style(&settings.theme.workspace.titlebar)
+                            .boxed(),
+                    )
+                    .with_height(32.)
+                    .named("titlebar"),
                 )
                 .with_child(
                     Expanded::new(