Move align.rs into mod math
This commit is contained in:
parent
72ed94fcb3
commit
aee1474b6e
7 changed files with 11 additions and 12 deletions
|
@ -496,7 +496,6 @@ impl Layout {
|
||||||
impl Layout {
|
impl Layout {
|
||||||
/// Shows where the next widget is going to be placed
|
/// Shows where the next widget is going to be placed
|
||||||
pub(crate) fn debug_paint_cursor(&self, region: &Region, painter: &crate::Painter) {
|
pub(crate) fn debug_paint_cursor(&self, region: &Region, painter: &crate::Painter) {
|
||||||
use crate::align::Align2;
|
|
||||||
use crate::paint::*;
|
use crate::paint::*;
|
||||||
|
|
||||||
let cursor = region.cursor;
|
let cursor = region.cursor;
|
||||||
|
|
|
@ -78,7 +78,6 @@
|
||||||
)]
|
)]
|
||||||
#![allow(clippy::manual_range_contains)]
|
#![allow(clippy::manual_range_contains)]
|
||||||
|
|
||||||
pub mod align;
|
|
||||||
mod animation_manager;
|
mod animation_manager;
|
||||||
pub mod containers;
|
pub mod containers;
|
||||||
mod context;
|
mod context;
|
||||||
|
@ -99,7 +98,6 @@ pub mod util;
|
||||||
pub mod widgets;
|
pub mod widgets;
|
||||||
|
|
||||||
pub use {
|
pub use {
|
||||||
align::Align,
|
|
||||||
containers::*,
|
containers::*,
|
||||||
context::{Context, CtxRef},
|
context::{Context, CtxRef},
|
||||||
id::Id,
|
id::Id,
|
||||||
|
|
|
@ -8,13 +8,20 @@ use std::ops::{Add, Div, Mul, RangeInclusive, Sub};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
pub mod align;
|
||||||
mod pos2;
|
mod pos2;
|
||||||
mod rect;
|
mod rect;
|
||||||
mod rot2;
|
mod rot2;
|
||||||
pub mod smart_aim;
|
pub mod smart_aim;
|
||||||
mod vec2;
|
mod vec2;
|
||||||
|
|
||||||
pub use {pos2::*, rect::*, rot2::*, vec2::*};
|
pub use {
|
||||||
|
align::{Align, Align2},
|
||||||
|
pos2::*,
|
||||||
|
rect::*,
|
||||||
|
rot2::*,
|
||||||
|
vec2::*,
|
||||||
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
use {
|
use {
|
||||||
super::{fonts::TextStyle, Color32, Fonts, Galley, Triangles},
|
super::{fonts::TextStyle, Color32, Fonts, Galley, Triangles},
|
||||||
crate::{
|
crate::*,
|
||||||
align::Align2,
|
|
||||||
math::{Pos2, Rect},
|
|
||||||
*,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// A paint primitive such as a circle or a piece of text.
|
/// A paint primitive such as a circle or a piece of text.
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
align::Align2,
|
|
||||||
layers::PaintCmdIdx,
|
layers::PaintCmdIdx,
|
||||||
math::{Pos2, Rect, Vec2},
|
math::{Align2, Pos2, Rect, Vec2},
|
||||||
paint::{Fonts, Galley, PaintCmd, Stroke, TextStyle},
|
paint::{Fonts, Galley, PaintCmd, Stroke, TextStyle},
|
||||||
Color32, CtxRef, LayerId,
|
Color32, CtxRef, LayerId,
|
||||||
};
|
};
|
||||||
|
|
|
@ -91,7 +91,7 @@ impl FrameHistory {
|
||||||
cmds.push(PaintCmd::text(
|
cmds.push(PaintCmd::text(
|
||||||
ui.fonts(),
|
ui.fonts(),
|
||||||
pos2(rect.left(), y),
|
pos2(rect.left(), y),
|
||||||
egui::align::Align2::LEFT_BOTTOM,
|
egui::Align2::LEFT_BOTTOM,
|
||||||
text,
|
text,
|
||||||
TextStyle::Monospace,
|
TextStyle::Monospace,
|
||||||
Color32::WHITE,
|
Color32::WHITE,
|
||||||
|
|
Loading…
Reference in a new issue