Small fixes

This commit is contained in:
crschnick 2024-09-29 16:40:19 +00:00
parent cb10d27c0d
commit b5fe5589d3
3 changed files with 14 additions and 5 deletions

View file

@ -131,7 +131,7 @@ public class AppLayoutModel {
var zone = ZoneId.of(ZoneId.SHORT_IDS.get("PST"));
var phStart = ZonedDateTime.of(2024, 10, 22, 0, 1, 0, 0, zone).toInstant();
var clicked = AppCache.get("phClicked",Boolean.class,() -> false);
var phShow = now.isAfter(phStart) && clicked;
var phShow = now.isAfter(phStart) && !clicked;
if (phShow) {
l.add(new Entry(
new SimpleStringProperty("Product Hunt"),

View file

@ -102,7 +102,7 @@ public class DesktopHelper {
try {
Desktop.getDesktop().open(file.toFile());
} catch (Exception e) {
ErrorEvent.fromThrowable(e).omit().handle();
ErrorEvent.fromThrowable(e).expected().handle();
}
});
}
@ -110,6 +110,7 @@ public class DesktopHelper {
public static void browseFileInDirectory(Path file) {
if (!Desktop.getDesktop().isSupported(Desktop.Action.BROWSE_FILE_DIR)) {
if (!Desktop.getDesktop().isSupported(Desktop.Action.OPEN)) {
ErrorEvent.fromMessage("Desktop integration unable to open file " + file).expected().handle();
return;
}
@ -117,7 +118,7 @@ public class DesktopHelper {
try {
Desktop.getDesktop().open(file.getParent().toFile());
} catch (Exception e) {
ErrorEvent.fromThrowable(e).omit().handle();
ErrorEvent.fromThrowable(e).expected().handle();
}
});
return;
@ -127,7 +128,7 @@ public class DesktopHelper {
try {
Desktop.getDesktop().browseFileDirectory(file.toFile());
} catch (Exception e) {
ErrorEvent.fromThrowable(e).omit().handle();
ErrorEvent.fromThrowable(e).expected().handle();
}
});
}

View file

@ -97,10 +97,18 @@
-fx-padding: 0.7em 1px 1em 1em;
}
* {
.root:windows .text {
-fx-font-smoothing-type: gray;
}
.root:linux .text {
-fx-font-smoothing-type: lcd;
}
.root:macos .text {
-fx-font-smoothing-type: lcd;
}
.radio-button {
-fx-background-color: transparent;
}