Make label optional for checkbox widget

This commit is contained in:
Sebastiano Giordano 2025-04-03 17:29:13 +02:00 committed by Héctor Ramón Jiménez
parent a2d052982b
commit 0d2aa41dee
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
15 changed files with 87 additions and 58 deletions

View file

@ -339,7 +339,8 @@ impl Task {
fn view(&self, i: usize) -> Element<'_, TaskMessage> {
match &self.state {
TaskState::Idle => {
let checkbox = checkbox(&self.description, self.completed)
let checkbox = checkbox(self.completed)
.label(&self.description)
.on_toggle(TaskMessage::Completed)
.width(Fill)
.size(17)