Get text rendering
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
parent
fea987b459
commit
f1aafab61d
15 changed files with 437 additions and 71 deletions
|
@ -1,9 +1,10 @@
|
|||
#![allow(dead_code, unused_variables)]
|
||||
use color::black;
|
||||
use components::button;
|
||||
use element::Element;
|
||||
use frame::frame;
|
||||
use gpui::{
|
||||
geometry::{percent, rect::RectF, vector::vec2f},
|
||||
geometry::{rect::RectF, vector::vec2f},
|
||||
platform::WindowOptions,
|
||||
};
|
||||
use log::LevelFilter;
|
||||
|
@ -35,19 +36,21 @@ fn main() {
|
|||
center: true,
|
||||
..Default::default()
|
||||
},
|
||||
|_| view(|_| workspace(&rose_pine::moon())),
|
||||
|_| view(|_| playground(&rose_pine::moon())),
|
||||
);
|
||||
cx.platform().activate(true);
|
||||
});
|
||||
}
|
||||
|
||||
fn workspace<V: 'static>(theme: &ThemeColors) -> impl Element<V> {
|
||||
fn playground<V: 'static>(theme: &ThemeColors) -> impl Element<V> {
|
||||
frame()
|
||||
.text_color(black())
|
||||
.h_full()
|
||||
.w(percent(50.))
|
||||
.w_half()
|
||||
.fill(theme.success(0.5))
|
||||
.child(button())
|
||||
.child(button().label("Hello").click(|_, _| (println!("hey!"))))
|
||||
}
|
||||
|
||||
// todo!()
|
||||
// // column()
|
||||
// // .size(auto())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue