Browse Source

Pull request #5683: REPORT-58629 换一下fr11设计器启动图

Merge in DESIGN/design from ~HADES/design:release/11.0 to release/11.0

* commit '0c72993994e073b3be8da594c72274822cb0bc69':
  REPORT-58629 移动下类的位置
  REPORT-58629 删掉10.0的2倍图
  REPORT-58629 换一下fr11设计器启动图
persist/11.0
Hades 3 years ago
parent
commit
3c464cb5fb
  1. 33
      designer-base/src/main/java/com/fr/design/locale/impl/DoubleSplashMark.java
  2. 4
      designer-base/src/main/java/com/fr/design/locale/impl/SplashMark.java
  3. 19
      designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java
  4. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash.png
  5. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash@2x.png
  6. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash_10.png
  7. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash_10@2x.png
  8. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash_10_en.png
  9. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash_en.png
  10. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash_en@2x.png

33
designer-base/src/main/java/com/fr/design/locale/impl/DoubleSplashMark.java

@ -0,0 +1,33 @@
package com.fr.design.locale.impl;
import com.fr.design.DesignerEnvManager;
import com.fr.general.locale.LocaleMark;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
/**
* @author hades
* @version 10.0
* Created by hades on 2021/9/2
*/
public class DoubleSplashMark implements LocaleMark<String> {
private final Map<Locale, String> map = new HashMap<Locale, String>();
private static final String SPLASH_PATH_X2 = "/com/fr/design/images/splash@2x.png";
private static final String SPLASH_PATH_EN_X2 = "/com/fr/design/images/splash_en@2x.png";
public DoubleSplashMark() {
map.put(Locale.CHINA, SPLASH_PATH_X2);
map.put(Locale.KOREA, SPLASH_PATH_EN_X2);
map.put(Locale.JAPAN, SPLASH_PATH_EN_X2);
map.put(Locale.US, SPLASH_PATH_EN_X2);
map.put(Locale.TAIWAN, SPLASH_PATH_EN_X2);
}
@Override
public String getValue() {
String result = map.get(DesignerEnvManager.getEnvManager().getLanguage());
return result == null ? SPLASH_PATH_EN_X2 : result;
}
}

4
designer-base/src/main/java/com/fr/design/locale/impl/SplashMark.java

@ -15,8 +15,8 @@ import java.util.Map;
public class SplashMark implements LocaleMark<String> { public class SplashMark implements LocaleMark<String> {
private Map<Locale, String> map = new HashMap<Locale, String>(); private Map<Locale, String> map = new HashMap<Locale, String>();
private static final String SPLASH_PATH = "/com/fr/design/images/splash_10.png"; private static final String SPLASH_PATH = "/com/fr/design/images/splash.png";
private static final String SPLASH_EN_PATH = "/com/fr/design/images/splash_10_en.png"; private static final String SPLASH_EN_PATH = "/com/fr/design/images/splash_en.png";
public SplashMark() { public SplashMark() {
map.put(Locale.CHINA, SPLASH_PATH); map.put(Locale.CHINA, SPLASH_PATH);

19
designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java

@ -2,6 +2,7 @@ package com.fr.start.common;
import com.bulenkov.iconloader.IconLoader; import com.bulenkov.iconloader.IconLoader;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.locale.impl.DoubleSplashMark;
import com.fr.design.locale.impl.SplashMark; import com.fr.design.locale.impl.SplashMark;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.locale.LocaleCenter; import com.fr.general.locale.LocaleCenter;
@ -28,24 +29,18 @@ public class SplashPane4WinAndJDK11 extends SplashPane{
*/ */
private boolean isDouble = false; private boolean isDouble = false;
private static final String IMAGE_SPLASH = "splash_10.png";
private static final String IMAGE_SPLASH_DOUBLE = "splash_10@2x.png";
public SplashPane4WinAndJDK11() { public SplashPane4WinAndJDK11() {
this.imagePath = getSplashPath4WinAndJdk11(); this.imagePath = getSplashPath4WinAndJdk11();
} }
private String getSplashPath4WinAndJdk11() { private String getSplashPath4WinAndJdk11() {
String path = (String) LocaleCenter.getMark(SplashMark.class).getValue(); String path = (String) LocaleCenter.getMark(SplashMark.class).getValue();
if (path.contains(IMAGE_SPLASH)) { String pathOfDouble = (String) LocaleCenter.getMark(DoubleSplashMark.class).getValue();
// 为图片加上"@2x" // 为图片加上"@2x"
String pathOfDouble = path.replace(IMAGE_SPLASH, IMAGE_SPLASH_DOUBLE); // 某些定制jar里面没有两倍图,判断一下,如果文件不存在,就返回一倍图的path
// 某些定制jar里面没有两倍图,判断一下,如果文件不存在,就返回一倍图的path if (IOUtils.readResource(pathOfDouble) != null) {
if (IOUtils.readResource(pathOfDouble) != null) { this.isDouble = true;
this.isDouble = true; return pathOfDouble;
return pathOfDouble;
}
} }
return path; return path;
} }

BIN
designer-realize/src/main/resources/com/fr/design/images/splash.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 914 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash_10.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash_10@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 814 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash_10_en.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash_en.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash_en@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 KiB

Loading…
Cancel
Save