diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-07-06 07:04:29 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-07-06 07:04:29 +0300 |
commit | e1ff98965a4aec72418165424a0183e596df1ecb (patch) | |
tree | e01f245348ba39d2a2eb5fdffe5a8600e5928b96 /src/ui/lookupwidget.c | |
parent | 5915a8509827bbad99731b0e8451f484bff1ac61 (diff) |
Text run measurement API change; bug fixes
The distinction between measure_Text and advance_Text was not very clear. Now there are only measure_Text functions that return both the bounds and the cursor position advancement, and the appropriate metrics are used by the caller.
Diffstat (limited to 'src/ui/lookupwidget.c')
-rw-r--r-- | src/ui/lookupwidget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/lookupwidget.c b/src/ui/lookupwidget.c index 254aad93..a0a507ca 100644 --- a/src/ui/lookupwidget.c +++ b/src/ui/lookupwidget.c | |||
@@ -121,7 +121,7 @@ static void draw_LookupItem_(iLookupItem *d, iPaint *p, iRect rect, const iListW | |||
121 | ? permanent_ColorId | (isPressing || isCursor ? uiTextPressed_ColorId | 121 | ? permanent_ColorId | (isPressing || isCursor ? uiTextPressed_ColorId |
122 | : uiTextFramelessHover_ColorId) | 122 | : uiTextFramelessHover_ColorId) |
123 | : d->fg; | 123 | : d->fg; |
124 | const iInt2 size = measureRange_Text(d->font, range_String(&d->text)); | 124 | const iInt2 size = measureRange_Text(d->font, range_String(&d->text)).bounds.size; |
125 | iInt2 pos = init_I2(left_Rect(rect) + 3 * gap_UI, mid_Rect(rect).y - size.y / 2); | 125 | iInt2 pos = init_I2(left_Rect(rect) + 3 * gap_UI, mid_Rect(rect).y - size.y / 2); |
126 | if (d->listItem.isSeparator) { | 126 | if (d->listItem.isSeparator) { |
127 | pos.y = bottom_Rect(rect) - lineHeight_Text(d->font); | 127 | pos.y = bottom_Rect(rect) - lineHeight_Text(d->font); |