documentation
This commit is contained in:
parent
5c87d987cf
commit
eb8e1c4303
3 changed files with 11 additions and 6 deletions
|
@ -2,7 +2,9 @@ use crate::Padding;
|
||||||
use egui::{Pos2, Rect, Response, Rgba, Sense, Ui, Vec2};
|
use egui::{Pos2, Rect, Response, Rgba, Sense, Ui, Vec2};
|
||||||
|
|
||||||
pub(crate) enum CellSize {
|
pub(crate) enum CellSize {
|
||||||
|
/// Absolute size in points
|
||||||
Absolute(f32),
|
Absolute(f32),
|
||||||
|
/// Take all available space
|
||||||
Remainder,
|
Remainder,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/// Configure padding of grid or table
|
||||||
|
/// TODO: Use padding settings of egui?
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct Padding {
|
pub struct Padding {
|
||||||
pub(crate) inner: f32,
|
pub(crate) inner: f32,
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum Size {
|
pub enum Size {
|
||||||
/// in points
|
/// Absolute size in points
|
||||||
Absolute(f32),
|
Absolute(f32),
|
||||||
/// 0.0 to 1.0
|
/// Relative size relative to all available space. Values must be in range `0.0..=1.0`
|
||||||
Relative(f32),
|
Relative(f32),
|
||||||
|
/// [`Size::Relative`] with a minimum size in points
|
||||||
RelativeMinimum {
|
RelativeMinimum {
|
||||||
/// 0.0 to 1.0
|
/// Relative size relative to all available space. Values must be in range `0.0..=1.0`
|
||||||
relative: f32,
|
relative: f32,
|
||||||
/// in points
|
/// Absolute minimum size in points
|
||||||
minimum: f32,
|
minimum: f32,
|
||||||
},
|
},
|
||||||
/// multiple remainders get each the same space
|
/// Multiple remainders each get the same space
|
||||||
Remainder,
|
Remainder,
|
||||||
/// multiple remainders get each the same space, at least the minimum
|
/// [`Size::Remainder`] with a minimum size in points
|
||||||
RemainderMinimum(f32),
|
RemainderMinimum(f32),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue