docs: def _draw_rect(self, rect, painter):
          """
          Draw the background rectangle using the current style primitive color
          or foldIndicatorBackground if nativeFoldingIndicator is true.
  
          :param rect: The fold zone rect to draw
  
          :param painter: The widget's painter.
          """
          c = self._custom_color
          if self._native:
              c = self.get_system_bck_color()
          grad = QtGui.QLinearGradient(rect.topLeft(),
                                       rect.topRight())
          if sys.platform == 'darwin':
              grad.setColorAt(0, c.lighter(100))
              grad.setColorAt(1, c.lighter(110))
              outline = c.darker(110)
          else:
              grad.setColorAt(0, c.lighter(110))
              grad.setColorAt(1, c.lighter(130))
              outline = c.darker(100)
          painter.fillRect(rect, grad)
          painter.setPen(QtGui.QPen(outline))
          painter.drawLine(rect.topLeft() +
                           QtCore.QPointF(1, 0),
                           rect.topRight() -
                           QtCore.QPointF(1, 0))
          painter.drawLine(rect.bottomLeft() +
                           QtCore.QPointF(1, 0),
                           rect.bottomRight() -
                           QtCore.QPointF(1, 0))
          painter.drawLine(rect.topRight() +
                           QtCore.QPointF(0, 1),
                           rect.bottomRight() -
                           QtCore.QPointF(0, 1))
          painter.drawLine(rect.topLeft() +
                           QtCore.QPointF(0, 1),
                           rect.bottomLeft() -
                           QtCore.QPointF(0, 1))