From fae1869290d27758fbddf79b178e8bf313bb86de Mon Sep 17 00:00:00 2001 From: "Harry G. Dulaney IV" Date: Tue, 8 Jun 2021 23:00:35 -0400 Subject: [PATCH] Fine tune dark mode --- .../controller/converters/AbstractImageConverter.java | 2 +- .../controller/converters/ConvertibleFactory.java | 5 ++--- .../commander/controller/converters/ImageConverter.java | 7 ++----- .../commander/controller/converters/PngConversions.java | 1 - src/main/resources/style/dark.css | 4 ---- src/main/resources/style/light.css | 4 ---- 6 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/commander/controller/converters/AbstractImageConverter.java b/src/main/java/com/commander/controller/converters/AbstractImageConverter.java index 68fc25c..60dedcd 100644 --- a/src/main/java/com/commander/controller/converters/AbstractImageConverter.java +++ b/src/main/java/com/commander/controller/converters/AbstractImageConverter.java @@ -45,7 +45,7 @@ protected AbstractImageConverter(File in, File out, String format) { /** - * Handle trans bg boolean. + * Handle transparent background conversion. * * @param srcImage the src image * @param imgFormat the img format diff --git a/src/main/java/com/commander/controller/converters/ConvertibleFactory.java b/src/main/java/com/commander/controller/converters/ConvertibleFactory.java index 19ef6bf..313d9ba 100644 --- a/src/main/java/com/commander/controller/converters/ConvertibleFactory.java +++ b/src/main/java/com/commander/controller/converters/ConvertibleFactory.java @@ -14,10 +14,9 @@ import static org.apache.commons.io.FilenameUtils.EXTENSION_SEPARATOR_STR; /** - * {@code ConvertibleFactory} is an utility class for creating {@code Convertible} objects - * to be passed on to ConvertUtils for conversions. + * {@code ConvertibleFactory} is an utility class for creating {@code Convertible} objects. * - * @author HGDIV + * @author Harry Dulaney */ public class ConvertibleFactory { diff --git a/src/main/java/com/commander/controller/converters/ImageConverter.java b/src/main/java/com/commander/controller/converters/ImageConverter.java index 17ab469..6950088 100644 --- a/src/main/java/com/commander/controller/converters/ImageConverter.java +++ b/src/main/java/com/commander/controller/converters/ImageConverter.java @@ -25,7 +25,7 @@ public class ImageConverter extends AbstractImageConverter { * * @param fileIn the in * @param fileOut the out - * @param format the output format + * @param format the output format */ public ImageConverter(File fileIn, File fileOut, String format) { super(fileIn, fileOut); @@ -40,7 +40,7 @@ private boolean genericConversion() { BufferedImage sourceImage = ImageIO.read(in); if (sourceImage.getTransparency() != BufferedImage.OPAQUE) { if ((FilenameUtils.getExtension(in.getName())).equals(DocType.GIF_ID) && !(format.equalsIgnoreCase(DocType.PNG_ID))) { - result = handleTransBg(sourceImage,format,out); + result = handleTransBg(sourceImage, format, out); } else { try { @@ -79,11 +79,8 @@ private boolean genericConversion() { @Override public void convert() { - boolean succeeded = genericConversion(); - - if (succeeded) { deleteSourceFile(true, in); DialogHelper.showInfoAlert("Success! Your image named: " + in.getName() + " was converted to: " + out.getName() + diff --git a/src/main/java/com/commander/controller/converters/PngConversions.java b/src/main/java/com/commander/controller/converters/PngConversions.java index 1feae31..fc4c2f2 100644 --- a/src/main/java/com/commander/controller/converters/PngConversions.java +++ b/src/main/java/com/commander/controller/converters/PngConversions.java @@ -31,7 +31,6 @@ public PngConversions(File fileIn, File fileOut, String format) { @Override public void convert() { - // TODO: USE THE PNGDECODER to rework these methods final long starttime = System.currentTimeMillis(); /* Handle PNG to JPG*/ if (format.equalsIgnoreCase(DocType.JPG_ID)) { diff --git a/src/main/resources/style/dark.css b/src/main/resources/style/dark.css index 317d323..c467637 100644 --- a/src/main/resources/style/dark.css +++ b/src/main/resources/style/dark.css @@ -6,25 +6,21 @@ @font-face { font-family: TitilliumWeb; src: url('fonts/TitilliumWeb-Italic.ttf'); - font-style: italic; } @font-face { font-family: TitilliumWeb; src: url('fonts/TitilliumWeb-Bold.ttf'); - font-weight: bold; } @font-face { font-family: TitilliumWeb; src: url('fonts/TitilliumWeb-Black.ttf'); - font-stretch: expanded; } @font-face { font-family: TitilliumWeb; src: url('fonts/TitilliumWeb-Light.ttf'); - font-style: light; } .root { diff --git a/src/main/resources/style/light.css b/src/main/resources/style/light.css index 38adb15..e378748 100644 --- a/src/main/resources/style/light.css +++ b/src/main/resources/style/light.css @@ -6,25 +6,21 @@ @font-face { font-family: TitilliumWeb; src: url('fonts/TitilliumWeb-Italic.ttf'); - font-style: italic; } @font-face { font-family: TitilliumWeb; src: url('fonts/TitilliumWeb-Bold.ttf'); - font-weight: bold; } @font-face { font-family: TitilliumWeb; src: url('fonts/TitilliumWeb-Black.ttf'); - font-stretch: expanded; } @font-face { font-family: TitilliumWeb; src: url('fonts/TitilliumWeb-Light.ttf'); - font-style: light; } .root {