add custom failure icons support

This commit is contained in:
yggverse 2024-10-31 22:40:48 +02:00
parent 41875de347
commit ae1d3531bf
3 changed files with 35 additions and 13 deletions

View file

@ -17,9 +17,15 @@ impl Status {
/// Create new failure preset
///
/// Useful as placeholder widget for error handlers
pub fn new_failure(title: Option<&str>, description: Option<&str>) -> Self {
pub fn new_failure(
title: Option<&str>,
description: Option<&str>,
icon_name: Option<&str>,
) -> Self {
Self {
gobject: Failure::new(title, description, None).gobject().clone(),
gobject: Failure::new(title, description, icon_name)
.gobject()
.clone(),
}
}