Merge pull request #933 from MikeTheWatchGuy/Dev-latest

Added close button hint setting if disable close set
This commit is contained in:
MikeTheWatchGuy 2018-12-14 23:46:41 -05:00 committed by GitHub
commit 1e1926cdc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

View File

@ -5475,6 +5475,10 @@ def StartupTK(window):
if window.DisableMinimize: if window.DisableMinimize:
window.QT_QMainWindow.setWindowFlags(window.QT_QMainWindow.windowFlags()&~Qt.WindowMinimizeButtonHint) window.QT_QMainWindow.setWindowFlags(window.QT_QMainWindow.windowFlags()&~Qt.WindowMinimizeButtonHint)
window.QT_QMainWindow.setWindowFlags(window.QT_QMainWindow.windowFlags()&~Qt.WindowMaximizeButtonHint) window.QT_QMainWindow.setWindowFlags(window.QT_QMainWindow.windowFlags()&~Qt.WindowMaximizeButtonHint)
if window.DisableClose:
window.QT_QMainWindow.setWindowFlags(window.QT_QMainWindow.windowFlags()&~Qt.WindowCloseButtonHint)
# window.QTWindow.setAttribute(Qt.WA_TranslucentBackground) # window.QTWindow.setAttribute(Qt.WA_TranslucentBackground)
# shadow = QtWidgets.QGraphicsDropShadowEffect() # shadow = QtWidgets.QGraphicsDropShadowEffect()
# shadow.setBlurRadius(9.0) # shadow.setBlurRadius(9.0)
@ -5785,12 +5789,7 @@ class DebugWin():
self.output_element.Update(outstring, append=True) self.output_element.Update(outstring, append=True)
else: else:
print(*args, sep=sepchar, end=endchar) print(*args, sep=sepchar, end=endchar)
# TODO
# Add extra check to see if the window was closed... if closed by X sometimes am not told
# try:
# state = self.window.TKroot.state()
# except:
# self.Close()
def Close(self): def Close(self):
self.window.Close() self.window.Close()