replace network status icons

This commit is contained in:
woodser 2025-05-16 21:31:56 -04:00
parent 6e2cfcbcd8
commit fc410ee77e
No known key found for this signature in database
GPG key ID: 55A10DD48ADEE5EF
10 changed files with 23 additions and 4 deletions

View file

@ -124,7 +124,10 @@ public class PeerInfoIcon extends Group {
numTradesPane.relocate(scaleFactor * 18, scaleFactor * 14);
numTradesPane.setMouseTransparent(true);
ImageView numTradesCircle = new ImageView();
numTradesCircle.setFitWidth(12);
numTradesCircle.setFitHeight(12);
numTradesCircle.setId("image-green_circle");
numTradesLabel = new AutoTooltipLabel();
numTradesLabel.relocate(scaleFactor * 5, scaleFactor * 1);
numTradesLabel.setId("ident-num-label");
@ -134,6 +137,8 @@ public class PeerInfoIcon extends Group {
tagPane.relocate(Math.round(scaleFactor * 18), scaleFactor * -2);
tagPane.setMouseTransparent(true);
ImageView tagCircle = new ImageView();
tagCircle.setFitWidth(12);
tagCircle.setFitHeight(12);
tagCircle.setId("image-blue_circle");
tagLabel = new AutoTooltipLabel();
tagLabel.relocate(Math.round(scaleFactor * 5), scaleFactor * 1);

View file

@ -73,6 +73,7 @@ import javafx.geometry.Insets;
import javafx.geometry.NodeOrientation;
import javafx.geometry.Orientation;
import javafx.geometry.Pos;
import javafx.scene.Cursor;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
@ -126,6 +127,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
private Label xmrSplashInfo;
private Popup p2PNetworkWarnMsgPopup, xmrNetworkWarnMsgPopup;
private final TorNetworkSettingsWindow torNetworkSettingsWindow;
private static final int networkIconSize = 20;
public static StackPane getRootContainer() {
return MainView.rootContainer;
@ -614,9 +616,11 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
ImageView splashP2PNetworkIcon = new ImageView();
splashP2PNetworkIcon.setId("image-connection-tor");
splashP2PNetworkIcon.setFitWidth(networkIconSize);
splashP2PNetworkIcon.setFitHeight(networkIconSize);
splashP2PNetworkIcon.setVisible(false);
splashP2PNetworkIcon.setManaged(false);
HBox.setMargin(splashP2PNetworkIcon, new Insets(0, 0, 5, 0));
HBox.setMargin(splashP2PNetworkIcon, new Insets(0, 0,0, 0));
splashP2PNetworkIcon.setOnMouseClicked(e -> {
torNetworkSettingsWindow.show();
});
@ -630,6 +634,8 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
splashP2PNetworkIcon.setId(newValue);
splashP2PNetworkIcon.setVisible(true);
splashP2PNetworkIcon.setManaged(true);
splashP2PNetworkIcon.setFitWidth(networkIconSize);
splashP2PNetworkIcon.setFitHeight(networkIconSize);
// if we can connect in 10 sec. we know that tor is working
showTorNetworkSettingsTimer.stop();
@ -758,9 +764,13 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
p2PNetworkLabel.textProperty().bind(model.getP2PNetworkInfo());
ImageView p2PNetworkIcon = new ImageView();
setRightAnchor(p2PNetworkIcon, 10d);
setBottomAnchor(p2PNetworkIcon, 5d);
setRightAnchor(p2PNetworkIcon, 8d);
setBottomAnchor(p2PNetworkIcon, 6d);
p2PNetworkIcon.setPickOnBounds(true);
p2PNetworkIcon.setCursor(Cursor.HAND);
p2PNetworkIcon.setOpacity(0.4);
p2PNetworkIcon.setFitWidth(networkIconSize);
p2PNetworkIcon.setFitHeight(networkIconSize);
p2PNetworkIcon.idProperty().bind(model.getP2PNetworkIconId());
p2PNetworkLabel.idProperty().bind(model.getP2pNetworkLabelId());
model.getP2pNetworkWarnMsg().addListener((ov, oldValue, newValue) -> {
@ -776,8 +786,12 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
});
ImageView p2PNetworkStatusIcon = new ImageView();
p2PNetworkStatusIcon.setPickOnBounds(true);
p2PNetworkStatusIcon.setCursor(Cursor.HAND);
p2PNetworkStatusIcon.setFitWidth(networkIconSize);
p2PNetworkStatusIcon.setFitHeight(networkIconSize);
setRightAnchor(p2PNetworkStatusIcon, 30d);
setBottomAnchor(p2PNetworkStatusIcon, 7d);
setBottomAnchor(p2PNetworkStatusIcon, 6d);
Tooltip p2pNetworkStatusToolTip = new Tooltip();
Tooltip.install(p2PNetworkStatusIcon, p2pNetworkStatusToolTip);
p2PNetworkStatusIcon.setOnMouseEntered(e -> p2pNetworkStatusToolTip.setText(model.getP2pConnectionSummary()));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 895 B

After

Width:  |  Height:  |  Size: 4.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

After

Width:  |  Height:  |  Size: 4.8 KiB

Before After
Before After