def sizeHint(self): """we never want a horizontal scrollbar for player names, we always want to see them in full""" result = QWidget.sizeHint(self) available = Internal.app.desktop().availableGeometry() height = max(result.height(), available.height() * 2 // 3) width = max(result.width(), available.width() // 2) return QSize(width, height)
def sizeHint(self): """we never want a horizontal scrollbar for player names, we always want to see them in full""" result = QWidget.sizeHint(self) available = KApplication.kApplication().desktop().availableGeometry() height = max(result.height(), available.height() * 2 // 3) width = max(result.width(), available.width() // 2) return QSize(width, height)
def sizeHint(self): """give the scoring table window a sensible default size""" result = QWidget.sizeHint(self) result.setWidth(result.height() * 3 / 2) # the default is too small. Use at least 2/5 of screen height and 1/4 # of screen width: available = KApplication.kApplication().desktop().availableGeometry() height = max(result.height(), available.height() * 2 / 5) width = max(result.width(), available.width() / 4) result.setHeight(height) result.setWidth(width) return result
def sizeHint(self): """give the scoring table window a sensible default size""" result = QWidget.sizeHint(self) result.setWidth(result.height() * 3 / 2) # the default is too small. Use at least 2/5 of screen height and 1/4 # of screen width: available = Internal.app.desktop().availableGeometry() height = max(result.height(), available.height() * 2 / 5) width = max(result.width(), available.width() / 4) result.setHeight(height) result.setWidth(width) return result