Commit dc75bd40 authored by Pavel Roskin's avatar Pavel Roskin Committed by Alexandre Julliard

EC_USEFONTINFO means es->char_width/3, not es->char_width. This is

true for multiline controls too, as my tests show.
parent 3025dc18
......@@ -2654,8 +2654,8 @@ static void EDIT_EM_SetLimitText(WND *wnd, EDITSTATE *es, INT limit)
* EM_SETMARGINS
*
* EC_USEFONTINFO is used as a left or right value i.e. lParam and not as an
* action wParam despite what the docs say. It also appears not to affect
* multiline controls??
* action wParam despite what the docs say. EC_USEFONTINFO means one third
* of the char's width, according to the new docs.
*
*/
static void EDIT_EM_SetMargins(WND *wnd, EDITSTATE *es, INT action,
......@@ -2665,20 +2665,14 @@ static void EDIT_EM_SetMargins(WND *wnd, EDITSTATE *es, INT action,
if (left != EC_USEFONTINFO)
es->left_margin = left;
else
if (es->style & ES_MULTILINE)
es->left_margin = 0; /* ?? */
else
es->left_margin = es->char_width;
es->left_margin = es->char_width / 3;
}
if (action & EC_RIGHTMARGIN) {
if (right != EC_USEFONTINFO)
es->right_margin = right;
else
if (es->style & ES_MULTILINE)
es->right_margin = 0; /* ?? */
else
es->right_margin = es->char_width;
es->right_margin = es->char_width / 3;
}
TRACE(edit, "left=%d, right=%d\n", es->left_margin, es->right_margin);
}
......
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