add inverted icons for dark theme
|
@ -2186,6 +2186,14 @@ public class AppController implements Initializable {
|
||||||
} else {
|
} else {
|
||||||
tabs.getScene().getStylesheets().remove(darkCss);
|
tabs.getScene().getStylesheets().remove(darkCss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(Tab tab : tabs.getTabs()) {
|
||||||
|
if(tab.getUserData() instanceof WalletTabData) {
|
||||||
|
Label tabLabel = (Label)tab.getGraphic();
|
||||||
|
WalletIcon walletIcon = (WalletIcon)tabLabel.getGraphic();
|
||||||
|
walletIcon.refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
|
|
@ -2,7 +2,9 @@ package com.sparrowwallet.sparrow.control;
|
||||||
|
|
||||||
import com.sparrowwallet.drongo.wallet.*;
|
import com.sparrowwallet.drongo.wallet.*;
|
||||||
import com.sparrowwallet.sparrow.AppServices;
|
import com.sparrowwallet.sparrow.AppServices;
|
||||||
|
import com.sparrowwallet.sparrow.Theme;
|
||||||
import com.sparrowwallet.sparrow.glyphfont.FontAwesome5;
|
import com.sparrowwallet.sparrow.glyphfont.FontAwesome5;
|
||||||
|
import com.sparrowwallet.sparrow.io.Config;
|
||||||
import com.sparrowwallet.sparrow.io.ImageUtils;
|
import com.sparrowwallet.sparrow.io.ImageUtils;
|
||||||
import com.sparrowwallet.sparrow.io.Storage;
|
import com.sparrowwallet.sparrow.io.Storage;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
|
@ -60,18 +62,16 @@ public class WalletIcon extends StackPane {
|
||||||
WalletModel walletModel = keystore.getWalletModel();
|
WalletModel walletModel = keystore.getWalletModel();
|
||||||
|
|
||||||
Image image = null;
|
Image image = null;
|
||||||
try {
|
if(Config.get().getTheme() == Theme.DARK) {
|
||||||
image = new Image("image/" + walletModel.getType() + "-icon.png", 15, 15, true, true);
|
image = loadImage("image/" + walletModel.getType() + "-icon-invert.png");
|
||||||
} catch(Exception e) {
|
|
||||||
//ignore
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(image == null) {
|
if(image == null) {
|
||||||
try {
|
image = loadImage("image/" + walletModel.getType() + "-icon.png");
|
||||||
image = new Image("image/" + walletModel.getType() + ".png", 15, 15, true, true);
|
}
|
||||||
} catch(Exception e) {
|
|
||||||
//ignore
|
if(image == null) {
|
||||||
}
|
image = loadImage("image/" + walletModel.getType() + ".png");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(image != null && !image.isError()) {
|
if(image != null && !image.isError()) {
|
||||||
|
@ -88,6 +88,16 @@ public class WalletIcon extends StackPane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Image loadImage(String imageName) {
|
||||||
|
try {
|
||||||
|
return new Image(imageName, 15, 15, true, true);
|
||||||
|
} catch(Exception e) {
|
||||||
|
//ignore
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private void addWalletIcon(String walletId) {
|
private void addWalletIcon(String walletId) {
|
||||||
Image image = new Image(PROTOCOL + ":" + walletId + "?" + QUERY, WIDTH, HEIGHT, true, false);
|
Image image = new Image(PROTOCOL + ":" + walletId + "?" + QUERY, WIDTH, HEIGHT, true, false);
|
||||||
getChildren().clear();
|
getChildren().clear();
|
||||||
|
|
BIN
src/main/resources/image/bitbox02-icon-invert.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/main/resources/image/bitbox02-icon-invert@2x.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
src/main/resources/image/cobovault-icon-invert.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/main/resources/image/cobovault-icon-invert@2x.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/main/resources/image/cobovault-icon.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/main/resources/image/cobovault-icon@2x.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/main/resources/image/coldcard-icon-invert.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/main/resources/image/coldcard-icon-invert@2x.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
src/main/resources/image/jade-icon-invert.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/main/resources/image/jade-icon-invert@2x.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
src/main/resources/image/jade-icon.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/main/resources/image/jade-icon@2x.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
src/main/resources/image/keystone-icon-invert.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/main/resources/image/keystone-icon-invert@2x.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/image/keystone-icon.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/main/resources/image/keystone-icon@2x.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/image/ledger-icon-invert.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/main/resources/image/ledger-icon-invert@2x.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/main/resources/image/passport-icon-invert.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/main/resources/image/passport-icon-invert@2x.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/image/seedtool-icon-invert.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/main/resources/image/seedtool-icon-invert@2x.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
src/main/resources/image/seedtool-icon.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/main/resources/image/seedtool-icon@2x.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
src/main/resources/image/specter-icon-invert.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/main/resources/image/specter-icon-invert@2x.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/image/specter-icon.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/main/resources/image/specter-icon@2x.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/image/trezor-icon-invert.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/main/resources/image/trezor-icon-invert@2x.png
Normal file
After Width: | Height: | Size: 2 KiB |