mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
initial commit
This commit is contained in:
parent
ad638650ac
commit
8c2cf42ca7
16 changed files with 541 additions and 0 deletions
59
src/Yoda.php
Normal file
59
src/Yoda.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
// Load dependencies
|
||||
require_once __DIR__ .
|
||||
DIRECTORY_SEPARATOR . '..'.
|
||||
DIRECTORY_SEPARATOR . 'vendor' .
|
||||
DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
|
||||
// Init config
|
||||
$config = \Yggverse\Yoda\Model\File::getConfig();
|
||||
|
||||
// Init GTK
|
||||
\Gtk::init();
|
||||
|
||||
// Init theme
|
||||
$css = new \GtkCssProvider();
|
||||
|
||||
$css->load_from_data(
|
||||
\Yggverse\Yoda\Model\File::getTheme(
|
||||
$config->theme
|
||||
)
|
||||
);
|
||||
|
||||
$style = new \GtkStyleContext();
|
||||
|
||||
$style->add_provider_for_screen(
|
||||
$css,
|
||||
600
|
||||
);
|
||||
|
||||
// Init app window
|
||||
$window = new \GtkWindow();
|
||||
|
||||
$window->set_size_request(
|
||||
600,
|
||||
480
|
||||
);
|
||||
|
||||
$window->set_title(
|
||||
'Yoda'
|
||||
);
|
||||
|
||||
$window->connect(
|
||||
'destroy',
|
||||
function()
|
||||
{
|
||||
\Gtk::main_quit();
|
||||
}
|
||||
);
|
||||
|
||||
$main = new \Yggverse\Yoda\Box\Main();
|
||||
|
||||
$window->add(
|
||||
$main->box
|
||||
);
|
||||
|
||||
$window->show_all();
|
||||
|
||||
\Gtk::main();
|
||||
Loading…
Add table
Add a link
Reference in a new issue