diff options
| author | Adrien Tétar | 2015-10-20 09:38:16 +0200 | 
|---|---|---|
| committer | Adrien Tétar | 2015-10-20 09:38:16 +0200 | 
| commit | 21e5454735e6bb975d44747114e851d015682588 (patch) | |
| tree | e07a6274b28985e6f29d67a50e4914241eb356c1 /Lib/defconQt/glyphCollectionView.py | |
| parent | 8838defa76d26c937d1f2e34e0f37cf2dd105cf2 (diff) | |
| download | trufont-21e5454735e6bb975d44747114e851d015682588.tar.bz2 | |
glyphCollectionView: calculate voidFont pointSize depending on squareSize
Diffstat (limited to 'Lib/defconQt/glyphCollectionView.py')
| -rw-r--r-- | Lib/defconQt/glyphCollectionView.py | 13 | 
1 files changed, 11 insertions, 2 deletions
| diff --git a/Lib/defconQt/glyphCollectionView.py b/Lib/defconQt/glyphCollectionView.py index c56874f..951b3c4 100644 --- a/Lib/defconQt/glyphCollectionView.py +++ b/Lib/defconQt/glyphCollectionView.py @@ -50,8 +50,7 @@ class GlyphCollectionWidget(QWidget):          super(GlyphCollectionWidget, self).__init__(parent)          self.setAttribute(Qt.WA_KeyCompression)          self._glyphs = [] -        # TODO: hide behind a façade -        self.squareSize = 56 +        self._squareSize = 56          self._columns = 10          self._selection = set()          self._oldSelection = None @@ -124,6 +123,16 @@ class GlyphCollectionWidget(QWidget):          index = self._lastSelectedCell          return self._glyphs[index] if index is not None else None +    def _get_squareSize(self): +        return self._squareSize + +    def _set_squareSize(self, squareSize): +        self._squareSize = squareSize +        voidFont.setPointSize(.425 * self.squareSize) + +    squareSize = property(_get_squareSize, _set_squareSize, doc="The size of" +                          "a glyph cell.") +      def scrollArea(self):          return self._scrollArea | 
