mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 05:53:45 +00:00
user32: Wrap at whitespace rather than soft break.
This commit is contained in:
parent
90d934b5ae
commit
8e1197c92e
|
@ -604,7 +604,7 @@ static void test_DrawTextCalcRect(void)
|
||||||
textheight = DrawTextW(hdc, wordbreak_text_colonW, -1, &rect, DT_CALCRECT | DT_WORDBREAK);
|
textheight = DrawTextW(hdc, wordbreak_text_colonW, -1, &rect, DT_CALCRECT | DT_WORDBREAK);
|
||||||
ok(textheight == heightcheck * 2, "Got unexpected textheight %d, expected %d.\n",
|
ok(textheight == heightcheck * 2, "Got unexpected textheight %d, expected %d.\n",
|
||||||
textheight, heightcheck * 2);
|
textheight, heightcheck * 2);
|
||||||
todo_wine ok(rect.right > rect2.right - 10, "Got unexpected textwdith %ld, expected larger than %ld.\n",
|
ok(rect.right > rect2.right - 10, "Got unexpected textwdith %ld, expected larger than %ld.\n",
|
||||||
rect.right, rect2.right - 10);
|
rect.right, rect2.right - 10);
|
||||||
|
|
||||||
SetRect(&rect, 0, 0, 200, 1);
|
SetRect(&rect, 0, 0, 200, 1);
|
||||||
|
@ -618,7 +618,7 @@ static void test_DrawTextCalcRect(void)
|
||||||
textheight = DrawTextW(hdc, wordbreak_text_csbW, -1, &rect, DT_CALCRECT | DT_WORDBREAK);
|
textheight = DrawTextW(hdc, wordbreak_text_csbW, -1, &rect, DT_CALCRECT | DT_WORDBREAK);
|
||||||
ok(textheight == heightcheck * 2, "Got unexpected textheight %d, expected %d.\n",
|
ok(textheight == heightcheck * 2, "Got unexpected textheight %d, expected %d.\n",
|
||||||
textheight, heightcheck * 2);
|
textheight, heightcheck * 2);
|
||||||
todo_wine ok(rect.right > rect2.right - 10, "Got unexpected textwdith %ld, expected larger than %ld.\n",
|
ok(rect.right > rect2.right - 10, "Got unexpected textwdith %ld, expected larger than %ld.\n",
|
||||||
rect.right, rect2.right - 10);
|
rect.right, rect2.right - 10);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -384,9 +384,9 @@ static void TEXT_WordBreak (HDC hdc, WCHAR *str, unsigned int max_str,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (i > 0 && !sla[(--i)+1].fSoftBreak) p--;
|
while (i > 0 && !sla[(--i)+1].fWhiteSpace) p--;
|
||||||
p--;
|
p--;
|
||||||
word_fits = (i != 0 || sla[i+1].fSoftBreak );
|
word_fits = (i != 0 || sla[i+1].fWhiteSpace );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If there was one. */
|
/* If there was one. */
|
||||||
|
|
Loading…
Reference in a new issue