|
1 | 1 | use eframe::egui::{ |
2 | | - Align, Button, CentralPanel, Color32, ComboBox, Context, FontId, Grid, Image, Layout, Rect, Spinner, TextStyle, |
| 2 | + Align, Button, CentralPanel, ComboBox, Context, FontId, Grid, Image, Layout, Rect, Spinner, TextStyle, |
3 | 3 | TopBottomPanel, |
4 | 4 | }; |
5 | 5 | use std::path::PathBuf; |
@@ -214,13 +214,13 @@ impl eframe::App for App { |
214 | 214 | self.hook_metadata.manifest.checksum == 0, |
215 | 215 | self.hook_metadata.vec_manifests.len() == 0, |
216 | 216 | ) { |
217 | | - (_, _, true, true) => (format!("✖ {}", t!("hook data was not loaded")), Color32::LIGHT_RED), |
| 217 | + (_, _, true, true) => (format!("✖ {}", t!("hook data was not loaded")), COLOR_ERROR), |
218 | 218 | (false, _, _, _) => ( |
219 | 219 | format!("✖ {}", t!("this DF version is not supported")), |
220 | | - Color32::LIGHT_RED, |
| 220 | + COLOR_ERROR, |
221 | 221 | ), |
222 | | - (true, true, _, _) => (format!("✅ {}", t!("up-to-date")), Color32::LIGHT_GREEN), |
223 | | - (true, false, _, _) => (format!("⚠ {}", t!("update available")), Color32::from_rgb(255, 255, 90)), |
| 222 | + (true, true, _, _) => (format!("✅ {}", t!("up-to-date")), COLOR_UP_TO_DATE), |
| 223 | + (true, false, _, _) => (format!("⚠ {}", t!("update available")), COLOR_UPDATE_AVAILABLE), |
224 | 224 | }; |
225 | 225 | ui.colored_label(color, text); |
226 | 226 |
|
@@ -272,11 +272,11 @@ impl eframe::App for App { |
272 | 272 | ) { |
273 | 273 | (_, _, true) => ( |
274 | 274 | format!("✖ {}", t!("dictionary data was not loaded")), |
275 | | - Color32::LIGHT_RED, |
| 275 | + COLOR_ERROR, |
276 | 276 | ), |
277 | | - (true, false, false) => (format!("✅ {}", t!("up-to-date")), Color32::LIGHT_GREEN), |
278 | | - (false, false, false) => (format!("⚠ {}", t!("update available")), Color32::from_rgb(255, 255, 90)), |
279 | | - (_, true, false) => (format!("⚠ {}", t!("choose language")), Color32::from_rgb(255, 255, 90)), |
| 277 | + (true, false, false) => (format!("✅ {}", t!("up-to-date")), COLOR_UP_TO_DATE), |
| 278 | + (false, false, false) => (format!("⚠ {}", t!("update available")), COLOR_UPDATE_AVAILABLE), |
| 279 | + (_, true, false) => (format!("⚠ {}", t!("choose language")), COLOR_CHOOSE_LANGUAGE), |
280 | 280 | }; |
281 | 281 | ui.colored_label(color, text); |
282 | 282 | ui.end_row(); |
|
0 commit comments