]> git.huck.website - cellseq.git/commitdiff
added: theme colors
authorHuck Boles <huck@huck.website>
Sun, 9 Jul 2023 18:36:14 +0000 (13:36 -0500)
committerHuck Boles <huck@huck.website>
Sun, 9 Jul 2023 18:36:14 +0000 (13:36 -0500)
src/lib.rs
src/map.rs
src/mask.rs

index af6b704d24d0f3f5a00618c5ca62215483d5fe05..628df3296eb38344070000c11607dc0258ac5907 100644 (file)
@@ -4,7 +4,7 @@ use iced::{
     theme::Theme,
     time,
     widget::{column, container, row, text, vertical_slider, vertical_space},
-    window, Alignment, {Application, Command, Element, Length, Point, Subscription},
+    window, Alignment, Color, {Application, Command, Element, Length, Point, Subscription},
 };
 
 use itertools::Itertools;
@@ -281,6 +281,12 @@ impl Application for CellSeq {
     }
 
     fn theme(&self) -> Theme {
-        Theme::Dark
+        Theme::custom(iced::theme::Palette {
+            background: Color::from_rgb8(0x15, 0x15, 0x15),
+            text: Color::from_rgb8(0xD7, 0xD0, 0xC7),
+            primary: Color::from_rgb8(0x9B, 0x64, 0xFB),
+            success: Color::from_rgb8(0x42, 0x71, 0x7B),
+            danger: Color::from_rgb8(0xD2, 0x3D, 0x3D),
+        })
     }
 }
index 488a5c7a0f2824330e34caee7a7f5faee1b4bfe0..79da34b76307109a246b833a14bbcaf656a23b8b 100644 (file)
@@ -168,7 +168,7 @@ impl Program<Message> for Map {
     ) -> Vec<Geometry> {
         vec![self.life_cache.draw(bounds.size(), |frame| {
             let background = Path::rectangle(Point::ORIGIN, frame.size());
-            frame.fill(&background, Color::from_rgb8(0x10, 0x10, 0x10));
+            frame.fill(&background, Color::from_rgb8(0x30, 0x30, 0x30));
 
             frame.with_save(|frame| {
                 frame.scale(Cell::SIZE as f32);
@@ -180,7 +180,7 @@ impl Program<Message> for Map {
                         frame.fill_rectangle(
                             Point::new(x.0 as f32, x.1 as f32),
                             Size::UNIT,
-                            Color::WHITE,
+                            Color::from_rgb8(0xD7, 0xD0, 0xC7),
                         );
                     })
             });
index 191720e7a5dfbe188b0dcb97aa81d25f1321a844..0ff91eade94fd32c71d73621860a20c9088a60ad 100644 (file)
@@ -102,7 +102,7 @@ impl Program<Message> for Mask {
     ) -> Vec<Geometry> {
         vec![self.mask_cache.draw(bounds.size(), |frame| {
             let background = Path::rectangle(Point::ORIGIN, frame.size());
-            frame.fill(&background, Color::from_rgb8(0x10, 0x10, 0x10));
+            frame.fill(&background, Color::from_rgb8(0x30, 0x30, 0x30));
 
             frame.with_save(|frame| {
                 frame.scale(Cell::SIZE as f32);
@@ -115,9 +115,9 @@ impl Program<Message> for Mask {
                             Point::new(x.0 as f32, x.1 as f32),
                             Size::UNIT,
                             if self.hits.contains(&Cell { i: x.1, j: x.0 }) {
-                                Color::from_rgb8(0xFF, 0xFF, 0xFF)
+                                Color::from_rgb8(0x42, 0x71, 0x7B)
                             } else {
-                                Color::from_rgb8(0xDD, 0xDD, 0xDD)
+                                Color::from_rgb8(0xD7, 0xD0, 0xC7)
                             },
                         );
                     })