modified: src/theme.rs
modified: src/widget.rs
This commit is contained in:
parent
d151a73b97
commit
2c671f6228
11
src/theme.rs
11
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,
|
||||
|
@ -3,6 +3,7 @@ use iced::{widget::{button, container, text}, Length::Fill};
|
||||
use crate::{theme, Message};
|
||||
|
||||
|
||||
pub fn basic_btn(str: &str) -> button::Button<Message> {
|
||||
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<Message> {
|
||||
//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)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user