clean up extras

This commit is contained in:
yggverse 2024-08-01 18:40:13 +03:00
parent cd2e769f14
commit 2fa95c2ed3
3 changed files with 6 additions and 9 deletions

View file

@ -16,9 +16,6 @@ abstract class Markup
// Dependencies
public Content $content;
// Extras
protected ?string $_source = null;
public function __construct(
Content $content
) {
@ -113,9 +110,9 @@ abstract class Markup
GdkEvent $event
): bool
{
/* @TODO Gtk::timeout_add
/* @TODO unstable solution
$this->set(
$this->_source
// source
); */
return false;

View file

@ -18,17 +18,17 @@ use \Yggverse\Yoda\Model\Gtk\Pango\Markup\Gemtext as Markup;
class Gemtext extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Content\Markup
{
public function set(
string $value
string $source
): void
{
Gtk::timeout_add( // await for renderer dimensions init
1, function(?string $title = null) use ($value)
1, function(?string $title = null) use ($source)
{
if ($this->content->page->content->gtk->get_allocated_width() > Markup::WRAP_WIDTH)
{
$this->gtk->set_markup(
Markup::format(
$this->_source = $value,
$source,
$this->content->page->navbar->request->getValue(),
$this->content->page->content->gtk->get_allocated_width(),
$title

View file

@ -14,7 +14,7 @@ class Plain extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Conten
{
$this->gtk->set_markup(
Markup::format(
$this->_source = $source
$source
)
);
}