mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
make markup label focusable, remove event methods abstraction
This commit is contained in:
parent
564fd4b95f
commit
c78ad29f1c
3 changed files with 10 additions and 40 deletions
|
|
@ -36,10 +36,6 @@ abstract class Markup
|
|||
true
|
||||
);
|
||||
|
||||
$this->gtk->set_can_focus(
|
||||
false
|
||||
);
|
||||
|
||||
$this->gtk->set_track_visited_links(
|
||||
true
|
||||
);
|
||||
|
|
@ -82,15 +78,21 @@ abstract class Markup
|
|||
);
|
||||
}
|
||||
|
||||
abstract protected function _onActivateLink(
|
||||
protected function _onActivateLink(
|
||||
GtkLabel $label,
|
||||
string $href
|
||||
): bool;
|
||||
): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
abstract protected function _onButtonPressEvent(
|
||||
protected function _onButtonPressEvent(
|
||||
GtkLabel $label,
|
||||
GdkEvent $event
|
||||
): bool;
|
||||
): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
abstract public function set(
|
||||
string $value
|
||||
|
|
|
|||
|
|
@ -280,18 +280,6 @@ class Gemtext extends Markup
|
|||
);
|
||||
}
|
||||
|
||||
protected function _onButtonPressEvent(
|
||||
GtkLabel $label,
|
||||
GdkEvent $event
|
||||
): bool
|
||||
{
|
||||
// Markup container has focus event disabled (hidden cursor position)
|
||||
// this solution deactivates Request entry on click Markup area
|
||||
$this->content->page->container->tab->gtk->grab_focus();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function _wrap(
|
||||
string $value
|
||||
): string
|
||||
|
|
|
|||
|
|
@ -24,24 +24,4 @@ class Plain extends Markup
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
protected function _onActivateLink(
|
||||
GtkLabel $label,
|
||||
string $href
|
||||
): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function _onButtonPressEvent(
|
||||
GtkLabel $label,
|
||||
GdkEvent $event
|
||||
): bool
|
||||
{
|
||||
// Markup container has focus event disabled (hidden cursor position)
|
||||
// this solution deactivates Request entry on click Markup area
|
||||
$this->content->page->container->tab->gtk->grab_focus();
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue