コード例 #1
0
ファイル: playfield.py プロジェクト: ospalh/kajongg-fork
 def resizeEvent(self, event):
     """Use this hook to determine if we want to ignore one more resize
     event happening for maximized / almost maximized windows.
     this misses a few cases where the window is almost maximized because at
     this point the window has no border yet: event.size, self.geometry() and
     self.frameGeometry are all the same. So we cannot check if the bordered
     window would fit into availableGeometry.
     """
     available = KApplication.kApplication().desktop().availableGeometry()
     if self.ignoreResizing == 1: # at startup
         if available.width() <= event.size().width() \
         or available.height() <= event.size().height():
             self.ignoreResizing += 1
     KXmlGuiWindow.resizeEvent(self, event)
     if self.clientDialog:
         self.clientDialog.placeInField()
コード例 #2
0
ファイル: playfield.py プロジェクト: ospalh/kajongg-fork
 def resizeEvent(self, event):
     """Use this hook to determine if we want to ignore one more resize
     event happening for maximized / almost maximized windows.
     this misses a few cases where the window is almost maximized because at
     this point the window has no border yet: event.size, self.geometry() and
     self.frameGeometry are all the same. So we cannot check if the bordered
     window would fit into availableGeometry.
     """
     available = KApplication.kApplication().desktop().availableGeometry()
     if self.ignoreResizing == 1:  # at startup
         if available.width() <= event.size().width() \
         or available.height() <= event.size().height():
             self.ignoreResizing += 1
     KXmlGuiWindow.resizeEvent(self, event)
     if self.clientDialog:
         self.clientDialog.placeInField()