aboutsummaryrefslogtreecommitdiffstats
path: root/Lib/defconQt/layerSetList.py
diff options
context:
space:
mode:
authorDenis Jacquerye2015-10-19 10:24:34 +0100
committerDenis Jacquerye2015-10-19 10:30:56 +0100
commit63f83224f474c2c191e8cac3cb6bda8f2cb81b7d (patch)
tree16b7c79b713832b93683cca9bc87018c48a3a88e /Lib/defconQt/layerSetList.py
parent9ce52ed3a18616828daf475fc487fd69322bee0e (diff)
downloadtrufont-63f83224f474c2c191e8cac3cb6bda8f2cb81b7d.tar.bz2
Use PEP8 code style
Diffstat (limited to 'Lib/defconQt/layerSetList.py')
-rw-r--r--Lib/defconQt/layerSetList.py21
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