set a window title for the popup and some other things.
This commit is contained in:
@@ -402,17 +402,11 @@ class PasswordDialog(QDialog):
|
|||||||
|
|
||||||
class ReceivePopup(QDialog):
|
class ReceivePopup(QDialog):
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
|
||||||
super(QDialog, self).__init__(parent)
|
|
||||||
#self.setFrameStyle(QFrame.WinPanel|QFrame.Raised)
|
|
||||||
#self.setAlignment(Qt.AlignCenter)
|
|
||||||
self.setMouseTracking(True)
|
|
||||||
|
|
||||||
def mouseMoveEvent(self, event):
|
def mouseMoveEvent(self, event):
|
||||||
if not self.rect().contains(event.pos()):
|
if not self.rect().contains(event.pos()):
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
def set_address(self, address):
|
def setup(self, address):
|
||||||
label = QLabel(_("Copied your Bitcoin address to the clipboard!"))
|
label = QLabel(_("Copied your Bitcoin address to the clipboard!"))
|
||||||
address_display = QLineEdit(address)
|
address_display = QLineEdit(address)
|
||||||
address_display.setReadOnly(True)
|
address_display.setReadOnly(True)
|
||||||
@@ -422,6 +416,13 @@ class ReceivePopup(QDialog):
|
|||||||
main_layout.addWidget(label)
|
main_layout.addWidget(label)
|
||||||
main_layout.addWidget(address_display)
|
main_layout.addWidget(address_display)
|
||||||
|
|
||||||
|
self.setMouseTracking(True)
|
||||||
|
self.setWindowTitle("Electrum - " + _("Receive Bitcoin payment"))
|
||||||
|
self.setWindowFlags(Qt.Window|Qt.FramelessWindowHint|Qt.MSWindowsFixedSizeDialogHint)
|
||||||
|
self.layout().setSizeConstraint(QLayout.SetFixedSize)
|
||||||
|
#self.setFrameStyle(QFrame.WinPanel|QFrame.Raised)
|
||||||
|
#self.setAlignment(Qt.AlignCenter)
|
||||||
|
|
||||||
def popup(self):
|
def popup(self):
|
||||||
parent = self.parent()
|
parent = self.parent()
|
||||||
top_left_pos = parent.mapToGlobal(parent.rect().bottomLeft())
|
top_left_pos = parent.mapToGlobal(parent.rect().bottomLeft())
|
||||||
@@ -440,7 +441,7 @@ class MiniActuator:
|
|||||||
if not self.wallet.is_change(addr)]
|
if not self.wallet.is_change(addr)]
|
||||||
copied_address = random.choice(addrs)
|
copied_address = random.choice(addrs)
|
||||||
qApp.clipboard().setText(copied_address)
|
qApp.clipboard().setText(copied_address)
|
||||||
receive_popup.set_address(copied_address)
|
receive_popup.setup(copied_address)
|
||||||
receive_popup.popup()
|
receive_popup.popup()
|
||||||
|
|
||||||
def send(self, address, amount, parent_window):
|
def send(self, address, amount, parent_window):
|
||||||
|
|||||||
Reference in New Issue
Block a user