Compare commits
No commits in common. "9e962ab9ac4db2d1ba484e5948503c7d49fc0fe8" and "54dc50edb67dc05aa7dac7e821881b3e6e6db8d3" have entirely different histories.
9e962ab9ac
...
54dc50edb6
16
src/main.rs
16
src/main.rs
@ -1,5 +1,5 @@
|
|||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
use gtk::{Application, ApplicationWindow, Button};
|
use gtk::{Application, ApplicationWindow};
|
||||||
|
|
||||||
const APP_ID: &'static str = "org.gtk-rs.Gamarjoba";
|
const APP_ID: &'static str = "org.gtk-rs.Gamarjoba";
|
||||||
|
|
||||||
@ -10,23 +10,9 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn build_ui(app: &Application) {
|
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();
|
|
||||||
|
|
||||||
button.connect_clicked(move |button| {
|
|
||||||
button.set_label("Hahaha! Gay!");
|
|
||||||
});
|
|
||||||
|
|
||||||
let window = ApplicationWindow::builder()
|
let window = ApplicationWindow::builder()
|
||||||
.application(app)
|
.application(app)
|
||||||
.title("Gamarjoba from GTK4")
|
.title("Gamarjoba from GTK4")
|
||||||
.child(&button)
|
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
window.present();
|
window.present();
|
||||||
|
Loading…
Reference in New Issue
Block a user