Desktop version gui scaling restored
This commit is contained in:
parent
40688176d9
commit
c4005da3c9
8 changed files with 18 additions and 5 deletions
|
|
@ -94,3 +94,9 @@ void DesktopDrawingProgramScreen::on_tab_close() {
|
|||
else
|
||||
main.switch_to_tab(0);
|
||||
}
|
||||
|
||||
float DesktopDrawingProgramScreen::calculate_gui_scale() {
|
||||
Vector2f maxWindowSizeBeforeForcedFit = main.g.final_gui_scale_not_fit() * Vector2f{700.0f, 700.0f};
|
||||
Vector2f fitRatio = {main.window.size.x() / maxWindowSizeBeforeForcedFit.x(), main.window.size.y() / maxWindowSizeBeforeForcedFit.y()};
|
||||
return main.g.final_gui_scale_not_fit() * std::min(std::min(fitRatio.x(), fitRatio.y()), 1.0f);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue