mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Split AtomLayout into WidgetAtom and ContainerAtom
This commit is contained in:
@@ -124,11 +124,11 @@ fn test_button_shortcut_text() {
|
||||
/// All of these should look the same.
|
||||
#[test]
|
||||
fn test_atom_letter_spacing() {
|
||||
use egui::AtomLayout;
|
||||
use egui::WidgetAtom;
|
||||
|
||||
let mut harness = HarnessBuilder::default().build_ui(|ui| {
|
||||
ui.add(AtomLayout::new("1.00x").gap(0.0));
|
||||
ui.add(AtomLayout::new(("1.00", "x")).gap(0.0));
|
||||
ui.add(WidgetAtom::new("1.00x").gap(0.0));
|
||||
ui.add(WidgetAtom::new(("1.00", "x")).gap(0.0));
|
||||
ui.horizontal(|ui| {
|
||||
ui.spacing_mut().item_spacing.x = 0.0;
|
||||
ui.label("1.00");
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
use egui::accesskit::Role;
|
||||
use egui::load::SizedTexture;
|
||||
use egui::{
|
||||
Align, AtomExt as _, AtomLayout, Button, Color32, ColorImage, Direction, DragValue, Event,
|
||||
Grid, IntoAtoms as _, Layout, PointerButton, Response, RichText, Slider, Stroke, StrokeKind,
|
||||
Align, AtomExt as _, Button, Color32, ColorImage, Direction, DragValue, Event, Grid,
|
||||
IntoAtoms as _, Layout, PointerButton, Response, RichText, Slider, Stroke, StrokeKind,
|
||||
TextEdit, TextWrapMode, TextureHandle, TextureOptions, Ui, UiBuilder, Vec2, Widget as _,
|
||||
include_image,
|
||||
WidgetAtom, include_image,
|
||||
};
|
||||
use egui_kittest::kittest::{Queryable as _, by};
|
||||
use egui_kittest::{Harness, Node, SnapshotResult, SnapshotResults};
|
||||
@@ -159,7 +159,7 @@ fn widget_tests() {
|
||||
|
||||
for atoms in interesting_atoms {
|
||||
results.add(test_widget_layout(&format!("atoms_{}", atoms.0), |ui| {
|
||||
AtomLayout::new(atoms.1.clone()).ui(ui)
|
||||
WidgetAtom::new(atoms.1.clone()).ui(ui)
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user