refactor(quickshell): drop the Persona names from the primitives
P5Panel, P5Button, P5Slider and P5Tooltip become Panel, ActionButton, LevelSlider and Tooltip. ActionButton and LevelSlider avoid clashing with QtQuick.Controls, which the ask panel imports.
This commit is contained in:
1 parent
7b7cd3e575
commit
add12ccc76
20 files changed
+29
-29
No files matched your search
@@ -74,7 +74,7 @@ backdrop/ the wallpaper, drawn by the shell
|
||||
assets/ halftone and stripe tiles, generated with ImageMagick
|
||||
```
|
||||
|
||||
`P5Panel` is the base surface everything sits on. It does not auto-size —
|
||||
`Panel` is the base surface everything sits on. It does not auto-size —
|
||||
callers set implicit sizes from their own layout (`row.implicitWidth +
|
||||
contentPad * 2`), which keeps the shape maths out of binding loops.
|
||||
|
||||
@@ -441,7 +441,7 @@ zones itself, so every piece is placed from the screen edge.
|
||||
|
||||
**Soft, everywhere else.** The porthole is the shape the desktop is built
|
||||
around, and every smaller surface is a gentler echo of it. `Theme.skew` and
|
||||
`Theme.cut` are `0`; `P5Panel` and `Skew` draw `Geom.roundedRect` with
|
||||
`Theme.cut` are `0`; `Panel` and `Skew` draw `Geom.roundedRect` with
|
||||
`Theme.radiusS` (pills, chips, meter tracks), `radiusM` (rows, buttons) or
|
||||
`radiusL`. `radiusL` is `frameRadius - padS`: anything inset by `padS` inside
|
||||
one of the frame's curves — a hovered notification in the drawer's corner —
|
||||
|
||||
@@ -73,7 +73,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
active: root.standalone
|
||||
|
||||
sourceComponent: P5Panel {
|
||||
sourceComponent: Panel {
|
||||
lean: root.lean
|
||||
leanLeft: root.leanLeft
|
||||
chop: root.chop
|
||||
|
||||
@@ -122,7 +122,7 @@ Item {
|
||||
}
|
||||
|
||||
// Leading-edge wipe. On the rail this runs vertically down the left side,
|
||||
// mirroring the accent bar P5Panel puts on horizontal modules.
|
||||
// mirroring the accent bar Panel puts on horizontal modules.
|
||||
//
|
||||
// Held off the edge by `wipeInset`: the icon spans the rail's full width, so
|
||||
// at x = 0 this landed exactly on the slab's own border.
|
||||
@@ -162,7 +162,7 @@ Item {
|
||||
onWheel: event => root.scrolled(event.angleDelta.y)
|
||||
}
|
||||
|
||||
P5Tooltip {
|
||||
Tooltip {
|
||||
anchorItem: root
|
||||
triggerHovered: root.hovered
|
||||
title: root.label
|
||||
|
||||
@@ -48,7 +48,7 @@ FocusScope {
|
||||
implicitWidth: wide ? 260 : (row.implicitWidth + panel.contentPad * 2)
|
||||
implicitHeight: 44
|
||||
|
||||
P5Panel {
|
||||
Panel {
|
||||
id: panel
|
||||
anchors.fill: parent
|
||||
lean: root.lean
|
||||
@@ -4,7 +4,7 @@ import "root:/components"
|
||||
|
||||
// Calm, permanent-chrome preset. It is deliberately flat and opaque: one
|
||||
// neutral hairline, no texture, no ticks, and no accent unless active.
|
||||
P5Panel {
|
||||
Panel {
|
||||
property bool active: false
|
||||
property color tone: Theme.treatmentActiveMark
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -3,7 +3,7 @@ import QtQuick.Shapes
|
||||
import "root:/config"
|
||||
import "root:/components"
|
||||
|
||||
// A small block — the small-scale counterpart to P5Panel. Upright and rounded
|
||||
// A small block — the small-scale counterpart to Panel. Upright and rounded
|
||||
// under the YoRHa theme; it still leans if given a lean.
|
||||
//
|
||||
// Every tick, rule, meter segment and slider rail in this shell leans at
|
||||
@@ -23,12 +23,12 @@ Shape {
|
||||
property color borderColor: "transparent"
|
||||
property real borderWidth: 0
|
||||
|
||||
// Lean of the vertical edges as a fraction of height, matching P5Panel.
|
||||
// Lean of the vertical edges as a fraction of height, matching Panel.
|
||||
property real lean: Theme.skew
|
||||
property bool leanLeft: false
|
||||
|
||||
// Wide, short pieces — the rail's hairline rules — slant their horizontal
|
||||
// edges by a fraction of width instead, exactly as P5Panel does for the
|
||||
// edges by a fraction of width instead, exactly as Panel does for the
|
||||
// rail slab.
|
||||
property bool vertical: false
|
||||
|
||||
|
||||
File renamed without changes.
@@ -124,7 +124,7 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
|
||||
P5Panel {
|
||||
Panel {
|
||||
id: panel
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
|
||||
@@ -50,7 +50,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
P5Button {
|
||||
ActionButton {
|
||||
id: muteButton
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
@@ -59,7 +59,7 @@ Item {
|
||||
onClicked: Audio.toggleMicMute()
|
||||
}
|
||||
|
||||
P5Slider {
|
||||
LevelSlider {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
@@ -57,7 +57,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
P5Slider {
|
||||
LevelSlider {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
@@ -50,7 +50,7 @@ Popout {
|
||||
width: parent.width
|
||||
spacing: Theme.padS
|
||||
|
||||
P5Button {
|
||||
ActionButton {
|
||||
id: outputMuteButton
|
||||
width: parent.width
|
||||
text: Audio.muted ? "Unmute output" : "Mute output"
|
||||
@@ -58,7 +58,7 @@ Popout {
|
||||
onClicked: Audio.toggleMute()
|
||||
}
|
||||
|
||||
P5Button {
|
||||
ActionButton {
|
||||
width: parent.width
|
||||
text: "Open audio mixer"
|
||||
icon: ""
|
||||
@@ -178,7 +178,7 @@ Popout {
|
||||
}
|
||||
}
|
||||
|
||||
P5Slider {
|
||||
LevelSlider {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
@@ -123,7 +123,7 @@ Popout {
|
||||
|
||||
// Follows the detail line rather than being pinned to the bottom of a
|
||||
// fixed-height panel, which is what left a dead band above it.
|
||||
P5Button {
|
||||
ActionButton {
|
||||
id: suspendButton
|
||||
anchors.top: detailText.bottom
|
||||
anchors.topMargin: Theme.padL
|
||||
|
||||
@@ -40,14 +40,14 @@ Popout {
|
||||
anchors.left: parent.left
|
||||
spacing: Theme.padS
|
||||
|
||||
P5Button {
|
||||
ActionButton {
|
||||
text: Bt.enabled ? "On" : "Off"
|
||||
icon: Bt.enabled ? "" : ""
|
||||
accent: Bt.enabled ? Theme.accent : Theme.muted
|
||||
onClicked: Bt.toggle()
|
||||
}
|
||||
|
||||
P5Button {
|
||||
ActionButton {
|
||||
text: Bt.discovering ? "Scanning" : "Scan"
|
||||
icon: ""
|
||||
accent: Bt.discovering ? Theme.accent : Theme.primary
|
||||
|
||||
@@ -172,7 +172,7 @@ Popout {
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
P5Slider {
|
||||
LevelSlider {
|
||||
anchors.left: elapsed.right
|
||||
anchors.right: total.left
|
||||
anchors.leftMargin: Theme.padS
|
||||
|
||||
@@ -62,14 +62,14 @@ Popout {
|
||||
anchors.left: parent.left
|
||||
spacing: Theme.padS
|
||||
|
||||
P5Button {
|
||||
ActionButton {
|
||||
text: Net.wifiEnabled ? "Wi-Fi On" : "Wi-Fi Off"
|
||||
icon: Net.wifiEnabled ? "" : ""
|
||||
accent: Net.wifiEnabled ? Theme.primary : Theme.muted
|
||||
onClicked: Net.toggleWifi()
|
||||
}
|
||||
|
||||
P5Button {
|
||||
ActionButton {
|
||||
text: "Settings"
|
||||
icon: ""
|
||||
onClicked: Actions.openNetworkSettings()
|
||||
|
||||
@@ -34,14 +34,14 @@ Popout {
|
||||
anchors.left: parent.left
|
||||
spacing: Theme.padS
|
||||
|
||||
P5Button {
|
||||
ActionButton {
|
||||
text: Notifs.dnd ? "Silenced" : "Silence"
|
||||
icon: Notifs.dnd ? "" : ""
|
||||
accent: Notifs.dnd ? Theme.treatmentOffText : Theme.primary
|
||||
onClicked: Notifs.toggleDnd()
|
||||
}
|
||||
|
||||
P5Button {
|
||||
ActionButton {
|
||||
text: "Clear"
|
||||
icon: ""
|
||||
destructive: true
|
||||
|
||||
@@ -3,8 +3,8 @@ import "root:/config"
|
||||
import "root:/components"
|
||||
|
||||
// The slab every popout sits on. Pure preset — it declares no children of its
|
||||
// own, so P5Panel's default content property stays usable by callers.
|
||||
P5Panel {
|
||||
// own, so Panel's default content property stays usable by callers.
|
||||
Panel {
|
||||
property color tone: Theme.primary
|
||||
property bool textured: false
|
||||
|
||||
@@ -14,7 +14,7 @@ P5Panel {
|
||||
readonly property bool attached: parent?.frameAttached ?? false
|
||||
|
||||
fill: attached ? "transparent" : Theme.mantle
|
||||
// Zero, not a transparent fill: P5Panel re-applies this opacity to the
|
||||
// Zero, not a transparent fill: Panel re-applies this opacity to the
|
||||
// fill colour, which turned "transparent" into 97% black.
|
||||
fillOpacity: attached ? 0 : 0.97
|
||||
// The frame is structure: a neutral hairline. A free-standing panel takes
|
||||
|
||||
@@ -10,7 +10,7 @@ import "root:/components"
|
||||
// implementation, but that draws a stock widget popup — square corners, system
|
||||
// palette, no lean — hanging off the corner of a shell that has none of those
|
||||
// things. This walks the menu with QsMenuOpener instead and draws it as a
|
||||
// P5Panel, so a right click on a tray icon produces the same object language as
|
||||
// Panel, so a right click on a tray icon produces the same object language as
|
||||
// everything else on the rail.
|
||||
//
|
||||
// Dismissal is a Hyprland focus grab: click anywhere outside and the compositor
|
||||
|
||||
Reference in new issue
Block a user