Fix for windows.

This commit is contained in:
sergiotarxz 2024-03-11 18:17:45 +01:00
parent 082b1d173d
commit e7e1c7b8f6

View File

@ -65,17 +65,11 @@ sub start {
my $save = $self->_save;
my $pc = $save->get_pc_system;
my $box = $pc->get_box(0);
my $headerbar = Gtk4::HeaderBar->new;
$headerbar->set_decoration_layout('');
my $title_grid = Gtk4::Grid->new;
$title_grid->attach(Gtk4::Label->new('Pokémon Storage System'), 0, 0, 12, 1);
my $save_button = Gtk4::Button->new_with_label('Save');
$save_button->signal_connect(clicked => sub {
$self->_save->get_pc_system->save;
});
$title_grid->attach($save_button, 0, 1, 2, 1);
$headerbar->set_title_widget($title_grid);
$gtk_window->set_titlebar($headerbar);
$gtk_window->set_title('PC Storage System');
$controller_gesture->set_button(1);
$self->_current_box($box);
$controller_gesture->signal_connect(
@ -121,7 +115,12 @@ sub start {
$self->draw_cursor($cairo);
}
);
$gtk_window->set_child($canvas);
my $window_box = Gtk4::Box->new('vertical', 1);
$window_box->append($save_button);
$canvas->set_hexpand(1);
$canvas->set_vexpand(1);
$window_box->append($canvas);
$gtk_window->set_child($window_box);
$gtk_window->present;
Glib::Timeout->add(
1000 / 15,