From fc25818e6bc4abb52b910f2bf28360644fba5234 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Tue, 20 Feb 2024 20:27:05 +0100 Subject: [PATCH] remove unused border code --- hui/src/element/builtin/button.rs | 0 hui/src/element/builtin/container.rs | 21 ++++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 hui/src/element/builtin/button.rs diff --git a/hui/src/element/builtin/button.rs b/hui/src/element/builtin/button.rs new file mode 100644 index 0000000..e69de29 diff --git a/hui/src/element/builtin/container.rs b/hui/src/element/builtin/container.rs index 82348c4..7469351 100644 --- a/hui/src/element/builtin/container.rs +++ b/hui/src/element/builtin/container.rs @@ -3,25 +3,29 @@ use crate::{ draw::{RoundedCorners, UiDrawCommand}, element::{MeasureContext, ProcessContext, UiElement}, layout::{Alignment, Alignment2d, LayoutInfo, UiDirection, UiSize}, measure::{Hints, Response}, rectangle::{Corners, Sides} }; -pub struct Border { - pub color: Vec4, - pub width: f32, -} +// pub struct Border { +// pub color: Vec4, +// pub width: f32, +// } + +///XXX: add Order/Direction::Forward/Reverse or sth? pub struct Container { + //TODO: min/max size // pub min_size: (UiSize, UiSize), // pub max_size: (UiSize, UiSize), pub size: (UiSize, UiSize), pub direction: UiDirection, - //pub reverse: bool, pub gap: f32, pub padding: Sides, ///Primary/secondary axis pub align: Alignment2d, pub background: Vec4, - pub borders: Sides>, + //TODO: borders + //pub borders: Sides>, pub corner_radius: Corners, - //pub clip: bool, //TODO: clip children + //TODO: clip children + //pub clip: bool, pub elements: Vec>, } @@ -32,12 +36,11 @@ impl Default for Container { // max_size: (UiSize::Auto, UiSize::Auto), size: (UiSize::Auto, UiSize::Auto), direction: UiDirection::Vertical, - //reverse: false, gap: 0., padding: Sides::all(0.), align: Alignment2d::default(), background: Default::default(), - borders: Default::default(), + //borders: Default::default(), elements: Vec::new(), corner_radius: Corners::all(0.), }