Skip to content

Commit

Permalink
make the Question Mark popups not block the entire UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Samuels committed Mar 18, 2014
1 parent bef497d commit 51e717e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 41 deletions.
2 changes: 1 addition & 1 deletion ArmoryQt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5596,7 +5596,7 @@ def createToolTipWidget(self, tiptext, iconSz=2):
lbl.setToolTip('<u></u>' + tiptext)
lbl.setMaximumWidth(relaxedSizeStr(lbl, '(?)')[0])
def pressEv(ev):
DlgTooltip(self, lbl, tiptext).exec_()
QWhatsThis.showText(ev.globalPos(), tiptext, self)
lbl.mousePressEvent = pressEv
return lbl

Expand Down
40 changes: 0 additions & 40 deletions qtdialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,46 +360,6 @@ def pressBackspace(self):
self.parent.edtPasswd.setText(currPwd[:-1])
self.parent.redrawKeys()


################################################################################
class DlgTooltip(ArmoryDialog):
def __init__(self, parentDlg=None, parentLbl=None, tiptext=''):
super(DlgTooltip, self).__init__(parentDlg, main=None)

if not parentDlg or not tiptext:
self.accept()

qc = QCursor.pos()
qp = QPoint(qc.x() - 20, qc.y() - 20)
self.move(qp)

tiptext += '<font size=2 color="#000044"><br>[Click to close]</font>'

lblText = QRichLabel(tiptext, doWrap=True)
lblText.mousePressEvent = lambda ev: self.accept()
lblText.mouseReleaseEvent = lambda ev: self.accept()
layout = QVBoxLayout()
layout.addWidget(makeHorizFrame([lblText], STYLE_RAISED))
layout.setContentsMargins(0, 0, 0, 0)
self.setLayout(layout)

self.setStyleSheet('QDialog { background-color : %s }' % htmlColor('Foreground'))
lblText.setStyleSheet('QLabel { background-color : %s }' % htmlColor('SlightBkgdDark'))
lblText.setContentsMargins(3, 3, 3, 3)

self.setMinimumWidth(150)
self.setWindowFlags(Qt.SplashScreen)

# def mouseReleaseEvent(self, ev):
# self.accept()

def mousePressEvent(self, ev):
self.accept()

def keyPressEvent(self, ev):
self.accept()


################################################################################
class DlgGenericGetPassword(ArmoryDialog):
def __init__(self, descriptionStr, parent=None, main=None):
Expand Down

0 comments on commit 51e717e

Please sign in to comment.