Style titlebar via theme and give it a bottom border

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Nathan Sobo 2021-09-07 12:52:10 -06:00
parent b29e673c43
commit 59931a472b
3 changed files with 11 additions and 3 deletions

View file

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

View file

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

View file

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