From 719908186b9cec20645ef6c1ddd02302182cb4ce Mon Sep 17 00:00:00 2001 From: woodser <13068859+woodser@users.noreply.github.com> Date: Mon, 2 Jun 2025 10:44:32 -0400 Subject: [PATCH] less width of offer and trade details and height of extra info --- .../desktop/main/overlays/windows/OfferDetailsWindow.java | 8 ++++---- .../desktop/main/overlays/windows/TradeDetailsWindow.java | 6 +++--- desktop/src/main/java/haveno/desktop/util/Layout.java | 2 ++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/OfferDetailsWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/OfferDetailsWindow.java index 4977054062..37075edbcc 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/OfferDetailsWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/OfferDetailsWindow.java @@ -128,7 +128,7 @@ public class OfferDetailsWindow extends Overlay { this.tradePrice = tradePrice; rowIndex = -1; - width = 1118; + width = Layout.DETAILS_WINDOW_WIDTH; createGridPane(); addContent(); display(); @@ -137,7 +137,7 @@ public class OfferDetailsWindow extends Overlay { public void show(Offer offer) { this.offer = offer; rowIndex = -1; - width = 1118; + width = Layout.DETAILS_WINDOW_WIDTH; createGridPane(); addContent(); display(); @@ -344,9 +344,9 @@ public class OfferDetailsWindow extends Overlay { addSeparator(gridPane, ++rowIndex); TextArea textArea = addConfirmationLabelTextArea(gridPane, ++rowIndex, Res.get("payment.shared.extraInfo"), "", 0).second; textArea.setText(offer.getCombinedExtraInfo().trim()); - textArea.setMaxHeight(200); + textArea.setMaxHeight(Layout.DETAILS_WINDOW_EXTRA_INFO_MAX_HEIGHT); textArea.setEditable(false); - GUIUtil.adjustHeightAutomatically(textArea); + GUIUtil.adjustHeightAutomatically(textArea, Layout.DETAILS_WINDOW_EXTRA_INFO_MAX_HEIGHT); } // get amount reserved for the offer diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/TradeDetailsWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/TradeDetailsWindow.java index c7dbb0cc68..881d6f7c0b 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/TradeDetailsWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/TradeDetailsWindow.java @@ -106,7 +106,7 @@ public class TradeDetailsWindow extends Overlay { this.trade = trade; rowIndex = -1; - width = 1118; + width = Layout.DETAILS_WINDOW_WIDTH; createGridPane(); addContent(); display(); @@ -236,9 +236,9 @@ public class TradeDetailsWindow extends Overlay { addSeparator(gridPane, ++rowIndex); TextArea textArea = addConfirmationLabelTextArea(gridPane, ++rowIndex, Res.get("payment.shared.extraInfo.offer"), "", 0).second; textArea.setText(offer.getCombinedExtraInfo().trim()); - textArea.setMaxHeight(200); + textArea.setMaxHeight(Layout.DETAILS_WINDOW_EXTRA_INFO_MAX_HEIGHT); textArea.setEditable(false); - GUIUtil.adjustHeightAutomatically(textArea); + GUIUtil.adjustHeightAutomatically(textArea, Layout.DETAILS_WINDOW_EXTRA_INFO_MAX_HEIGHT); } if (contract != null) { diff --git a/desktop/src/main/java/haveno/desktop/util/Layout.java b/desktop/src/main/java/haveno/desktop/util/Layout.java index c0e995aa90..a4e6bf9669 100644 --- a/desktop/src/main/java/haveno/desktop/util/Layout.java +++ b/desktop/src/main/java/haveno/desktop/util/Layout.java @@ -42,4 +42,6 @@ public class Layout { public static final double LIST_ROW_HEIGHT = 34; public static final double ROUNDED_ARC = 20; public static final double FLOATING_ICON_Y = 9; // adjust when .jfx-text-field padding is changed for right icons + public static final double DETAILS_WINDOW_WIDTH = 950; + public static final double DETAILS_WINDOW_EXTRA_INFO_MAX_HEIGHT = 100; }