mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 22:30:03 -04:00
Fix typo (scrool -> scroll)
This commit is contained in:
@@ -5,7 +5,7 @@ use egui_extras::{Size, StripBuilder, TableBuilder};
|
|||||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct TableDemo {
|
pub struct TableDemo {
|
||||||
virtual_scrool: bool,
|
virtual_scroll: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl super::Demo for TableDemo {
|
impl super::Demo for TableDemo {
|
||||||
@@ -27,7 +27,7 @@ impl super::Demo for TableDemo {
|
|||||||
|
|
||||||
impl super::View for TableDemo {
|
impl super::View for TableDemo {
|
||||||
fn ui(&mut self, ui: &mut egui::Ui) {
|
fn ui(&mut self, ui: &mut egui::Ui) {
|
||||||
ui.checkbox(&mut self.virtual_scrool, "Virtual scroll demo");
|
ui.checkbox(&mut self.virtual_scroll, "Virtual scroll demo");
|
||||||
|
|
||||||
// The table is inside a grid as its container would otherwise grow slowly as it takes all available height
|
// The table is inside a grid as its container would otherwise grow slowly as it takes all available height
|
||||||
ui.spacing_mut().item_spacing = Vec2::splat(4.0);
|
ui.spacing_mut().item_spacing = Vec2::splat(4.0);
|
||||||
@@ -55,7 +55,7 @@ impl super::View for TableDemo {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.body(|mut body| {
|
.body(|mut body| {
|
||||||
if self.virtual_scrool {
|
if self.virtual_scroll {
|
||||||
body.rows(20.0, 100_000, |index, mut row| {
|
body.rows(20.0, 100_000, |index, mut row| {
|
||||||
row.col(|ui| {
|
row.col(|ui| {
|
||||||
ui.label(index.to_string());
|
ui.label(index.to_string());
|
||||||
|
|||||||
Reference in New Issue
Block a user