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