From 2c671f6228882caa7e83e98127bb2bfda7fc0eeb Mon Sep 17 00:00:00 2001 From: "alterwain@protonmail.com" Date: Thu, 12 Dec 2024 03:43:38 +0300 Subject: [PATCH] modified: src/theme.rs modified: src/widget.rs --- src/theme.rs | 11 ++++------- src/widget.rs | 5 +++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/theme.rs b/src/theme.rs index 8fda4b3..58b907b 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -5,11 +5,8 @@ use iced::Length::Fill; use iced::{widget::container, window, Theme, Element, Settings, Task as Command}; use iced::widget::{button, column, pick_list, radio, text, Column, Container, scrollable}; -pub const SF_FONT: Font = Font { - family: iced::font::Family::Name("SF Pro Text"), - weight: iced::font::Weight::Medium, - stretch: iced::font::Stretch::Normal, - style: iced::font::Style::Normal +pub const SF_FONT = Font::External { + }; pub fn get_default_theme() -> Theme { @@ -24,8 +21,8 @@ pub fn get_default_theme() -> Theme { pub fn basic_button_theme(theme: &Theme, _status: Status) -> Style { Style { - background: Some(Background::Color(Color::from_rgb8(0, 122, 255))), - text_color: theme.palette().text, + background: Some(Background::Color(Color::from_rgb8(0, 0, 0))), + text_color: Color::from_rgb8(255, 255, 255), // theme.palette().text border: Border { color: Color::TRANSPARENT, width: 0.0, diff --git a/src/widget.rs b/src/widget.rs index 1d20119..a5eb5e0 100644 --- a/src/widget.rs +++ b/src/widget.rs @@ -3,6 +3,7 @@ use iced::{widget::{button, container, text}, Length::Fill}; use crate::{theme, Message}; -pub fn basic_btn(str: &str) -> button::Button { - button(text(str).center().font(theme::SF_FONT).size(13.0).line_height(16.)).width(109).height(22).style(theme::basic_button_theme) +pub fn basic_btn(s: &str) -> button::Button { + //button(text(str).center().font(theme::SF_FONT).size(13.0).line_height(16.)).width(109).height(22).style(theme::basic_button_theme) + button(text(s).center().font(theme::SF_FONT).size(13.0).line_height(1.6)).width(109).style(theme::basic_button_theme) } \ No newline at end of file