mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Add ui.set_row_height
This commit is contained in:
@@ -238,8 +238,10 @@ 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.spacing_mut().item_spacing.x = 0.0;
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.spacing_mut().item_spacing = egui::Vec2::ZERO;
|
||||
ui.set_row_height(ui.fonts()[egui::TextStyle::Body].row_height());
|
||||
|
||||
for (style, range) in line {
|
||||
let fg = style.foreground;
|
||||
let text_color = egui::Color32::from_rgb(fg.r, fg.g, fg.b);
|
||||
|
||||
Reference in New Issue
Block a user