Skip to main content

cosmic_applet_avestruz/views/components/
status_line.rs

1// SPDX-License-Identifier: MIT
2
3//! A line of small centred text: what a list says when it has nothing to
4//! show, and under its last row.
5
6use cosmic::Element;
7use cosmic::iced::{Alignment, Length};
8use cosmic::widget::{container, text};
9
10use crate::messages::Message;
11
12/// A line of small centred text.
13pub fn status_line<'a>(message: String) -> Element<'a, Message> {
14    container(text(message).size(12)).width(Length::Fill).align_x(Alignment::Center).padding(16).into()
15}