ES
<?phpnamespace App\Gui;use JumPHP\Gui\Theme;use JumPHP\Gui\Widget;use JumPHP\Renderer\Renderer;/** * A line of one pixel between two areas (under the toolbar, between the tree and the tabs), with no margin (the engine's * separator has some). * * @property bool $vertical * @property string $color */final class Rule extends Widget{    public const DEFAULTS = ['vertical' => false, 'color' => '#d7dce4'];    protected function content(Theme $t, float $maxWidth, string $breakpoint): array    {        $line = max(1, round($t->scale));        return $this->props['vertical'] ? [$line, 0] : [$maxWidth, $line];    }    public function stretches(string $axis): bool    {        return $this->props['vertical'] ? $axis === 'height' : $axis === 'width';    }    public function render(Renderer $r, Theme $t): void    {        $r->fillRect($this->x, $this->y, max(1, $this->w), max(1, $this->h), (string)$this->props['color']);    }}