app: keep the clip name out of the delete dialog
A long recording id pushed the wording past the panel's edge. The dialog now says the deletion plainly and leaves the naming to the card the dialog was opened from.
This commit is contained in:
1 parent
e7c9c5b672
commit
146256714b
1 file changed
+1
-13
@@ -301,10 +301,7 @@ pub fn delete_dialog(app: &App, p: Paint, layer: &mut Vec<El>) {
|
||||
.color(p.t.text),
|
||||
)
|
||||
.child(
|
||||
text(format!(
|
||||
"\"{}.mp4\" is deleted from disk. The recording stays.",
|
||||
delete_name(app)
|
||||
))
|
||||
text("This will delete the file from disk. The recording stays.")
|
||||
.key("delete-note")
|
||||
.font(body(12.0))
|
||||
.color(p.muted()),
|
||||
@@ -365,12 +362,3 @@ fn delete_confirmed(app: &mut App) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The clip the delete dialog is about, for the dialog's wording.
|
||||
fn delete_name(app: &App) -> String {
|
||||
app.confirm_clip_delete
|
||||
.as_ref()
|
||||
.and_then(|name| app.clips.iter().find(|clip| &clip.name == name))
|
||||
.map(|clip| clip.name.clone())
|
||||
.unwrap_or_default()
|
||||
}
|
||||
Reference in new issue
Block a user