Compare commits
2 commits
f687e17c94
...
9d6a88aa43
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d6a88aa43 | ||
|
|
185121d0d7 |
3 changed files with 35 additions and 20 deletions
|
|
@ -1,19 +1,24 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls.Basic
|
import QtQuick.Controls
|
||||||
|
|
||||||
TabBar {
|
TabBar {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
property alias orientation: view.orientation
|
property alias orientation: view.orientation
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: Item {
|
||||||
|
ListView {
|
||||||
id: view
|
id: view
|
||||||
|
anchors.centerIn: parent
|
||||||
|
implicitWidth: parent.width - 20
|
||||||
|
implicitHeight: parent.height - 20
|
||||||
model: control.contentModel
|
model: control.contentModel
|
||||||
currentIndex: control.currentIndex
|
currentIndex: control.currentIndex
|
||||||
spacing: control.spacing
|
spacing: control.spacing
|
||||||
orientation: ListView.Horizontal
|
orientation: ListView.Horizontal
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
background: Item {}
|
background: Item {}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import qs.config
|
import qs.config
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls.Basic
|
import QtQuick.Controls
|
||||||
|
|
||||||
TabButton {
|
TabButton {
|
||||||
id: control
|
id: control
|
||||||
|
|
@ -14,31 +14,28 @@ TabButton {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
padding: 6
|
padding: 6
|
||||||
color: control.hovered ? Styling.theme.primarycontent : control.checked ? Styling.theme.accent : Styling.theme.basecontent
|
color: control.hovered ? Styling.theme.primarycontent : Styling.theme.basecontent
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
duration: Styling.animations.speed.normal
|
duration: Styling.animations.speed.normal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rotation: control.rotation
|
|
||||||
Behavior on rotation {
|
|
||||||
RotationAnimation {
|
|
||||||
duration: Styling.animations.speed.slow
|
|
||||||
easing.type: Easing.OutQuad
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
id: rectangle
|
id: rectangle
|
||||||
color: control.hovered ? Styling.theme.primary : Styling.theme.base200
|
color: control.hovered ? Styling.theme.primary : Styling.theme.base100
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
duration: Styling.animations.speed.normal
|
duration: Styling.animations.speed.normal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
border.width: 2
|
opacity: control.checked || control.hovered ? 1.0 : 0.0
|
||||||
border.color: control.checked ? Styling.theme.accent : "transparent"
|
Behavior on opacity {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: Styling.animations.speed.normal
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ import qs.components
|
||||||
import qs.services
|
import qs.services
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
import Quickshell.Wayland
|
||||||
|
|
||||||
StyledPanelWindow {
|
StyledPanelWindow {
|
||||||
id: window
|
id: window
|
||||||
|
|
@ -12,6 +14,17 @@ StyledPanelWindow {
|
||||||
implicitWidth: 800
|
implicitWidth: 800
|
||||||
implicitHeight: 400
|
implicitHeight: 400
|
||||||
|
|
||||||
|
WlrLayershell.layer: WlrLayer.Top
|
||||||
|
WlrLayershell.keyboardFocus: window.visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||||
|
|
||||||
|
HyprlandFocusGrab {
|
||||||
|
active: Visibility.configuration
|
||||||
|
windows: [window]
|
||||||
|
onCleared: {
|
||||||
|
Visibility.configuration = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StyledTabBar {
|
StyledTabBar {
|
||||||
id: tabs
|
id: tabs
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue