Compare commits
2 commits
2c296a1a1f
...
79eff08add
Author | SHA1 | Date | |
---|---|---|---|
79eff08add | |||
9db93107cc |
4 changed files with 43 additions and 34 deletions
4
.dir-locals.el
Normal file
4
.dir-locals.el
Normal file
|
@ -0,0 +1,4 @@
|
|||
;;; 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"])))))
|
|
@ -43,8 +43,8 @@ git = "https://github.com/jackpot51/iced_video_player.git"
|
|||
branch = "cosmic"
|
||||
features = ["wgpu"]
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 3
|
||||
# [profile.dev]
|
||||
# opt-level = 3
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
stdenv
|
||||
gnumake
|
||||
gdb
|
||||
lldb
|
||||
cmake
|
||||
makeWrapper
|
||||
vulkan-headers
|
||||
|
|
68
src/main.rs
68
src/main.rs
|
@ -278,38 +278,42 @@ impl cosmic::Application for App {
|
|||
.iter()
|
||||
.enumerate()
|
||||
.map(|(index, item)| {
|
||||
dnd_destination(tooltip( button::standard(item.title.clone())
|
||||
.leading_icon({
|
||||
match item.kind {
|
||||
core::kinds::ServiceItemKind::Song(_) => {
|
||||
icon::from_name("folder-music-symbolic")
|
||||
},
|
||||
core::kinds::ServiceItemKind::Video(_) => {
|
||||
icon::from_name("folder-videos-symbolic")
|
||||
},
|
||||
core::kinds::ServiceItemKind::Image(_) => {
|
||||
icon::from_name("folder-pictures-symbolic")
|
||||
},
|
||||
core::kinds::ServiceItemKind::Presentation(_) => {
|
||||
icon::from_name("x-office-presentation-symbolic")
|
||||
},
|
||||
core::kinds::ServiceItemKind::Content(_) => {
|
||||
icon::from_name("x-office-presentation-symbolic")
|
||||
},
|
||||
}
|
||||
})
|
||||
.class(cosmic::theme::style::Button::HeaderBar)
|
||||
.padding(5)
|
||||
.width(Length::Fill)
|
||||
.on_press(cosmic::Action::App(Message::ChangeServiceItem(index))),
|
||||
text::body(item.kind.to_string()), TPosition::Right), vec!["application/service-item".into()]).data_received_for::<ServiceItem>( move |item| {
|
||||
if let Some(item) = item {
|
||||
cosmic::Action::App(Message::AddServiceItem(index, item))
|
||||
} else {
|
||||
cosmic::Action::None
|
||||
}
|
||||
})
|
||||
.into()
|
||||
let button = button::standard(item.title.clone())
|
||||
.leading_icon({
|
||||
match item.kind {
|
||||
core::kinds::ServiceItemKind::Song(_) => {
|
||||
icon::from_name("folder-music-symbolic")
|
||||
},
|
||||
core::kinds::ServiceItemKind::Video(_) => {
|
||||
icon::from_name("folder-videos-symbolic")
|
||||
},
|
||||
core::kinds::ServiceItemKind::Image(_) => {
|
||||
icon::from_name("folder-pictures-symbolic")
|
||||
},
|
||||
core::kinds::ServiceItemKind::Presentation(_) => {
|
||||
icon::from_name("x-office-presentation-symbolic")
|
||||
},
|
||||
core::kinds::ServiceItemKind::Content(_) => {
|
||||
icon::from_name("x-office-presentation-symbolic")
|
||||
},
|
||||
}
|
||||
})
|
||||
.class(cosmic::theme::style::Button::HeaderBar)
|
||||
.padding(5)
|
||||
.width(Length::Fill)
|
||||
.on_press(cosmic::Action::App(Message::ChangeServiceItem(index)));
|
||||
let tooltip = tooltip(button,
|
||||
text::body(item.kind.to_string()),
|
||||
TPosition::Right);
|
||||
dnd_destination(tooltip, vec!["application/service-item".into()])
|
||||
.data_received_for::<ServiceItem>( move |item| {
|
||||
if let Some(item) = item {
|
||||
cosmic::Action::App(Message::AddServiceItem(index, item))
|
||||
} else {
|
||||
cosmic::Action::None
|
||||
}
|
||||
})
|
||||
.into()
|
||||
});
|
||||
|
||||
let column = column![
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue