mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
refactor to separated entities, init abstractions
This commit is contained in:
parent
08c9fe76e5
commit
90acc3ac2d
47 changed files with 1927 additions and 2069 deletions
35
src/Entity/Window/Tab/Address/Title.php
Normal file
35
src/Entity/Window/Tab/Address/Title.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yggverse\Yoda\Entity\Window\Tab\Address;
|
||||
|
||||
class Title
|
||||
{
|
||||
public \GtkLabel $gtk;
|
||||
|
||||
public \Yggverse\Yoda\Entity\Window\Tab\Address $address;
|
||||
|
||||
// Defaults
|
||||
private int $_ellipsize = 3;
|
||||
private int $_length = 12;
|
||||
private string $_value = 'New address';
|
||||
|
||||
public function __construct(
|
||||
\Yggverse\Yoda\Entity\Window\Tab\Address $address,
|
||||
) {
|
||||
$this->address = $address;
|
||||
|
||||
$this->gtk = new \GtkLabel(
|
||||
$this->_value
|
||||
);
|
||||
|
||||
$this->gtk->set_width_chars(
|
||||
$this->_length
|
||||
);
|
||||
|
||||
$this->gtk->set_ellipsize(
|
||||
$this->_ellipsize
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue