mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
use const for default values, use namespace
This commit is contained in:
parent
8a622ec335
commit
c985cf20af
20 changed files with 157 additions and 130 deletions
|
|
@ -7,24 +7,26 @@ namespace Yggverse\Yoda\Entity;
|
|||
use \Yggverse\Yoda\Entity\Browser\Header;
|
||||
use \Yggverse\Yoda\Entity\Browser\Container;
|
||||
|
||||
use \Yggverse\Yoda\Model\Database;
|
||||
|
||||
class Browser
|
||||
{
|
||||
public \GtkWindow $gtk;
|
||||
|
||||
// Dependencies
|
||||
public \Yggverse\Yoda\Model\Database $database;
|
||||
public Database $database;
|
||||
|
||||
// Requirements
|
||||
public \Yggverse\Yoda\Entity\Browser\Header $header;
|
||||
public \Yggverse\Yoda\Entity\Browser\Container $container;
|
||||
public Header $header;
|
||||
public Container $container;
|
||||
|
||||
// Defaults
|
||||
private int $_width = 640;
|
||||
private int $_height = 480;
|
||||
private bool $_maximize = true;
|
||||
public const WIDTH = 640;
|
||||
public const HEIGHT = 640;
|
||||
public const MAXIMIZE = true;
|
||||
|
||||
public function __construct(
|
||||
\Yggverse\Yoda\Model\Database $database
|
||||
Database $database
|
||||
) {
|
||||
// Init dependencies
|
||||
$this->database = $database;
|
||||
|
|
@ -33,11 +35,11 @@ class Browser
|
|||
$this->gtk = new \GtkWindow;
|
||||
|
||||
$this->gtk->set_size_request(
|
||||
$this->_width,
|
||||
$this->_height
|
||||
$this::WIDTH,
|
||||
$this::HEIGHT
|
||||
);
|
||||
|
||||
if ($this->_maximize)
|
||||
if ($this::MAXIMIZE)
|
||||
{
|
||||
$this->gtk->maximize();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue