mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
fix wrap calculation
This commit is contained in:
parent
1a3c66f336
commit
4e565a72b2
1 changed files with 9 additions and 2 deletions
|
|
@ -169,9 +169,16 @@ class Markup implements \Yggverse\Yoda\Interface\Model\Gtk\Pango\Markup
|
||||||
{
|
{
|
||||||
foreach (explode(' ', $string) as $word)
|
foreach (explode(' ', $string) as $word)
|
||||||
{
|
{
|
||||||
if (isset($words[$line]) && self::_width(implode(' ', $words[$line])) > $width)
|
if (isset($words[$line]))
|
||||||
{
|
{
|
||||||
$line++;
|
$try = implode(
|
||||||
|
' ' , $words[$line]
|
||||||
|
) . ' ' . $word;
|
||||||
|
|
||||||
|
if (self::_width($try) > $width)
|
||||||
|
{
|
||||||
|
$line++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$words[$line][] = $word;
|
$words[$line][] = $word;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue