mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +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
|
// Dependencies
|
||||||
public Content $content;
|
public Content $content;
|
||||||
|
|
||||||
// Extras
|
|
||||||
protected ?string $_source = null;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Content $content
|
Content $content
|
||||||
) {
|
) {
|
||||||
|
|
@ -113,9 +110,9 @@ abstract class Markup
|
||||||
GdkEvent $event
|
GdkEvent $event
|
||||||
): bool
|
): bool
|
||||||
{
|
{
|
||||||
/* @TODO Gtk::timeout_add
|
/* @TODO unstable solution
|
||||||
$this->set(
|
$this->set(
|
||||||
$this->_source
|
// source
|
||||||
); */
|
); */
|
||||||
|
|
||||||
return false;
|
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
|
class Gemtext extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Content\Markup
|
||||||
{
|
{
|
||||||
public function set(
|
public function set(
|
||||||
string $value
|
string $source
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
Gtk::timeout_add( // await for renderer dimensions init
|
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)
|
if ($this->content->page->content->gtk->get_allocated_width() > Markup::WRAP_WIDTH)
|
||||||
{
|
{
|
||||||
$this->gtk->set_markup(
|
$this->gtk->set_markup(
|
||||||
Markup::format(
|
Markup::format(
|
||||||
$this->_source = $value,
|
$source,
|
||||||
$this->content->page->navbar->request->getValue(),
|
$this->content->page->navbar->request->getValue(),
|
||||||
$this->content->page->content->gtk->get_allocated_width(),
|
$this->content->page->content->gtk->get_allocated_width(),
|
||||||
$title
|
$title
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class Plain extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Conten
|
||||||
{
|
{
|
||||||
$this->gtk->set_markup(
|
$this->gtk->set_markup(
|
||||||
Markup::format(
|
Markup::format(
|
||||||
$this->_source = $source
|
$source
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue