From 0bed6afc29cf4e9f2bfbcf4b6e9ea891a96947e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 3 Sep 2025 14:22:02 +0200 Subject: [PATCH] fix(multiverse): Define the color of the placeholder text of the input line This ensures that we're using the same color despite what your color scheme of your terminal is. Some color schemes might produce unreadable combinations of foreground color and background color. --- labs/multiverse/src/widgets/room_view/input.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/labs/multiverse/src/widgets/room_view/input.rs b/labs/multiverse/src/widgets/room_view/input.rs index fcb8cf828..ab76cb359 100644 --- a/labs/multiverse/src/widgets/room_view/input.rs +++ b/labs/multiverse/src/widgets/room_view/input.rs @@ -35,7 +35,7 @@ pub struct Input { impl Input { /// Create a new empty [`Input`] widget. pub fn new() -> Self { - let textarea = TextArea::default(); + let textarea = Self::text_area(); Self { textarea } } @@ -71,7 +71,14 @@ impl Input { /// Clear the text from the input area. pub fn clear(&mut self) { - self.textarea = TextArea::default(); + self.textarea = Self::text_area(); + } + + fn text_area() -> TextArea<'static> { + let mut area = TextArea::default(); + area.set_placeholder_style(Style::new().fg(tailwind::GRAY.c50)); + + area } }