all repos — quickshell @ main

A desert-witch desktop shell

bar/TopBar.qml (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
import Quickshell
import QtQuick
import ".."

PanelWindow {
  id: topBar
  property alias topRightContent: topRight.children
  property alias topCenterContent: topCenter.children
  property alias topLeftContent: topLeft.children
  anchors.top: true
  anchors.left: true
  anchors.right: true
  implicitHeight: Resources.barsize.topbar
  color: Style.bg

  Item {
    id: topRow
    anchors.fill: parent
    Row { // LEFT
      id: topLeft
      leftPadding: 8
      anchors.left: topRow.left
      anchors.verticalCenter: topRow.verticalCenter
    }
    Row { // CENTER
      id: topCenter
      anchors.centerIn: topRow
      anchors.verticalCenter: topRow.verticalCenter
      anchors.horizontalCenter: topRow.horizontalCenter
    }
    Row { // RIGHT
      id: topRight
      rightPadding: 8
      anchors.right: topRow.right
      anchors.verticalCenter: topRow.verticalCenter
    }
  }
}