Compare commits

..

No commits in common. "79eff08addcfcd2df7b4432fe704d639c51b8e2b" and "2c296a1a1fb4508ffdc58896c575a94dcb9725d7" have entirely different histories.

4 changed files with 34 additions and 43 deletions

View file

@ -1,4 +0,0 @@
;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")
((nil . ((dape-command . (lldb-dap :program "target/debug/lumina" :args ["-i" "test_presentation.lisp"])))))

View file

@ -43,8 +43,8 @@ git = "https://github.com/jackpot51/iced_video_player.git"
branch = "cosmic" branch = "cosmic"
features = ["wgpu"] features = ["wgpu"]
# [profile.dev] [profile.dev]
# opt-level = 3 opt-level = 3
[profile.release] [profile.release]
opt-level = 3 opt-level = 3

View file

@ -42,7 +42,6 @@
stdenv stdenv
gnumake gnumake
gdb gdb
lldb
cmake cmake
makeWrapper makeWrapper
vulkan-headers vulkan-headers

View file

@ -278,42 +278,38 @@ impl cosmic::Application for App {
.iter() .iter()
.enumerate() .enumerate()
.map(|(index, item)| { .map(|(index, item)| {
let button = button::standard(item.title.clone()) dnd_destination(tooltip( button::standard(item.title.clone())
.leading_icon({ .leading_icon({
match item.kind { match item.kind {
core::kinds::ServiceItemKind::Song(_) => { core::kinds::ServiceItemKind::Song(_) => {
icon::from_name("folder-music-symbolic") icon::from_name("folder-music-symbolic")
}, },
core::kinds::ServiceItemKind::Video(_) => { core::kinds::ServiceItemKind::Video(_) => {
icon::from_name("folder-videos-symbolic") icon::from_name("folder-videos-symbolic")
}, },
core::kinds::ServiceItemKind::Image(_) => { core::kinds::ServiceItemKind::Image(_) => {
icon::from_name("folder-pictures-symbolic") icon::from_name("folder-pictures-symbolic")
}, },
core::kinds::ServiceItemKind::Presentation(_) => { core::kinds::ServiceItemKind::Presentation(_) => {
icon::from_name("x-office-presentation-symbolic") icon::from_name("x-office-presentation-symbolic")
}, },
core::kinds::ServiceItemKind::Content(_) => { core::kinds::ServiceItemKind::Content(_) => {
icon::from_name("x-office-presentation-symbolic") icon::from_name("x-office-presentation-symbolic")
}, },
} }
}) })
.class(cosmic::theme::style::Button::HeaderBar) .class(cosmic::theme::style::Button::HeaderBar)
.padding(5) .padding(5)
.width(Length::Fill) .width(Length::Fill)
.on_press(cosmic::Action::App(Message::ChangeServiceItem(index))); .on_press(cosmic::Action::App(Message::ChangeServiceItem(index))),
let tooltip = tooltip(button, text::body(item.kind.to_string()), TPosition::Right), vec!["application/service-item".into()]).data_received_for::<ServiceItem>( move |item| {
text::body(item.kind.to_string()), if let Some(item) = item {
TPosition::Right); cosmic::Action::App(Message::AddServiceItem(index, item))
dnd_destination(tooltip, vec!["application/service-item".into()]) } else {
.data_received_for::<ServiceItem>( move |item| { cosmic::Action::None
if let Some(item) = item { }
cosmic::Action::App(Message::AddServiceItem(index, item)) })
} else { .into()
cosmic::Action::None
}
})
.into()
}); });
let column = column![ let column = column![