backend refactor

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@683 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-13 02:27:31 +00:00
parent 7e7e9f776d
commit 295e685f54
14 changed files with 495 additions and 458 deletions

View File

@@ -28,15 +28,15 @@ static void draw(MwWidget handle) {
int ow = r.width;
int oh = r.height;
double sw = (double)ow / px->width;
double sh = (double)oh / px->height;
double sw = (double)ow / px->common.width;
double sh = (double)oh / px->common.height;
if(sw < sh) {
r.width = px->width * sw;
r.height = px->height * sw;
r.width = px->common.width * sw;
r.height = px->common.height * sw;
} else {
r.width = px->width * sh;
r.height = px->height * sh;
r.width = px->common.width * sh;
r.height = px->common.height * sh;
}
r.width -= MwDefaultBorderWidth(handle) * 2;
r.height -= MwDefaultBorderWidth(handle) * 2;