IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
166 | 166 | * Splash dialog logo size |
167 | 167 | * @since 10358 |
168 | 168 | */ |
169 | | SPLASH_LOGO(128, 129), |
| 169 | SPLASH_LOGO(128, 128), |
170 | 170 | /** |
171 | 171 | * About dialog logo size |
172 | 172 | * @since 10358 |
173 | 173 | */ |
174 | | ABOUT_LOGO(256, 258), |
| 174 | ABOUT_LOGO(256, 256), |
175 | 175 | /** |
176 | 176 | * Status line logo size |
177 | 177 | * @since 13369 |
… |
… |
|
1537 | 1537 | if (Logging.isTraceEnabled()) { |
1538 | 1538 | Logging.trace("createImageFromSvg: {0} {1}", svg.getXMLBase(), dim); |
1539 | 1539 | } |
1540 | | float sourceWidth = svg.getWidth(); |
1541 | | float sourceHeight = svg.getHeight(); |
1542 | | int realWidth = Math.round(GuiSizesHelper.getSizeDpiAdjusted(sourceWidth)); |
1543 | | int realHeight = Math.round(GuiSizesHelper.getSizeDpiAdjusted(sourceHeight)); |
1544 | | Double scaleX, scaleY; |
1545 | | if (dim.width != -1) { |
| 1540 | final float sourceWidth = svg.getWidth(); |
| 1541 | final float sourceHeight = svg.getHeight(); |
| 1542 | final int realWidth; |
| 1543 | final int realHeight; |
| 1544 | if (dim.width >= 0) { |
1546 | 1545 | realWidth = dim.width; |
1547 | | scaleX = (double) realWidth / sourceWidth; |
1548 | | if (dim.height == -1) { |
1549 | | scaleY = scaleX; |
1550 | | realHeight = (int) Math.round(sourceHeight * scaleY); |
1551 | | } else { |
| 1546 | if (dim.height >= 0) { |
1552 | 1547 | realHeight = dim.height; |
1553 | | scaleY = (double) realHeight / sourceHeight; |
| 1548 | } else { |
| 1549 | realHeight = Math.round(sourceHeight * realWidth / sourceWidth); |
1554 | 1550 | } |
1555 | | } else if (dim.height != -1) { |
| 1551 | } else if (dim.height >= 0) { |
1556 | 1552 | realHeight = dim.height; |
1557 | | scaleX = scaleY = (double) realHeight / sourceHeight; |
1558 | | realWidth = (int) Math.round(sourceWidth * scaleX); |
| 1553 | realWidth = Math.round(sourceWidth * realHeight / sourceHeight); |
1559 | 1554 | } else { |
1560 | | scaleX = scaleY = (double) realHeight / sourceHeight; |
| 1555 | realWidth = Math.round(GuiSizesHelper.getSizeDpiAdjusted(sourceWidth)); |
| 1556 | realHeight = Math.round(GuiSizesHelper.getSizeDpiAdjusted(sourceHeight)); |
1561 | 1557 | } |
| 1558 | final Double scaleX = (double) realWidth / sourceWidth; |
| 1559 | final Double scaleY = (double) realHeight / sourceHeight; |
1562 | 1560 | |
1563 | 1561 | if (realWidth == 0 || realHeight == 0) { |
1564 | 1562 | return null; |