mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
fix color randomization (10x @erik_hedvall!)
This commit is contained in:
parent
7c9b41e3af
commit
e20f195c20
4 changed files with 10 additions and 12 deletions
|
|
@ -121,7 +121,7 @@ impl Handle<Tui> for PhrasePool<Tui> {
|
|||
},
|
||||
key!(KeyCode::Char('d')) => { // insert duplicate
|
||||
let mut phrase = (*self.phrases[self.phrase].read().unwrap()).clone();
|
||||
phrase.color = random_color_near(phrase.color, 0.1);
|
||||
phrase.color = random_color_near(phrase.color, 0.2);
|
||||
self.phrases.insert(self.phrase + 1, Arc::new(RwLock::new(phrase)));
|
||||
self.phrase += 1;
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue