Button restyle

This commit is contained in:
2026-08-01 17:16:58 +03:00
parent d9bd1b1b86
commit 4d6de8a02c
12 changed files with 82 additions and 63 deletions
+10 -12
View File
@@ -1,20 +1,18 @@
use crate::data_provider::settings::{delete_settings, set_setting};
use crate::dictionary::app_data_dir;
use crate::navigation::Page::PreviousPage;
use crate::navigation::{NavigatedPage, Page};
use crate::styling::*;
use crate::sync::SyncMessage::NextAnimation;
use crate::{fill_state, AppState, RootMessage};
use iced::widget::button::danger;
use iced::widget::container::rounded_box;
use iced::widget::{button, column, container, progress_bar, row, scrollable, space, text};
use iced::widget::{button, column, container, progress_bar, row, space, text};
use iced::{Center, Element, Fill, Font, Left, Length, Task};
use std::io;
use std::sync::{Arc, Mutex};
use std::time::Duration;
use iced::border::width;
use iced::widget::operation::scroll_to;
use zstd::{Decoder, Encoder, DEFAULT_COMPRESSION_LEVEL};
use crate::navigation::{NavigatedPage, Page};
use crate::navigation::Page::PreviousPage;
use crate::styling::*;
const API_URL: &str = "https://learning.micialware.ru/";
/*const API_URL: &str = "http://localhost:8089/";*/
@@ -159,7 +157,7 @@ impl SyncState {
pub fn view(&self) -> Element<'_, SyncMessage> {
container(
column![
button("Назад").on_press(SyncMessage::Back),
button("Назад").style(jl_button).on_press(SyncMessage::Back),
row![space().width(Fill), self.sync_column(), space().width(Fill)]
.spacing(DEFAULT_SPACING)
.width(Fill)
@@ -189,13 +187,13 @@ impl SyncState {
)
.style(rounded_box),
button("Скопировать в буфер обмена")
button("Скопировать в буфер обмена").style(jl_button)
.on_press(SyncMessage::CopyKey)
.width(Fill),
row![
button("↑ Отправить").on_press(SyncMessage::Send),
button("↑ Отправить").style(jl_button).on_press(SyncMessage::Send),
space().width(Fill),
button("↓ Скачать").on_press(SyncMessage::GetLast)
button("↓ Скачать").style(jl_button).on_press(SyncMessage::GetLast)
]
.spacing(DEFAULT_SPACING),
container(network_view).width(Fill),
@@ -205,8 +203,8 @@ impl SyncState {
]
} else {
column![
button("Создать сохранение").on_press(SyncMessage::InitSync),
button("Вставить ключ из буфера").on_press(SyncMessage::GetKey),
button("Создать сохранение").style(jl_button).on_press(SyncMessage::InitSync),
button("Вставить ключ из буфера").style(jl_button).on_press(SyncMessage::GetKey),
]
}
}