mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 02:48:34 +00:00
Added background to welcome page
This commit is contained in:
parent
5210be95fe
commit
62aeb6b8b3
1 changed files with 68 additions and 47 deletions
|
@ -1,6 +1,7 @@
|
|||
use gpui::{
|
||||
color::Color,
|
||||
elements::{Empty, Flex, Label, MouseEventHandler, ParentElement, Svg},
|
||||
elements::{Canvas, Empty, Flex, Label, MouseEventHandler, ParentElement, Stack, Svg},
|
||||
geometry::rect::RectF,
|
||||
Element, ElementBox, Entity, MutableAppContext, RenderContext, Subscription, View, ViewContext,
|
||||
};
|
||||
use settings::{settings_file::SettingsFile, Settings, SettingsFileContent};
|
||||
|
@ -39,6 +40,24 @@ impl View for WelcomePage {
|
|||
enum Metrics {}
|
||||
enum Diagnostics {}
|
||||
|
||||
let background = theme.editor.background;
|
||||
|
||||
Stack::new()
|
||||
.with_child(
|
||||
Canvas::new(move |bounds, visible_bounds, cx| {
|
||||
let visible_bounds = bounds.intersection(visible_bounds).unwrap_or_default();
|
||||
|
||||
cx.paint_layer(Some(visible_bounds), |cx| {
|
||||
cx.scene.push_quad(gpui::Quad {
|
||||
bounds: RectF::new(bounds.origin(), bounds.size()),
|
||||
background: Some(background),
|
||||
..Default::default()
|
||||
})
|
||||
})
|
||||
})
|
||||
.boxed(),
|
||||
)
|
||||
.with_child(
|
||||
Flex::column()
|
||||
.with_children([
|
||||
Flex::row()
|
||||
|
@ -93,6 +112,8 @@ impl View for WelcomePage {
|
|||
.boxed(),
|
||||
])
|
||||
.aligned()
|
||||
.boxed(),
|
||||
)
|
||||
.boxed()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue