Browse Source

REPORT-58698 主题切换-主题配置相关问题

【问题原因】
内置主题缩略图尺寸修改,以配合后续的主题预览界面优化

【改动思路】
同上
persist/11.0
Starryi 3 years ago
parent
commit
cff5c393ad
  1. 8
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemePreviewPane.java

8
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemePreviewPane.java

@ -41,17 +41,9 @@ public abstract class TemplateThemePreviewPane<T extends TemplateTheme> extends
int thumbnailWidth = ThemeThumbnail.WIDTH; int thumbnailWidth = ThemeThumbnail.WIDTH;
int thumbnailHeight = ThemeThumbnail.HEIGHT; int thumbnailHeight = ThemeThumbnail.HEIGHT;
float thumbnailAspect = 1.0F * thumbnailWidth / thumbnailHeight;
int width = getWidth(); int width = getWidth();
int height = getHeight(); int height = getHeight();
float aspect = 1.0F * width / height;
if (thumbnailAspect > aspect) {
height = (int) (width / thumbnailAspect);
} else {
width = (int) (height * thumbnailAspect);
}
try { try {
// 使用TYPE_INT_RGB和new Color(255, 255, 255, 1)设置有透明背景buffer image, // 使用TYPE_INT_RGB和new Color(255, 255, 255, 1)设置有透明背景buffer image,

Loading…
Cancel
Save