Declarative skill icons

This commit is contained in:
juliancoffee 2021-08-25 23:36:10 +03:00
parent 9211b4a00a
commit 758fe19ccb
2 changed files with 875 additions and 1253 deletions

File diff suppressed because it is too large Load Diff

View File

@ -331,6 +331,8 @@ pub enum PositionSpecifier {
MidBottomWithMarginOn(widget::Id, f64),
BottomLeftWithMarginsOn(widget::Id, f64, f64),
BottomRightWithMarginsOn(widget::Id, f64, f64),
// Place the widget near other widget with given margin
MidTopWithMarginOn(widget::Id, f64),
// Place the widget near other widget at given distance
MiddleOf(widget::Id),
UpFrom(widget::Id, f64),
@ -408,6 +410,10 @@ impl<W: Positionable> Position for W {
PositionSpecifier::BottomLeftWithMarginsOn(other, bottom, left) => {
self.bottom_left_with_margins_on(other, bottom, left)
},
// Place the widget near other widget with given margin
PositionSpecifier::MidTopWithMarginOn(other, margin) => {
self.mid_top_with_margin_on(other, margin)
},
// Place the widget near other widget at given distance
PositionSpecifier::MiddleOf(other) => self.middle_of(other),
PositionSpecifier::UpFrom(other, offset) => self.up_from(other, offset),