Add button
This commit is contained in:
parent
54dc50edb6
commit
e13df0eb72
12
src/main.rs
12
src/main.rs
@ -1,5 +1,5 @@
|
||||
use gtk::prelude::*;
|
||||
use gtk::{Application, ApplicationWindow};
|
||||
use gtk::{Application, ApplicationWindow, Button};
|
||||
|
||||
const APP_ID: &'static str = "org.gtk-rs.Gamarjoba";
|
||||
|
||||
@ -10,9 +10,19 @@ fn main() {
|
||||
}
|
||||
|
||||
fn build_ui(app: &Application) {
|
||||
|
||||
let button = Button::builder()
|
||||
.label("Hit me!")
|
||||
.margin_top(12)
|
||||
.margin_bottom(12)
|
||||
.margin_start(12)
|
||||
.margin_end(12)
|
||||
.build();
|
||||
|
||||
let window = ApplicationWindow::builder()
|
||||
.application(app)
|
||||
.title("Gamarjoba from GTK4")
|
||||
.child(&button)
|
||||
.build();
|
||||
|
||||
window.present();
|
||||
|
Loading…
Reference in New Issue
Block a user