mirror of https://github.com/odrling/Aegisub
Fix crosshair drawing
I'm not sure about that scale_factor, i don't know how to test that
This commit is contained in:
parent
0ec0f20695
commit
808ead65bf
|
@ -307,7 +307,7 @@ void VideoDisplay::PositionVideo() {
|
||||||
viewport_bottom_end = std::min(viewport_bottom_end, 0);
|
viewport_bottom_end = std::min(viewport_bottom_end, 0);
|
||||||
|
|
||||||
if (tool) {
|
if (tool) {
|
||||||
tool->SetClientSize(viewport_width, viewport_height);
|
tool->SetClientSize(client_w * scale_factor, client_h * scale_factor);
|
||||||
tool->SetDisplayArea(viewport_left / scale_factor, viewport_top / scale_factor,
|
tool->SetDisplayArea(viewport_left / scale_factor, viewport_top / scale_factor,
|
||||||
viewport_width / scale_factor, viewport_height / scale_factor);
|
viewport_width / scale_factor, viewport_height / scale_factor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,12 +87,12 @@ void VisualToolCross::Draw() {
|
||||||
// Place the text in the corner of the cross closest to the center of the video
|
// Place the text in the corner of the cross closest to the center of the video
|
||||||
int dx = mouse_pos.X();
|
int dx = mouse_pos.X();
|
||||||
int dy = mouse_pos.Y();
|
int dy = mouse_pos.Y();
|
||||||
if (dx > video_res.X() / 2)
|
if (dx > client_size.X() / 2)
|
||||||
dx -= tw + 4;
|
dx -= tw + 4;
|
||||||
else
|
else
|
||||||
dx += 4;
|
dx += 4;
|
||||||
|
|
||||||
if (dy < video_res.Y() / 2)
|
if (dy < client_size.Y() / 2)
|
||||||
dy += 3;
|
dy += 3;
|
||||||
else
|
else
|
||||||
dy -= th + 3;
|
dy -= th + 3;
|
||||||
|
|
Loading…
Reference in New Issue