mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
documentation
This commit is contained in:
@@ -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),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user