1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
//! Utility tools for creating combined icon-label widgets.
//!
//! This module allows you to quickly create horizontal groups consisting of an icon
//! and text, which is particularly useful for status bars or informative
//! list sections.
/**
* create_label_icon.rs
*
* (C) Copyright 2026 AtlantisOS Project
* by @NachtsternBuild
*
* License: GNU GENERAL PUBLIC LICENSE Version 3
*
* Usage:
* let terminal_info = create_label_icon("utilities-terminal", "Open Terminal");
* vbox.append(&terminal_info);
* let centered_info = create_label_icon_position(
* "dialog-information",
* "System ready",
* gtk4::Align::Center
* );
* vbox.append(¢ered_info);
*/
use *;
use ;
/// Creates a horizontal box with an icon and a label (left-aligned).
///
/// This function is a shortcut for [create_label_icon_position] with
/// the default alignment `Align::Start`.
///
/// # Arguments
/// * `icon_name` - The name of the icon from the system theme (e.g., "utilities-terminal").
/// * `label_text` - The text to be displayed next to the icon.
///
/// Usage:
///
/// ```rust
/// let terminal_info = create_label_icon("utilities-terminal", "Open Terminal");
/// vbox.append(&terminal_info);
/// ```
/// Creates a horizontal box with an icon and label, along with specific alignment.
///
/// Allows for precise positioning (e.g., centering) of the entire group
/// within the available space.
///
/// # Arguments
/// * `icon_name` - The identifier of the icon.
/// * `label_text` - The text to display.
/// * `alignment` - The horizontal alignment of the box ([gtk4::Align]).
///
/// # Return Value
/// Returns a [GtkBox] containing both widgets, which can be inserted directly into the
/// layout.
///
/// ```rust
/// let centered_info = create_label_icon_position(
/// "dialog-information",
/// "System ready",
/// gtk4::Align::Center
/// );
/// vbox.append(¢ered_info);
/// ```