snora 0.8.0

iced engine for the Snora GUI framework. Consumes snora-core vocabulary.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Dialog — the centered modal card.

use iced::{Element, widget::center};
use snora_core::Dialog;

/// Center the dialog content in the window. The surrounding dim layer is
/// owned by [`crate::render::render`].
pub(crate) fn render_dialog<'a, Message>(
    dialog: Dialog<Element<'a, Message>, Message>,
) -> Element<'a, Message>
where
    Message: Clone + 'a,
{
    center(dialog.content).into()
}