- painter.setPen(QtCore.Qt.NoPen)
- painter.setBrush(background)
- painter.drawPie(innerRect, 0, 360 * 16)
+ painter.drawRect(adjustmentRect)
+ else:
+ dark = self.palette.mid().color()
+ light = self.palette.light().color()
+ if self._backgroundState == self.BACKGROUND_NOFILL:
+ background = QtGui.QBrush(QtCore.Qt.transparent)
+ else:
+ if selectionIndex == PieFiling.SELECTION_CENTER and self._filing.center().isEnabled():
+ background = self.palette.highlight().color()
+ else:
+ background = self.palette.window().color()
+
+ innerRadius = self._cachedInnerRadius
+ adjustmentCenterPos = adjustmentRect.center()
+ innerRect = QtCore.QRect(
+ adjustmentCenterPos.x() - innerRadius,
+ adjustmentCenterPos.y() - innerRadius,
+ innerRadius * 2 + 1,
+ innerRadius * 2 + 1,
+ )