textLayout: fix shift-up/down when text is zoomed
This commit is contained in:
parent
597790ab2d
commit
5ba3150af9
1 changed files with 2 additions and 2 deletions
|
@ -4899,7 +4899,7 @@ pub const TextLayoutWidget = struct {
|
|||
const crs = self.screenRectScale(Rect{ .x = self.insert_pt.x + size.w, .y = self.insert_pt.y, .w = 2, .h = size.h });
|
||||
|
||||
if (self.cursor_updown != 0 and self.cursor_updown_pt == null) {
|
||||
self.cursor_updown_pt = crs.r.topleft().plus(.{ .y = (@intToFloat(f32, self.cursor_updown) + 0.5) * size.h });
|
||||
self.cursor_updown_pt = crs.pointToScreen(.{ .y = (@intToFloat(f32, self.cursor_updown) + 0.5) * size.h });
|
||||
// might have already passed, so need to go again next frame
|
||||
cueFrame();
|
||||
}
|
||||
|
@ -4943,7 +4943,7 @@ pub const TextLayoutWidget = struct {
|
|||
const crs = self.screenRectScale(Rect{ .x = self.insert_pt.x + size.w, .y = self.insert_pt.y, .w = 2, .h = size.h });
|
||||
|
||||
if (self.cursor_updown != 0 and self.cursor_updown_pt == null) {
|
||||
self.cursor_updown_pt = crs.r.topleft().plus(.{ .y = (@intToFloat(f32, self.cursor_updown) + 0.5) * size.h });
|
||||
self.cursor_updown_pt = crs.pointToScreen(.{ .y = (@intToFloat(f32, self.cursor_updown) + 0.5) * size.h });
|
||||
// might have already passed, so need to go again next frame
|
||||
cueFrame();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue