Experimental objdiff-cli (WIP)

This commit is contained in:
2024-02-27 18:47:51 -07:00
parent 4eba5f71b0
commit 9a7d2bcebf
23 changed files with 1541 additions and 501 deletions

View File

@@ -1,6 +1,6 @@
use std::sync::Arc;
use egui::{text::LayoutJob, Color32, FontFamily, FontId, TextStyle, Widget};
use egui::{text::LayoutJob, Color32, FontFamily, FontId, TextFormat, TextStyle, Widget};
use time::UtcOffset;
use crate::fonts::load_font_if_needed;
@@ -185,6 +185,15 @@ impl Appearance {
}
}
}
pub fn code_text_format(&self, base_color: Color32, highlight: bool) -> TextFormat {
TextFormat {
font_id: self.code_font.clone(),
color: if highlight { self.emphasized_text_color } else { base_color },
background: if highlight { self.deemphasized_text_color } else { Color32::TRANSPARENT },
..Default::default()
}
}
}
pub const DEFAULT_COLOR_ROTATION: [Color32; 9] = [