mirror of
https://github.com/JoinMarket-Org/joinmarket-clientserver.git
synced 2026-08-17 13:07:51 +02:00
Make BitcoinAmountEdit behave the same on resize as QLineEdit
This commit is contained in:
parent
018d45ef4d
commit
b1ee2f0891
1 changed files with 4 additions and 3 deletions
|
|
@ -559,12 +559,13 @@ class BitcoinAmountEdit(QWidget):
|
|||
|
||||
def __init__(self, default_value):
|
||||
super().__init__()
|
||||
layout = QGridLayout()
|
||||
layout = QHBoxLayout()
|
||||
layout.setSizeConstraint(QLayout.SetMaximumSize)
|
||||
layout.setContentsMargins(0, 0, 0, 0)
|
||||
layout.setSpacing(1)
|
||||
self.valueInputBox = QLineEdit()
|
||||
self.editingFinished = self.valueInputBox.editingFinished
|
||||
layout.addWidget(self.valueInputBox, 0, 0)
|
||||
layout.addWidget(self.valueInputBox)
|
||||
self.unitChooser = QComboBox()
|
||||
self.unitChooser.setInsertPolicy(QComboBox.NoInsert)
|
||||
self.unitChooser.addItems(["BTC", "sat"])
|
||||
|
|
@ -572,7 +573,7 @@ class BitcoinAmountEdit(QWidget):
|
|||
self.BTCValidator = BitcoinAmountBTCValidator()
|
||||
self.SatValidator = BitcoinAmountSatValidator()
|
||||
self.setModeBTC()
|
||||
layout.addWidget(self.unitChooser, 0, 1)
|
||||
layout.addWidget(self.unitChooser)
|
||||
if default_value:
|
||||
self.valueInputBox.setText(str(sat_to_btc(amount_to_sat(
|
||||
default_value))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue