formatting changes

This commit is contained in:
TheOddGarlic 2022-05-01 18:24:13 +03:00
parent 365fb6741c
commit 3c5c57cf22
3 changed files with 13 additions and 8 deletions

View file

@ -11,8 +11,8 @@ pub mod color;
pub mod rect;
use brush::Brush;
use raw_window_handle::RawWindowHandle;
use color::Color;
use raw_window_handle::RawWindowHandle;
use rect::Rect;
#[cfg(windows)]
@ -28,7 +28,7 @@ impl Renderer {
pub fn new(handle: RawWindowHandle) -> Self {
let handle = match handle {
RawWindowHandle::Win32(handle) => handle,
_ => todo!()
_ => todo!(),
};
Self {
@ -66,7 +66,7 @@ impl Renderer {
// text is not cut off or wrapped
f32::INFINITY,
f32::INFINITY,
)
),
)
}

View file

@ -25,7 +25,7 @@ pub struct Renderer {
brush: Option<ID2D1Brush>,
stroke_style: ID2D1StrokeStyle,
system_fonts: IDWriteFontCollection,
text_format: IDWriteTextFormat
text_format: IDWriteTextFormat,
}
impl Renderer {

View file

@ -20,5 +20,10 @@ fn launch() -> _ {
.color(rgb!(0xFF00FFFF)))
.add(Column::new()
.add(Label::new("World!"))
.add(Label::new("AbleTK!")))))
.add(Label::new("AbleTK!")))
.add(Label::new("this is a label!")
.bg_color(rgb!(0xFF0000FF))))
.on_event(WindowEvent::Closed, |_, window| {
window.set_title("CLOSING!")
}))
}