diff options
| author | Adrien Tétar | 2015-06-13 17:33:24 +0200 |
|---|---|---|
| committer | Adrien Tétar | 2015-06-13 17:33:24 +0200 |
| commit | f39997844c7f477ef9ba795349fa08f9817fdcac (patch) | |
| tree | c11d36089ea316ccfafdec808f348b29bc740ef9 /Lib/defconQt/fontView.py | |
| parent | 86ebcfe18ea1ece54b2716cedc7eb891cb1efe32 (diff) | |
| download | trufont-f39997844c7f477ef9ba795349fa08f9817fdcac.tar.bz2 | |
Fix for cross-platformness
Diffstat (limited to 'Lib/defconQt/fontView.py')
| -rw-r--r-- | Lib/defconQt/fontView.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/defconQt/fontView.py b/Lib/defconQt/fontView.py index b15ba66..d7665d9 100644 --- a/Lib/defconQt/fontView.py +++ b/Lib/defconQt/fontView.py @@ -295,7 +295,9 @@ class CharacterWidget(QWidget): self._maybeDragPosition = None if self.lastKey == -1: if self._maybeDragPosition is None: - self._selection = {(event.y() // self.squareSize) * self.columns + event.x() // self.squareSize} + key = (event.y() // self.squareSize) * self.columns + event.x() // self.squareSize + if key > len(self.glyphs)-1: return + self._selection = {key} self.computeCharacterSelected() else: lastKey = self.lastKey if self.lastKey < len(self.glyphs) else len(self.glyphs)-1 @@ -368,6 +370,8 @@ class CharacterWidget(QWidget): markGradient = QLinearGradient(0, 0, 0, self.squareSize-GlyphCellHeaderHeight) headerFont = QFont() headerFont.setFamily('Lucida Sans Unicode') + headerFont.insertSubstitution('Lucida Sans Unicode', 'Luxi Sans') + headerFont.setPointSize(8) metrics = QFontMetrics(headerFont) for row in range(beginRow, endRow + 1): |
