mirror of
https://github.com/encounter/objdiff.git
synced 2025-12-16 16:37:06 +00:00
Experimental objdiff-cli (WIP)
This commit is contained in:
@@ -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] = [
|
||||
|
||||
Reference in New Issue
Block a user