diff options
| author | Denis Jacquerye | 2015-10-19 10:24:34 +0100 | 
|---|---|---|
| committer | Denis Jacquerye | 2015-10-19 10:30:56 +0100 | 
| commit | 63f83224f474c2c191e8cac3cb6bda8f2cb81b7d (patch) | |
| tree | 16b7c79b713832b93683cca9bc87018c48a3a88e /Lib/defconQt/layerSetList.py | |
| parent | 9ce52ed3a18616828daf475fc487fd69322bee0e (diff) | |
| download | trufont-63f83224f474c2c191e8cac3cb6bda8f2cb81b7d.tar.bz2 | |
Use PEP8 code style
Diffstat (limited to 'Lib/defconQt/layerSetList.py')
| -rw-r--r-- | Lib/defconQt/layerSetList.py | 21 | 
1 files changed, 13 insertions, 8 deletions
| diff --git a/Lib/defconQt/layerSetList.py b/Lib/defconQt/layerSetList.py index 485477b..e5617b9 100644 --- a/Lib/defconQt/layerSetList.py +++ b/Lib/defconQt/layerSetList.py @@ -1,11 +1,14 @@  from PyQt5.QtCore import Qt  from PyQt5.QtGui import QKeySequence, QColor, QPixmap, QIcon -from PyQt5.QtWidgets import (QApplication, QWidget, QMenu, QListWidget, -    QListWidgetItem, QAbstractItemView, QVBoxLayout, QAction, QColorDialog) -from defconQt import icons_db +from PyQt5.QtWidgets import ( +    QApplication, QListWidget, QListWidgetItem, QAbstractItemView, QAction, +    QColorDialog) +# from defconQt import icons_db  from defconQt.glyphView import AddLayerDialog +  class LayerSetList(QListWidget): +      def __init__(self, parent=None, *args, **kwargs):          super().__init__(parent, *args, **kwargs) @@ -27,7 +30,7 @@ class LayerSetList(QListWidget):          action = QAction("Change &Name", self)          action.setShortcuts(QKeySequence('n')) -        action.triggered.connect(lambda : self.editItem(self.currentItem())) +        action.triggered.connect(lambda: self.editItem(self.currentItem()))          self.addAction(action)          action = QAction("Change &Color", self) @@ -81,7 +84,7 @@ class LayerSetList(QListWidget):          item.setFlags(item.flags() | Qt.ItemIsEditable) -        return item; +        return item      def _getCurrentLayer(self):          item = self.currentItem() @@ -99,7 +102,7 @@ class LayerSetList(QListWidget):              # because I think we can't handle a font without a default layer              # TODO: try this              return -        del self._layerSet[layer.name]; +        del self._layerSet[layer.name]      def _reordered(self, *args):          # get a new layer order @@ -122,8 +125,10 @@ class LayerSetList(QListWidget):          if not layer:              return -        startColor = layer.color and QColor.fromRgbF(*layer.color) or QColor('limegreen') -        qcolor = QColorDialog.getColor(startColor, self, options=QColorDialog.ShowAlphaChannel) +        startColor = layer.color and QColor.fromRgbF(*layer.color) or \ +            QColor('limegreen') +        qcolor = QColorDialog.getColor( +            startColor, self, options=QColorDialog.ShowAlphaChannel)          if not qcolor.isValid():              # cancelled              return | 
