Skip to content

Commit

Permalink
Remove editable_input
Browse files Browse the repository at this point in the history
  • Loading branch information
edfloreshz committed Mar 31, 2024
1 parent 09688c6 commit 85664b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ fork = "0.1"
[build-dependencies]
vergen = { version = "8", features = ["git", "gitcl"] }

[patch."https://github.com/pop-os/libcosmic.git"]
libcosmic = { git = "https://github.com/edfloreshz/libcosmic.git", branch = "editable_input_internal" }
#[patch."https://github.com/pop-os/libcosmic.git"]
#libcosmic = { git = "https://github.com/edfloreshz/libcosmic.git", branch = "editable_input_internal" }

#[patch."https://github.com/pop-os/libcosmic.git"]
#libcosmic = { path = "../libcosmic" }
Expand Down
8 changes: 1 addition & 7 deletions src/details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ pub enum Message {
OpenCalendarDialog,
SetDueDate(NaiveDate),
SubTaskEditDone,
EditMode(bool),
}

pub enum Command {
Expand Down Expand Up @@ -75,9 +74,6 @@ impl Details {
pub fn update(&mut self, message: Message) -> Vec<Command> {
let mut commands = vec![];
match message {
Message::EditMode(is_editable) => {
println!("{is_editable}");
}
Message::SetTitle(title) => {
if let Some(ref mut task) = &mut self.task {
task.title = title.clone();
Expand Down Expand Up @@ -178,11 +174,9 @@ impl Details {
.id(widget::Id::new("sub_task_input"))
.on_input(move |title| Message::SetSubTaskTitle(i, title))
.on_submit(Message::SubTaskEditDone)
.editable()
.trailing_icon(widget::button(get_icon("edit-symbolic", 16)).into())
.on_toggle_edit(Message::EditMode)
.into(),
widget::button(config::get_icon("user-trash-full-symbolic", 18))
.padding(space_xxs)
.style(widget::button::Style::Destructive)
.on_press(Message::DeleteSubTask(i))
.into(),
Expand Down

0 comments on commit 85664b4

Please sign in to comment.