From 96d82800eaa15eaec91db8489ef5dc2459a3c811 Mon Sep 17 00:00:00 2001 From: Adrien Tétar Date: Sat, 24 Oct 2015 09:39:38 +0200 Subject: meta: fix sizing mechanism, fix AllFonts() --- Lib/defconQt/fontView.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'Lib/defconQt/fontView.py') diff --git a/Lib/defconQt/fontView.py b/Lib/defconQt/fontView.py index 02656f8..dfa2fe2 100644 --- a/Lib/defconQt/fontView.py +++ b/Lib/defconQt/fontView.py @@ -76,7 +76,7 @@ class Application(QApplication): for window in QApplication.topLevelWidgets(): if isinstance(window, MainWindow): fonts.append(window._font) - return fonts + return fonts def currentFont(self): return self._currentMainWindow._font @@ -1050,9 +1050,9 @@ class MainWindow(QMainWindow): self.selectionLabel.setText(text) def _squareSizeChanged(self): - val = self.sqSizeSlider.value() - self.collectionWidget._sizeEvent(self.width(), val) - QToolTip.showText(QCursor.pos(), str(val), self) + squareSize = self.sqSizeSlider.value() + self.collectionWidget.squareSize = squareSize + QToolTip.showText(QCursor.pos(), str(squareSize), self) def event(self, event): if event.type() == QEvent.WindowActivate: @@ -1063,11 +1063,6 @@ class MainWindow(QMainWindow): app.setCurrentGlyph(lastSelectedGlyph) return super(MainWindow, self).event(event) - def resizeEvent(self, event): - if self.isVisible(): - self.collectionWidget._sizeEvent(event.size().width()) - super(MainWindow, self).resizeEvent(event) - def setWindowTitle(self, title=None): if title is None: if self.font.path is not None: -- cgit v1.2.3