mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Lint vertical spacing in the code (#3224)
* Lint vertical spacing in the code * Add some vertical spacing for readability
This commit is contained in:
@@ -10,11 +10,15 @@ pub use usvg::FitTo;
|
||||
/// Use the `svg` and `image` features to enable more constructors.
|
||||
pub struct RetainedImage {
|
||||
debug_name: String,
|
||||
|
||||
size: [usize; 2],
|
||||
|
||||
/// Cleared once [`Self::texture`] has been loaded.
|
||||
image: Mutex<egui::ColorImage>,
|
||||
|
||||
/// Lazily loaded when we have an egui context.
|
||||
texture: Mutex<Option<egui::TextureHandle>>,
|
||||
|
||||
options: TextureOptions,
|
||||
}
|
||||
|
||||
|
||||
@@ -32,9 +32,11 @@ pub struct StripLayout<'l> {
|
||||
direction: CellDirection,
|
||||
pub(crate) rect: Rect,
|
||||
pub(crate) cursor: Pos2,
|
||||
|
||||
/// Keeps track of the max used position,
|
||||
/// so we know how much space we used.
|
||||
max: Pos2,
|
||||
|
||||
cell_layout: egui::Layout,
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,9 @@ enum InitialColumnSize {
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub struct Column {
|
||||
initial_width: InitialColumnSize,
|
||||
|
||||
width_range: Rangef,
|
||||
|
||||
/// Clip contents if too narrow?
|
||||
clip: bool,
|
||||
|
||||
@@ -511,8 +513,10 @@ pub struct Table<'a> {
|
||||
columns: Vec<Column>,
|
||||
available_width: f32,
|
||||
state: TableState,
|
||||
|
||||
/// Accumulated maximum used widths for each column.
|
||||
max_used_widths: Vec<f32>,
|
||||
|
||||
first_frame_auto_size_columns: bool,
|
||||
resizable: bool,
|
||||
striped: bool,
|
||||
@@ -1011,8 +1015,10 @@ pub struct TableRow<'a, 'b> {
|
||||
layout: &'b mut StripLayout<'a>,
|
||||
columns: &'b [Column],
|
||||
widths: &'b [f32],
|
||||
|
||||
/// grows during building with the maximum widths
|
||||
max_used_widths: &'b mut [f32],
|
||||
|
||||
col_index: usize,
|
||||
striped: bool,
|
||||
height: f32,
|
||||
|
||||
Reference in New Issue
Block a user