build: return to stable iced version
I initially thought that only the git version had a clipboard at all, but that's incorrect; what 0.15 adds is rich clipboard (images, etc)
This commit is contained in:
parent
b7c5a05c6e
commit
8e6fa9be2f
3 changed files with 426 additions and 270 deletions
680
Cargo.lock
generated
680
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -10,7 +10,4 @@ keepass = "0.13.22"
|
||||||
rfd = "0.17.2"
|
rfd = "0.17.2"
|
||||||
|
|
||||||
[dependencies.iced]
|
[dependencies.iced]
|
||||||
version = "0.15.0-dev"
|
version = "0.14.0"
|
||||||
|
|
||||||
[patch.crates-io]
|
|
||||||
iced.git = "https://github.com/iced-rs/iced"
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ enum Message {
|
||||||
SelectionRight,
|
SelectionRight,
|
||||||
|
|
||||||
Copy,
|
Copy,
|
||||||
Copied(Result<(), clipboard::Error>),
|
|
||||||
|
|
||||||
FocusNext,
|
FocusNext,
|
||||||
FocusPrevious,
|
FocusPrevious,
|
||||||
|
|
@ -141,17 +140,11 @@ impl State {
|
||||||
db::BasicField::Password => entry_ref.get_password(),
|
db::BasicField::Password => entry_ref.get_password(),
|
||||||
db::BasicField::Url => entry_ref.get_url(),
|
db::BasicField::Url => entry_ref.get_url(),
|
||||||
} {
|
} {
|
||||||
return clipboard::write(str.to_owned()).map(Message::Copied);
|
return clipboard::write(str.to_owned());
|
||||||
} else {
|
} else {
|
||||||
self.error = "nothing to copy!".into();
|
self.error = "nothing to copy!".into();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Message::Copied(result) => {
|
|
||||||
self.error = result
|
|
||||||
.err()
|
|
||||||
.map(|e| format!("{e:?}").into())
|
|
||||||
.unwrap_or_default();
|
|
||||||
}
|
|
||||||
|
|
||||||
Message::FocusNext => return widget::operation::focus_next(),
|
Message::FocusNext => return widget::operation::focus_next(),
|
||||||
Message::FocusPrevious => return widget::operation::focus_previous(),
|
Message::FocusPrevious => return widget::operation::focus_previous(),
|
||||||
|
|
@ -360,10 +353,10 @@ pub fn run() -> Result<(), iced::Error> {
|
||||||
.subscription(State::subscription)
|
.subscription(State::subscription)
|
||||||
.theme(theme::Theme::custom(
|
.theme(theme::Theme::custom(
|
||||||
"high-contrast-dark",
|
"high-contrast-dark",
|
||||||
theme::palette::Seed {
|
theme::Palette {
|
||||||
background: Color::from_rgb8(10, 10, 10),
|
background: Color::from_rgb8(10, 10, 10),
|
||||||
text: Color::WHITE,
|
text: Color::WHITE,
|
||||||
..theme::palette::Seed::DARK
|
..theme::Palette::DARK
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
.run()
|
.run()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue