viewer: simplified sizing algorithm and add padding for fit so gizmos are easier to use

This commit is contained in:
itsmattkc
2020-11-22 13:01:52 +11:00
parent 63bc054b34
commit bd215b34bc
2 changed files with 62 additions and 101 deletions
+2 -2
View File
@@ -315,9 +315,9 @@ void ViewerDisplayWidget::OnPaint()
int device_width = width() * devicePixelRatioF();
int device_height = height() * devicePixelRatioF();
VideoParams::Format device_format = static_cast<VideoParams::Format>(Config::Current()["OfflinePixelFormat"].toInt());
VideoParams device_params(device_width, device_height, device_format, VideoParams::kInternalChannelCount);
renderer()->BlitColorManaged(color_service(), texture_to_draw, true,
VideoParams(device_width, device_height, device_format, VideoParams::kInternalChannelCount),
renderer()->BlitColorManaged(color_service(), texture_to_draw, true, device_params,
combined_matrix_flipped_);
}