Commit 4f96439e authored by Tim Worthington's avatar Tim Worthington Committed by Alexandre Julliard

user32: Fix rendering of tabs in edit control.

parent 5bd636dc
......@@ -411,7 +411,7 @@ static SCRIPT_STRING_ANALYSIS EDIT_UpdateUniscribeData_linedef(EDITSTATE *es, HD
old_font = SelectObject(udc, es->font);
tabdef.cTabStops = es->tabs_count;
tabdef.iScale = 0;
tabdef.iScale = GdiGetCharDimensions(udc, NULL, NULL);
tabdef.pTabStops = es->tabs;
tabdef.iTabOrigin = 0;
......
......@@ -1828,7 +1828,12 @@ static inline int getGivenTabWidth(ScriptCache *psc, SCRIPT_TABDEF *pTabdef, int
cTabStops = 0;
}
else
defWidth = 8 * psc->tm.tmAveCharWidth;
{
if (pTabdef->iScale)
defWidth = (32 * pTabdef->iScale) / 4;
else
defWidth = 8 * psc->tm.tmAveCharWidth;
}
for (; cTabStops>0 ; lpTabPos++, cTabStops--)
{
......@@ -1842,10 +1847,10 @@ static inline int getGivenTabWidth(ScriptCache *psc, SCRIPT_TABDEF *pTabdef, int
if( nTabOrg + position > current_x)
{
if( *lpTabPos >= 0)
if( position >= 0)
{
/* a left aligned tab */
x = (nTabOrg + *lpTabPos) - current_x;
x = (nTabOrg + position) - current_x;
break;
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment