mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
clean up extras
This commit is contained in:
parent
cd2e769f14
commit
2fa95c2ed3
3 changed files with 6 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue