mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-11-05 11:56:37 +00:00
minor webcam cross platform fixes
This commit is contained in:
parent
2c4de99fad
commit
6f6d61fb75
3 changed files with 10 additions and 5 deletions
|
|
@ -87,7 +87,7 @@ dependencies {
|
||||||
implementation('com.fasterxml.jackson.core:jackson-databind:2.17.2')
|
implementation('com.fasterxml.jackson.core:jackson-databind:2.17.2')
|
||||||
implementation('com.sparrowwallet:hummingbird:1.7.4')
|
implementation('com.sparrowwallet:hummingbird:1.7.4')
|
||||||
implementation('co.nstant.in:cbor:0.9')
|
implementation('co.nstant.in:cbor:0.9')
|
||||||
implementation('org.openpnp:openpnp-capture-java:0.0.28-2')
|
implementation('org.openpnp:openpnp-capture-java:0.0.28-3')
|
||||||
implementation("io.matthewnelson.kotlin-components:kmp-tor:${vTor}-${vKmpTor}") {
|
implementation("io.matthewnelson.kotlin-components:kmp-tor:${vTor}-${vKmpTor}") {
|
||||||
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-common'
|
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-common'
|
||||||
}
|
}
|
||||||
|
|
@ -182,7 +182,6 @@ application {
|
||||||
"--add-opens=javafx.graphics/com.sun.javafx.tk=centerdevice.nsmenufx",
|
"--add-opens=javafx.graphics/com.sun.javafx.tk=centerdevice.nsmenufx",
|
||||||
"--add-opens=javafx.graphics/com.sun.javafx.tk.quantum=centerdevice.nsmenufx",
|
"--add-opens=javafx.graphics/com.sun.javafx.tk.quantum=centerdevice.nsmenufx",
|
||||||
"--add-opens=javafx.graphics/com.sun.glass.ui=centerdevice.nsmenufx",
|
"--add-opens=javafx.graphics/com.sun.glass.ui=centerdevice.nsmenufx",
|
||||||
"--add-opens=javafx.graphics/com.sun.glass.ui.mac=centerdevice.nsmenufx",
|
|
||||||
"--add-opens=javafx.controls/com.sun.javafx.scene.control=centerdevice.nsmenufx",
|
"--add-opens=javafx.controls/com.sun.javafx.scene.control=centerdevice.nsmenufx",
|
||||||
"--add-opens=javafx.graphics/com.sun.javafx.menu=centerdevice.nsmenufx",
|
"--add-opens=javafx.graphics/com.sun.javafx.menu=centerdevice.nsmenufx",
|
||||||
"--add-opens=javafx.graphics/com.sun.glass.ui=com.sparrowwallet.sparrow",
|
"--add-opens=javafx.graphics/com.sun.glass.ui=com.sparrowwallet.sparrow",
|
||||||
|
|
@ -231,7 +230,6 @@ jlink {
|
||||||
"--add-opens=javafx.graphics/com.sun.javafx.tk=centerdevice.nsmenufx",
|
"--add-opens=javafx.graphics/com.sun.javafx.tk=centerdevice.nsmenufx",
|
||||||
"--add-opens=javafx.graphics/com.sun.javafx.tk.quantum=centerdevice.nsmenufx",
|
"--add-opens=javafx.graphics/com.sun.javafx.tk.quantum=centerdevice.nsmenufx",
|
||||||
"--add-opens=javafx.graphics/com.sun.glass.ui=centerdevice.nsmenufx",
|
"--add-opens=javafx.graphics/com.sun.glass.ui=centerdevice.nsmenufx",
|
||||||
"--add-opens=javafx.graphics/com.sun.glass.ui.mac=centerdevice.nsmenufx",
|
|
||||||
"--add-opens=javafx.controls/com.sun.javafx.scene.control=centerdevice.nsmenufx",
|
"--add-opens=javafx.controls/com.sun.javafx.scene.control=centerdevice.nsmenufx",
|
||||||
"--add-opens=javafx.graphics/com.sun.javafx.menu=centerdevice.nsmenufx",
|
"--add-opens=javafx.graphics/com.sun.javafx.menu=centerdevice.nsmenufx",
|
||||||
"--add-opens=javafx.graphics/com.sun.glass.ui=com.sparrowwallet.sparrow",
|
"--add-opens=javafx.graphics/com.sun.glass.ui=com.sparrowwallet.sparrow",
|
||||||
|
|
@ -258,7 +256,7 @@ jlink {
|
||||||
jvmArgs += ["-Djavax.accessibility.assistive_technologies", "-Djavax.accessibility.screen_magnifier_present=false"]
|
jvmArgs += ["-Djavax.accessibility.assistive_technologies", "-Djavax.accessibility.screen_magnifier_present=false"]
|
||||||
}
|
}
|
||||||
if(os.macOsX) {
|
if(os.macOsX) {
|
||||||
jvmArgs += ["-Dprism.lcdtext=false", "--add-opens=javafx.graphics/com.sun.glass.ui.mac=com.sparrowwallet.merged.module"]
|
jvmArgs += ["-Dprism.lcdtext=false", "--add-opens=javafx.graphics/com.sun.glass.ui.mac=com.sparrowwallet.merged.module", "--add-opens=javafx.graphics/com.sun.glass.ui.mac=centerdevice.nsmenufx"]
|
||||||
}
|
}
|
||||||
if(headless) {
|
if(headless) {
|
||||||
jvmArgs += ["-Dglass.platform=Monocle", "-Dmonocle.platform=Headless", "-Dprism.order=sw"]
|
jvmArgs += ["-Dglass.platform=Monocle", "-Dmonocle.platform=Headless", "-Dprism.order=sw"]
|
||||||
|
|
|
||||||
|
|
@ -170,11 +170,13 @@ public class QRScanDialog extends Dialog<QRScanDialog.Result> {
|
||||||
webcamResolutionProperty.addListener((_, oldResolution, newResolution) -> {
|
webcamResolutionProperty.addListener((_, oldResolution, newResolution) -> {
|
||||||
if(newResolution != null) {
|
if(newResolution != null) {
|
||||||
if(newResolution.isStandardAspect() && oldResolution.isWidescreenAspect()) {
|
if(newResolution.isStandardAspect() && oldResolution.isWidescreenAspect()) {
|
||||||
|
setWidth(getWidth());
|
||||||
setHeight(getHeight() + 100);
|
setHeight(getHeight() + 100);
|
||||||
dialogPane.setMaxHeight(dialogPane.getPrefHeight() + 100);
|
dialogPane.setMaxHeight(dialogPane.getPrefHeight() + 100);
|
||||||
dialogPane.setPrefHeight(dialogPane.getMaxHeight());
|
dialogPane.setPrefHeight(dialogPane.getMaxHeight());
|
||||||
dialogPane.setMinHeight(dialogPane.getMaxHeight());
|
dialogPane.setMinHeight(dialogPane.getMaxHeight());
|
||||||
} else if(newResolution.isWidescreenAspect() && oldResolution.isStandardAspect()) {
|
} else if(newResolution.isWidescreenAspect() && oldResolution.isStandardAspect()) {
|
||||||
|
setWidth(getWidth());
|
||||||
setHeight(getHeight() - 100);
|
setHeight(getHeight() - 100);
|
||||||
dialogPane.setMaxHeight(dialogPane.getPrefHeight() - 100);
|
dialogPane.setMaxHeight(dialogPane.getPrefHeight() - 100);
|
||||||
dialogPane.setPrefHeight(dialogPane.getMaxHeight());
|
dialogPane.setPrefHeight(dialogPane.getMaxHeight());
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,12 @@ public class WebcamService extends ScheduledService<Image> {
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
log.error(ptr.getString(0).trim());
|
String err = ptr.getString(0).trim();
|
||||||
|
if(err.equals("tjDecompressHeader2 failed: No error")) { //Safe to ignore
|
||||||
|
log.debug(err);
|
||||||
|
} else {
|
||||||
|
log.error(err);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
case 5:
|
case 5:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue