tweaks
This commit is contained in:
parent
3c9a60c625
commit
e596fdfe29
14
src/main.rs
14
src/main.rs
|
@ -11,17 +11,17 @@ use cosmic::iced::{
|
||||||
self, event, window, Color, Length, Padding, Point,
|
self, event, window, Color, Length, Padding, Point,
|
||||||
};
|
};
|
||||||
use cosmic::iced_futures::Subscription;
|
use cosmic::iced_futures::Subscription;
|
||||||
use cosmic::iced_widget::{column, row, toggler, Toggler};
|
use cosmic::iced_widget::{column, row};
|
||||||
use cosmic::prelude::*;
|
use cosmic::prelude::*;
|
||||||
use cosmic::widget::dnd_destination::DragId;
|
use cosmic::widget::dnd_destination::DragId;
|
||||||
use cosmic::widget::nav_bar::nav_bar_style;
|
use cosmic::widget::nav_bar::nav_bar_style;
|
||||||
use cosmic::widget::segmented_button::Entity;
|
use cosmic::widget::segmented_button::Entity;
|
||||||
use cosmic::widget::text;
|
|
||||||
use cosmic::widget::tooltip::Position as TPosition;
|
use cosmic::widget::tooltip::Position as TPosition;
|
||||||
use cosmic::widget::{
|
use cosmic::widget::{
|
||||||
button, horizontal_space, nav_bar, tooltip, Space,
|
button, horizontal_space, nav_bar, tooltip, Space,
|
||||||
};
|
};
|
||||||
use cosmic::widget::{icon, slider};
|
use cosmic::widget::{icon, slider};
|
||||||
|
use cosmic::widget::{text, toggler};
|
||||||
use cosmic::{executor, Application, ApplicationExt, Element};
|
use cosmic::{executor, Application, ApplicationExt, Element};
|
||||||
use cosmic::{widget::Container, Theme};
|
use cosmic::{widget::Container, Theme};
|
||||||
use crisp::types::Value;
|
use crisp::types::Value;
|
||||||
|
@ -73,11 +73,13 @@ fn main() -> Result<()> {
|
||||||
let settings;
|
let settings;
|
||||||
if args.ui {
|
if args.ui {
|
||||||
debug!("main view");
|
debug!("main view");
|
||||||
settings = Settings::default().debug(false);
|
settings = Settings::default().debug(false).is_daemon(true);
|
||||||
} else {
|
} else {
|
||||||
debug!("window view");
|
debug!("window view");
|
||||||
settings =
|
settings = Settings::default()
|
||||||
Settings::default().debug(false).no_main_window(true);
|
.debug(false)
|
||||||
|
.no_main_window(true)
|
||||||
|
.is_daemon(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
cosmic::app::run::<App>(settings, args)
|
cosmic::app::run::<App>(settings, args)
|
||||||
|
@ -294,7 +296,7 @@ impl cosmic::Application for App {
|
||||||
vec![]
|
vec![]
|
||||||
}
|
}
|
||||||
fn header_end(&self) -> Vec<Element<Self::Message>> {
|
fn header_end(&self) -> Vec<Element<Self::Message>> {
|
||||||
let editor_toggle = Toggler::new(self.editor_mode.is_some())
|
let editor_toggle = toggler(self.editor_mode.is_some())
|
||||||
.label("Editor")
|
.label("Editor")
|
||||||
.spacing(10)
|
.spacing(10)
|
||||||
.on_toggle(Message::EditorToggle);
|
.on_toggle(Message::EditorToggle);
|
||||||
|
|
|
@ -574,7 +574,8 @@ pub(crate) fn slide_view<'a>(
|
||||||
let black = Container::new(Space::new(0, 0))
|
let black = Container::new(Space::new(0, 0))
|
||||||
.style(|_| {
|
.style(|_| {
|
||||||
container::background(Background::Color(Color::BLACK))
|
container::background(Background::Color(Color::BLACK))
|
||||||
}).clip(true)
|
})
|
||||||
|
.clip(true)
|
||||||
.width(size.width)
|
.width(size.width)
|
||||||
.height(height);
|
.height(height);
|
||||||
let container = match slide.background().kind {
|
let container = match slide.background().kind {
|
||||||
|
|
Loading…
Reference in a new issue