Skip to content
Snippets Groups Projects
Commit db7042dd authored by Gino Valente's avatar Gino Valente
Browse files

Reformat

parent 7649c636
No related branches found
No related tags found
No related merge requests found
...@@ -10,12 +10,12 @@ use bevy::{ ...@@ -10,12 +10,12 @@ use bevy::{
DefaultPlugins, DefaultPlugins,
}; };
use kayak_core::{ use kayak_core::{
styles::{LayoutType, Style, StyleProp, Units, Edge}, styles::{Edge, LayoutType, Style, StyleProp, Units},
OnLayout, OnLayout,
}; };
use kayak_core::{Color, EventType, OnEvent}; use kayak_core::{Color, EventType, OnEvent};
use kayak_render_macros::use_state; use kayak_render_macros::use_state;
use kayak_ui::widgets::{App, Text, Window, Element}; use kayak_ui::widgets::{App, Element, Text, Window};
use kayak_ui::{ use kayak_ui::{
bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle}, bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle},
widgets::Button, widgets::Button,
......
...@@ -3,12 +3,12 @@ use crate::Index; ...@@ -3,12 +3,12 @@ use crate::Index;
pub use morphorm::GeometryChanged; pub use morphorm::GeometryChanged;
/// A layout data sent to widgets on layout. /// A layout data sent to widgets on layout.
/// ///
/// Similar and interchangeable with [Rect] /// Similar and interchangeable with [Rect]
/// ``` /// ```
/// use kayak_core::layout_cache::Rect; /// use kayak_core::layout_cache::Rect;
/// use kayak_core::Layout; /// use kayak_core::Layout;
/// ///
/// let layout = Layout::default(); /// let layout = Layout::default();
/// let rect : Rect = layout.into(); /// let rect : Rect = layout.into();
/// let layout : Layout = rect.into(); /// let layout : Layout = rect.into();
......
use indexmap::IndexSet; use indexmap::IndexSet;
use morphorm::{Cache}; use morphorm::Cache;
use crate::{Index, KayakContext, KayakContextRef, LayoutEvent}; use crate::{Index, KayakContext, KayakContextRef, LayoutEvent};
......
use crate::{context_ref::KayakContextRef, styles::Style, Children, Index, OnEvent, Widget, WidgetProps, OnLayout}; use crate::{
context_ref::KayakContextRef, styles::Style, Children, Index, OnEvent, OnLayout, Widget,
WidgetProps,
};
/// Props used by the [`VecTracker`] widget /// Props used by the [`VecTracker`] widget
#[derive(Default, Debug, PartialEq, Clone)] #[derive(Default, Debug, PartialEq, Clone)]
......
use kayak_core::OnLayout;
use crate::core::{ use crate::core::{
render_command::RenderCommand, render_command::RenderCommand,
rsx, rsx,
styles::{Style, StyleProp}, styles::{Style, StyleProp},
widget, Children, Fragment, OnEvent, WidgetProps, widget, Children, Fragment, OnEvent, WidgetProps,
}; };
use kayak_core::OnLayout;
/// Props used by the [`Background`] widget /// Props used by the [`Background`] widget
#[derive(WidgetProps, Default, Debug, PartialEq, Clone)] #[derive(WidgetProps, Default, Debug, PartialEq, Clone)]
......
...@@ -50,7 +50,7 @@ impl WidgetProps for TextBoxProps { ...@@ -50,7 +50,7 @@ impl WidgetProps for TextBoxProps {
fn get_on_layout(&self) -> Option<OnLayout> { fn get_on_layout(&self) -> Option<OnLayout> {
self.on_layout.clone() self.on_layout.clone()
} }
fn get_focusable(&self) -> Option<bool> { fn get_focusable(&self) -> Option<bool> {
Some(!self.disabled) Some(!self.disabled)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment