Struct rerun::external::re_ui::DesignTokens
source · pub struct DesignTokens {
pub json: Value,
pub top_bar_color: Color32,
pub bottom_bar_color: Color32,
pub bottom_bar_stroke: Stroke,
pub bottom_bar_rounding: Rounding,
pub shadow_gradient_dark_start: Color32,
pub tab_bar_color: Color32,
pub native_frame_stroke: Stroke,
}
Expand description
The look and feel of the UI.
Not everything is covered by this.
A lot of other design tokens are put straight into the egui::Style
Fields§
§json: Value
§top_bar_color: Color32
§bottom_bar_color: Color32
§bottom_bar_stroke: Stroke
§bottom_bar_rounding: Rounding
§shadow_gradient_dark_start: Color32
§tab_bar_color: Color32
§native_frame_stroke: Stroke
Implementations§
source§impl DesignTokens
impl DesignTokens
sourcepub fn load() -> DesignTokens
pub fn load() -> DesignTokens
Load design tokens from data/design_tokens.json
.
pub fn welcome_screen_h1() -> TextStyle
pub fn welcome_screen_h2() -> TextStyle
pub fn welcome_screen_example_title() -> TextStyle
pub fn welcome_screen_body() -> TextStyle
pub fn welcome_screen_tag() -> TextStyle
sourcepub fn view_padding() -> f32
pub fn view_padding() -> f32
Margin on all sides of views.
pub fn panel_margin() -> Margin
pub fn window_rounding() -> f32
pub fn normal_rounding() -> f32
pub fn small_rounding() -> f32
pub fn table_line_height() -> f32
pub fn table_header_height() -> f32
pub fn top_bar_margin() -> Margin
pub fn text_to_icon_padding() -> f32
sourcepub fn top_bar_height() -> f32
pub fn top_bar_height() -> f32
Height of the top-most bar.
sourcepub fn title_bar_height() -> f32
pub fn title_bar_height() -> f32
Height of the title row in the blueprint view and selection view, as well as the tab bar height in the viewport view.
pub fn list_item_height() -> f32
pub fn native_window_rounding() -> f32
pub fn top_panel_frame() -> Frame
pub fn bottom_panel_margin() -> Margin
sourcepub fn bottom_panel_frame() -> Frame
pub fn bottom_panel_frame() -> Frame
For the streams view (time panel)
pub fn small_icon_size() -> Vec2
pub fn setup_table_header(_header: &mut TableRow<'_, '_>)
pub fn setup_table_body(body: &mut TableBody<'_>)
sourcepub fn collapsing_triangle_area() -> Vec2
pub fn collapsing_triangle_area() -> Vec2
Layout area to allocate for the collapsing triangle.
Note that this is not the size of the collapsing triangle (which is defined by
crate::UiExt::paint_collapsing_triangle
), but how much screen real-estate should be
allocated for it. It’s set to the same size as the small icon size so that everything is
properly aligned in crate::list_item::ListItem
.
sourcepub fn section_collapsing_header_color(&self) -> Color32
pub fn section_collapsing_header_color(&self) -> Color32
The color for the background of crate::SectionCollapsingHeader
.
sourcepub fn loop_selection_color() -> Color32
pub fn loop_selection_color() -> Color32
The color we use to mean “loop this selection”
sourcepub fn loop_everything_color() -> Color32
pub fn loop_everything_color() -> Color32
The color we use to mean “loop all the data”
sourcepub fn thumbnail_background_color(&self) -> Color32
pub fn thumbnail_background_color(&self) -> Color32
Used by the “add view or container” modal.
Trait Implementations§
source§impl Clone for DesignTokens
impl Clone for DesignTokens
source§fn clone(&self) -> DesignTokens
fn clone(&self) -> DesignTokens
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for DesignTokens
impl RefUnwindSafe for DesignTokens
impl Send for DesignTokens
impl Sync for DesignTokens
impl Unpin for DesignTokens
impl UnwindSafe for DesignTokens
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request