From 64f48de0d672364cfcb93c91c9da0f664ae9fd36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristo=CC=81fer=20R?= Date: Fri, 22 Mar 2024 03:21:46 +0000 Subject: [PATCH] collapse if statement where possible --- src/app.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/app.rs b/src/app.rs index 777e721..6c14914 100644 --- a/src/app.rs +++ b/src/app.rs @@ -92,12 +92,10 @@ impl eframe::App for TemplateApp { } else { egui::Color32::BLUE } + } else if ui.ctx().style().visuals.dark_mode { + egui::Color32::LIGHT_RED } else { - if ui.ctx().style().visuals.dark_mode { - egui::Color32::LIGHT_RED - } else { - egui::Color32::RED - } + egui::Color32::RED }, ..Default::default() },