35 releases
Uses old Rust 2015
0.16.0 | May 20, 2023 |
---|---|
0.15.0 | May 17, 2022 |
0.14.0 | Feb 14, 2021 |
0.13.1 | Jul 25, 2020 |
0.0.4 | Sep 17, 2016 |
#526 in GUI
132 downloads per month
Used in titanium
135KB
3K
SLoC
Mg
Minimal UI library based on relm (GTK+), written in Rust.
Installation
Add the following line to the dependencies section of your Cargo.toml
:
[source,bash]
mg = "0.0.1"
relm = "0.9.6"
relm-attributes = "0.9.0"
relm-derive = "0.9.2"
Usage
In the view!
macro, use the Mg
widget:
[source,rust]
view! {
Mg<AppCommand, NoSettings>((MODES, "examples/main.conf", None)) {
// Place your main widget here.
gtk::Box {
}
// Connect a signal to react to commands entered by the user.
CustomCommand(command) => Command(command),
}
}
Dependencies
~18–27MB
~501K SLoC