From 3212a5acc28110ba89333490e6d14d5058af4dc3 Mon Sep 17 00:00:00 2001 From: RabbyDevs <67389402+RabbyDevs@users.noreply.github.com> Date: Tue, 15 Jul 2025 17:58:35 +0300 Subject: [PATCH] adjust settings ui to make it readable --- src/components/settings.rs | 15 +++++++++++---- src/main.rs | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/settings.rs b/src/components/settings.rs index b26e8c2..664a2ad 100644 --- a/src/components/settings.rs +++ b/src/components/settings.rs @@ -1,5 +1,5 @@ -use iced::{Element, Length}; -use iced::widget::{Button, TextInput, Container, Column, Row, text}; +use iced::{Background, Color, Element, Length}; +use iced::widget::{container, text, Button, Column, Container, Row, TextInput}; #[derive(Debug, Clone)] pub enum SettingsMessage { @@ -43,8 +43,15 @@ impl SettingsModal { .spacing(20); Container::new(content) - .width(Length::Fixed(400.0)) - .height(Length::Fixed(200.0)) + .style(|_| + container::Style { + text_color: Color::from_rgba8(255, 255, 255, 1.0).into(), + background: Some(Background::Color(Color::from_rgba8(0, 0, 0, 0.75))), + ..container::Style::default() + } + ) + .width(Length::Fill) + .height(Length::Fill) .padding(20) .center(Length::Fill) .into() diff --git a/src/main.rs b/src/main.rs index d488148..2cb758e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -534,7 +534,7 @@ impl Launcher { .on_press(Message::OpenSettings); let bottom_bar = container(row![ - text("The quick brown fox jumped over the lazy dog.").size(25).font(font), + // TODO: add info widget for game + rr here Space::new(Length::Fill, Length::Fixed(0.0)), opaque(mouse_area(download_button .padding(Padding { top: 10.0, right: 70.0, bottom: 10.0, left: 70.0 })