code: def paintEvent(self, event):
          
          if self.isVisible() and self.position != self.Position.FLOATING:
              # fill background
              self._background_brush = QBrush(QColor(
                  self.editor.sideareas_color))
              self._foreground_pen = QPen(QColor(
                  self.palette().windowText().color()))
              painter = QPainter(self)
              painter.fillRect(event.rect(), self._background_brush)
docs: Fills the panel background using QPalette.