Mercurial > hg > Members > riono > TreeVNC_ja_comment
comparison src/viewer_swing/java/com/glavsoft/viewer/Viewer.java @ 457:effba48b76f3
Fix position
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 22 Jun 2016 19:52:32 +0900 |
parents | 34277b436cac |
children | 4ea47640942a |
comparison
equal
deleted
inserted
replaced
456:34277b436cac | 457:effba48b76f3 |
---|---|
505 int offsetx = 0; | 505 int offsetx = 0; |
506 int offsety = 0; | 506 int offsety = 0; |
507 int screenNumber = 0; | 507 int screenNumber = 0; |
508 for (Rectangle rect : rectangles) { | 508 for (Rectangle rect : rectangles) { |
509 int scale = retinaScale(screenNumber); | 509 int scale = retinaScale(screenNumber); |
510 int x = rect.x < 0 ? rect.x * scale : rect.x; | 510 int x = rect.x == -rect.width ? rect.x * scale : rect.x; |
511 int y = rect.y < 0 ? rect.y * scale : rect.y; | 511 int y = rect.y == -rect.height ? rect.y * scale : rect.y; |
512 if (x < offsetx) offsetx = x; | 512 if (x < offsetx) offsetx = x; |
513 if (y < offsety) offsety = y; | 513 if (y < offsety) offsety = y; |
514 screenNumber++; | 514 screenNumber++; |
515 } | 515 } |
516 return new Point(-offsetx,-offsety); | 516 return new Point(-offsetx,-offsety); |