moved the insides inside the rectangle
This commit is contained in:
@@ -56,49 +56,49 @@ Rectangle {
|
|||||||
: "transparent"
|
: "transparent"
|
||||||
|
|
||||||
border.width: (wsArea.containsMouse || workspaceData.active) ? Config.border_width : 0
|
border.width: (wsArea.containsMouse || workspaceData.active) ? Config.border_width : 0
|
||||||
}
|
|
||||||
|
|
||||||
// hyprland workspace api + color
|
// hyprland workspace api + color
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: wsArea
|
id: wsArea
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("[Workspaces] Switch to workspace: " + workspaceData.id)
|
console.log("[Workspaces] Switch to workspace: " + workspaceData.id)
|
||||||
Hyprland.dispatch("workspace " + workspaceData.id)
|
Hyprland.dispatch("workspace " + workspaceData.id)
|
||||||
Hyprland.dispatch("hl.dsp.focus({ workspace = "+workspaceData.id+" })")
|
Hyprland.dispatch("hl.dsp.focus({ workspace = "+workspaceData.id+" })")
|
||||||
}
|
|
||||||
|
|
||||||
Row {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
spacing: Config.spacing_fun(parent.height)
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: wsNum
|
|
||||||
text: workspaceData.id
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
color: wsArea.containsMouse ? Colors.tertiary
|
|
||||||
: workspaceData.active ? Colors.primary
|
|
||||||
: Colors.secondary
|
|
||||||
font.pixelSize: Config.iconSize(bar.height)
|
|
||||||
font.family: Config.font
|
|
||||||
font.bold: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: wsIconsRow
|
anchors.centerIn: parent
|
||||||
spacing: Config.spacing_fun(workspacesContainer.height)
|
spacing: Config.spacing_fun(parent.height)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
Repeater {
|
Text {
|
||||||
model: AppsState.iconsForWorkspace(workspaceData.id)
|
id: wsNum
|
||||||
delegate: Text {
|
text: workspaceData.id
|
||||||
text: modelData
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: wsArea.containsMouse ? Colors.tertiary
|
color: wsArea.containsMouse ? Colors.tertiary
|
||||||
: Colors.secondary
|
: workspaceData.active ? Colors.primary
|
||||||
font.pixelSize: Config.labelSize(bar.height)
|
: Colors.secondary
|
||||||
font.family: Config.font
|
font.pixelSize: Config.iconSize(bar.height)
|
||||||
|
font.family: Config.font
|
||||||
|
font.bold: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: wsIconsRow
|
||||||
|
spacing: Config.spacing_fun(workspacesContainer.height)
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
model: AppsState.iconsForWorkspace(workspaceData.id)
|
||||||
|
delegate: Text {
|
||||||
|
text: modelData
|
||||||
|
color: wsArea.containsMouse ? Colors.tertiary
|
||||||
|
: Colors.secondary
|
||||||
|
font.pixelSize: Config.labelSize(bar.height)
|
||||||
|
font.family: Config.font
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user