refactor: unified BarModule base component, click-to-open panels, remove pinning
This commit is contained in:
parent
034f0b6d85
commit
26476dc930
33 changed files with 273 additions and 517 deletions
|
|
@ -4,9 +4,10 @@ import Quickshell.Io
|
|||
import "." as M
|
||||
import "../services" as S
|
||||
|
||||
Row {
|
||||
M.BarModule {
|
||||
id: root
|
||||
spacing: 4
|
||||
cursorShape: Qt.ArrowCursor
|
||||
|
||||
required property var bar
|
||||
|
||||
|
|
@ -71,7 +72,7 @@ Row {
|
|||
M.TooltipState.text = name;
|
||||
M.TooltipState.itemX = pill.mapToGlobal(pill.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0);
|
||||
M.TooltipState.screen = QsWindow.window?.screen ?? null;
|
||||
M.TooltipState.accentColor = root.parent?.accentColor ?? S.Theme.base05;
|
||||
M.TooltipState.accentColor = root.accentColor;
|
||||
M.TooltipState.visible = true;
|
||||
} else {
|
||||
M.TooltipState.visible = false;
|
||||
|
|
@ -82,7 +83,7 @@ Row {
|
|||
width: S.Theme.fontSize + 4
|
||||
height: S.Theme.fontSize + 4
|
||||
radius: width / 2
|
||||
color: pill.active ? (root.parent?.accentColor ?? S.Theme.base0D) : (pill._hovered ? S.Theme.base03 : S.Theme.base02)
|
||||
color: pill.active ? root.accentColor : (pill._hovered ? S.Theme.base03 : S.Theme.base02)
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: 150
|
||||
|
|
@ -92,7 +93,7 @@ Row {
|
|||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: pill.modelData.idx
|
||||
color: pill.active ? S.Theme.base00 : (root.parent?.accentColor ?? S.Theme.base05)
|
||||
color: pill.active ? S.Theme.base00 : root.accentColor
|
||||
font.pixelSize: S.Theme.fontSize - 2
|
||||
font.family: S.Theme.fontFamily
|
||||
font.bold: pill.active
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue