This commit is contained in:
2024-10-20 22:00:09 +02:00
parent 73bac7450a
commit 9247cddf98
2 changed files with 17 additions and 3 deletions
+13 -1
View File
@@ -43,7 +43,19 @@ impl Style {
}
pub fn get_outline(self) -> String {
String::from(self.fg.ansi() + &self.bg.ansi_bg() + &self.font.ansi())
if self.is_active {
self.outline.prioritize(self.hover_outline).ansi()
} else {
self.outline.ansi()
}
}
pub fn write(self, s: &str) -> String {
format!("{}{}", self.get(), s)
}
pub fn write_outline(self, s: &str) -> String {
format!("{}{}", self.get_outline(), s)
}
}