39 lines
1.1 KiB
Rust
39 lines
1.1 KiB
Rust
use adw::prelude::*;
|
|
|
|
fn main() {
|
|
let adw_app = adw::Application::builder().build();
|
|
|
|
adw_app.connect_activate(move |adw_app| {
|
|
let window = gtk::ApplicationWindow::builder()
|
|
.application(adw_app)
|
|
.width_request(400)
|
|
.height_request(400)
|
|
.build();
|
|
|
|
let sunrise_button = gtk::Button::builder()
|
|
.icon_name("daytime-sunrise-symbolic")
|
|
.width_request(64)
|
|
.height_request(64)
|
|
.build();
|
|
|
|
let walking_button = gtk::Button::builder()
|
|
.icon_name("walking2-symbolic")
|
|
.width_request(64)
|
|
.height_request(64)
|
|
.build();
|
|
|
|
let layout = gtk::Box::builder()
|
|
.orientation(gtk::Orientation::Horizontal)
|
|
.valign(gtk::Align::Start)
|
|
.build();
|
|
layout.append(&sunrise_button);
|
|
layout.append(&walking_button);
|
|
|
|
window.set_child(Some(&layout));
|
|
window.present();
|
|
});
|
|
|
|
let args: Vec<String> = std::env::args().collect();
|
|
ApplicationExtManual::run_with_args(&adw_app, &args);
|
|
}
|