1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Add Ui::spacing() and Ui::spacing_mut() as shortcuts

This commit is contained in:
Emil Ernerfeldt
2021-02-01 16:55:40 +01:00
parent c687671a9f
commit 01fca2f31c
24 changed files with 96 additions and 85 deletions

View File

@@ -239,7 +239,7 @@ impl ColoredText {
pub fn ui(&self, ui: &mut egui::Ui) {
for line in &self.0 {
ui.horizontal_wrapped_for_text(egui::TextStyle::Monospace, |ui| {
ui.style_mut().spacing.item_spacing.x = 0.0;
ui.spacing_mut().item_spacing.x = 0.0;
for (style, range) in line {
let fg = style.foreground;
let text_color = egui::Color32::from_rgb(fg.r, fg.g, fg.b);