local: integrate yoda libcosmic and fix thumbnail hang
This commit is contained in:
parent
b162e335db
commit
a8497eaf21
15 changed files with 2283 additions and 14 deletions
12
src/main.rs
12
src/main.rs
|
|
@ -8,10 +8,10 @@ use cosmic::iced::event::{self, Event};
|
|||
use cosmic::iced::keyboard::key::Physical;
|
||||
use cosmic::iced::keyboard::{Event as KeyEvent, Key, Modifiers};
|
||||
use cosmic::iced::mouse::{Event as MouseEvent, ScrollDelta};
|
||||
use cosmic::iced::window::{self, set_mode};
|
||||
use cosmic::iced::{
|
||||
Alignment, Background, Border, Color, ContentFit, Length, Limits, Subscription,
|
||||
Alignment, Background, Border, Color, ContentFit, Length, Limits, Subscription, exit, window,
|
||||
};
|
||||
use cosmic::iced::window::set_mode;
|
||||
use cosmic::widget::menu::action::MenuAction;
|
||||
use cosmic::widget::{self, Slider, nav_bar, segmented_button};
|
||||
use cosmic::{Application, ApplicationExt, Element, action, cosmic_theme, executor, font, theme};
|
||||
|
|
@ -971,6 +971,11 @@ impl Application for App {
|
|||
}
|
||||
}
|
||||
|
||||
fn on_app_exit(&mut self) -> Option<Self::Message> {
|
||||
self.close();
|
||||
None
|
||||
}
|
||||
|
||||
fn on_nav_select(&mut self, id: nav_bar::Id) -> Task<Message> {
|
||||
// Toggle open state and get clone of node data
|
||||
let node_opt = match self.nav_model.data_mut::<ProjectNode>(id) {
|
||||
|
|
@ -1649,7 +1654,8 @@ impl Application for App {
|
|||
return self.update_config();
|
||||
}
|
||||
Message::WindowClose => {
|
||||
process::exit(0);
|
||||
self.close();
|
||||
return exit();
|
||||
}
|
||||
}
|
||||
Task::none()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue