Filing in icons to work better on dark backgrounds
[ejpi] / src / libraries / qtpie.py
index b6c3bda..e1af2c1 100755 (executable)
@@ -195,9 +195,6 @@ class PieArtist(object):
        ICON_SIZE_DEFAULT = 32
 
        def __init__(self, filing):
-               # @bug The wrong text is being using on unselected pie menus
-               # @bug Plus it would be a good idea to fill in the icon body's
-               # @bug Maybe even make the icons glow?
                self._filing = filing
 
                self._cachedOuterRadius = self._filing.outerRadius()
@@ -259,7 +256,7 @@ class PieArtist(object):
                        if selectionIndex == PieFiling.SELECTION_CENTER and self._filing.center().isEnabled():
                                painter.setBrush(self.palette.highlight())
                        else:
-                               painter.setBrush(self.palette.background())
+                               painter.setBrush(self.palette.window())
                        painter.setPen(self.palette.mid().color())
 
                        painter.drawRect(self._canvas.rect())
@@ -269,7 +266,7 @@ class PieArtist(object):
                        if selectionIndex == 0 and self._filing[0].isEnabled():
                                painter.setBrush(self.palette.highlight())
                        else:
-                               painter.setBrush(self.palette.background())
+                               painter.setBrush(self.palette.window())
 
                        painter.fillRect(self._canvas.rect(), painter.brush())
                else:
@@ -297,7 +294,7 @@ class PieArtist(object):
                if i == selectionIndex and self._filing[i].isEnabled():
                        painter.setBrush(self.palette.highlight())
                else:
-                       painter.setBrush(self.palette.background())
+                       painter.setBrush(self.palette.window())
                painter.setPen(self.palette.mid().color())
 
                a = self._filing._index_to_angle(i, True)
@@ -367,13 +364,13 @@ class PieArtist(object):
                                        brush = self.palette.highlight()
                                else:
                                        pen = self.palette.mid()
-                                       brush = self.palette.background()
+                                       brush = self.palette.window()
                        else:
                                if action.isEnabled():
-                                       pen = self.palette.text()
+                                       pen = self.palette.windowText()
                                else:
                                        pen = self.palette.mid()
-                               brush = self.palette.background()
+                               brush = self.palette.window()
 
                        leftX = x - averageWidth + iconWidth
                        topY = y + textHeight/2
@@ -387,7 +384,7 @@ class PieArtist(object):
                if selectionIndex == PieFiling.SELECTION_CENTER and self._filing.center().isEnabled():
                        background = self.palette.highlight().color()
                else:
-                       background = self.palette.background().color()
+                       background = self.palette.window().color()
 
                innerRadius = self._cachedInnerRadius
                adjustmentCenterPos = adjustmentRect.center()
@@ -490,6 +487,7 @@ class QPieButton(QtGui.QWidget):
 
        def __init__(self, buttonSlice, parent = None):
                # @bug Artifacts on Maemo 5 due to window 3D effects, find way to disable them for just these?
+               # @bug The pie's are being pushed back on screen on Maemo, leading to coordinate issues
                QtGui.QWidget.__init__(self, parent)
                self._cachedCenterPosition = self.rect().center()