styling fix and clippy fixes
This commit is contained in:
1 parent
1364ff62b8
commit
4137f787bf
17 files changed
+123
-75
No files matched your search
@@ -55,7 +55,7 @@ impl Appearance {
|
||||
.unwrap_or(fallback)
|
||||
.to_owned()
|
||||
};
|
||||
let palette = ferese_theme::Palette::from_resolved(&theme);
|
||||
let palette = ferese_theme::Palette::from_resolved(theme);
|
||||
let font = string("theme.typography.font_family", "Inter");
|
||||
let background = string("theme.background.path", ferese_config::default_wallpaper());
|
||||
let path = string("theme.background.lock_path", &background);
|
||||
|
||||
@@ -321,7 +321,7 @@ impl cosmic::Application for Prompt {
|
||||
});
|
||||
}
|
||||
let action = button::custom(ferese_theme::text("Authenticate", palette.font).size(13))
|
||||
.class(ferese_theme::accent_button())
|
||||
.class(ferese_theme::controls::authentication_button(palette.palette()))
|
||||
.height(Length::Fixed(36.))
|
||||
.padding([8, 16])
|
||||
.on_press_maybe((!self.waiting && !self.answer.is_empty()).then_some(Message::Submit));
|
||||
|
||||
@@ -793,10 +793,8 @@ impl cosmic::Application for App {
|
||||
|
||||
if !fields.is_empty() {
|
||||
let mut group = column([]).spacing(1);
|
||||
if self.page == Page::Appearance {
|
||||
if self.auto_details {
|
||||
group = group.push(self.auto_controls());
|
||||
}
|
||||
if self.page == Page::Appearance && self.auto_details {
|
||||
group = group.push(self.auto_controls());
|
||||
}
|
||||
for field in fields {
|
||||
if self.page == Page::Appearance
|
||||
|
||||
@@ -425,27 +425,25 @@ impl cosmic::Application for FereseShell {
|
||||
}
|
||||
self.theme_error = snapshot.error;
|
||||
}
|
||||
return self.apply_config(config);
|
||||
}
|
||||
Message::ThemeMode(mode) => {
|
||||
return cosmic::task::future(async move {
|
||||
let result = tokio::task::spawn_blocking(move || {
|
||||
let mut connection = ferese_ipc::theme::Connection::connect().map_err(|e| e.to_string())?;
|
||||
connection
|
||||
.call("theme-set-mode", serde_json::json!({"mode": mode}))
|
||||
.map(|_| ())
|
||||
})
|
||||
.await
|
||||
.unwrap_or_else(|e| Err(e.to_string()));
|
||||
cosmic::Action::App(Message::ThemeModeSet(result))
|
||||
});
|
||||
self.apply_config(config)
|
||||
}
|
||||
Message::ThemeMode(mode) => cosmic::task::future(async move {
|
||||
let result = tokio::task::spawn_blocking(move || {
|
||||
let mut connection = ferese_ipc::theme::Connection::connect().map_err(|e| e.to_string())?;
|
||||
connection
|
||||
.call("theme-set-mode", serde_json::json!({"mode": mode}))
|
||||
.map(|_| ())
|
||||
})
|
||||
.await
|
||||
.unwrap_or_else(|e| Err(e.to_string()));
|
||||
cosmic::Action::App(Message::ThemeModeSet(result))
|
||||
}),
|
||||
Message::ThemeModeSet(result) => {
|
||||
if let Err(error) = result {
|
||||
self.notifications
|
||||
.service_error("Appearance could not be changed", &error);
|
||||
}
|
||||
return Task::none();
|
||||
Task::none()
|
||||
}
|
||||
Message::BeginNoteEdit(id) => {
|
||||
let mut tasks = vec![self.finish_note_edit()];
|
||||
|
||||
@@ -547,7 +547,6 @@ impl FereseShell {
|
||||
surface.regions.clone(),
|
||||
self.config.theme.material_radius,
|
||||
)
|
||||
.into()
|
||||
} else {
|
||||
content
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user