example: Fix title bar paddings for window_title example. (#1429)
This commit is contained in:
parent
6ebb9418a0
commit
5f63ddb822
1 changed files with 9 additions and 6 deletions
|
|
@ -2,7 +2,7 @@ use anyhow::anyhow;
|
||||||
use gpui::*;
|
use gpui::*;
|
||||||
use gpui_component::{
|
use gpui_component::{
|
||||||
button::{Button, ButtonVariants},
|
button::{Button, ButtonVariants},
|
||||||
v_flex, Root, TitleBar,
|
h_flex, v_flex, Root, TitleBar,
|
||||||
};
|
};
|
||||||
use rust_embed::Embed;
|
use rust_embed::Embed;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
@ -37,11 +37,14 @@ impl Render for Example {
|
||||||
.size_full()
|
.size_full()
|
||||||
.child(
|
.child(
|
||||||
// Render custom title bar on top of Root view.
|
// Render custom title bar on top of Root view.
|
||||||
TitleBar::new()
|
TitleBar::new().child(
|
||||||
.justify_between()
|
h_flex()
|
||||||
.pr_2()
|
.w_full()
|
||||||
.child("App with Custom title bar")
|
.pr_2()
|
||||||
.child("Right Item"),
|
.justify_between()
|
||||||
|
.child("App with Custom title bar")
|
||||||
|
.child("Right Item"),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
div()
|
div()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue