add css theme support

This commit is contained in:
yggverse 2024-07-09 22:45:27 +03:00
parent aa066ee178
commit 4258c9b5e0
2 changed files with 16 additions and 0 deletions

View file

@ -36,4 +36,20 @@ $browser->gtk->connect(
}
);
// Init theme
$css = new \GtkCssProvider;
$css->load_from_file(
__DIR__ .
DIRECTORY_SEPARATOR . 'theme' .
DIRECTORY_SEPARATOR . 'default.css'
);
$style = new \GtkStyleContext;
$style->add_provider_for_screen(
$css,
600
);
\Gtk::main();