fixed notifications font rendering
This commit is contained in:
@@ -3,22 +3,13 @@ import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Networking
|
||||
import Quickshell.Services.Polkit
|
||||
|
||||
import "../../config" as Cfg
|
||||
import "../../components"
|
||||
|
||||
Rectangle {
|
||||
ModuleChip {
|
||||
id: root
|
||||
|
||||
property real panelRadius: Cfg.Config.radius / 2
|
||||
property int borderWidth: Cfg.Config.panelBorderWidth
|
||||
property bool isTop: true
|
||||
property var targetScreen: null
|
||||
property int barHeight: Cfg.Config.barHeight
|
||||
property int barMargin: Cfg.Config.margin
|
||||
|
||||
readonly property var t: Cfg.Config.theme
|
||||
|
||||
readonly property var wifiDevice: {
|
||||
for (const dev of (Networking.devices?.values ?? []))
|
||||
if (dev.type === DeviceType.Wifi) return dev
|
||||
@@ -159,58 +150,18 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
PanelWindow {
|
||||
PopupPanel {
|
||||
id: netPopup
|
||||
screen: root.targetScreen
|
||||
visible: false
|
||||
color: "transparent"
|
||||
|
||||
property bool popupOpen: false
|
||||
ns: "network"
|
||||
chipRoot: root
|
||||
cardWidth: 310
|
||||
|
||||
function open() {
|
||||
root.cancelConnect()
|
||||
hideTimer.stop()
|
||||
visible = true
|
||||
popupOpen = true
|
||||
_doOpen()
|
||||
if (root.hasWifi && root.wifiDevice)
|
||||
root.wifiDevice.scannerEnabled = true
|
||||
}
|
||||
function close() { popupOpen = false; hideTimer.restart() }
|
||||
function toggle() { popupOpen ? close() : open() }
|
||||
|
||||
Timer {
|
||||
id: hideTimer
|
||||
interval: Cfg.Config.popupAnimDuration + 70
|
||||
onTriggered: netPopup.visible = false
|
||||
}
|
||||
|
||||
anchors { top: true; bottom: true; left: true; right: true }
|
||||
WlrLayershell.layer: WlrLayer.Top
|
||||
WlrLayershell.namespace: "main-shell-network"
|
||||
WlrLayershell.exclusiveZone: -1
|
||||
mask: netPopup.popupOpen ? null : _noInput
|
||||
Region { id: _noInput }
|
||||
|
||||
TapHandler { onTapped: netPopup.close() }
|
||||
|
||||
Item {
|
||||
id: popupClip
|
||||
readonly property int cardW: 310
|
||||
readonly property int screenPad: root.barMargin + 10
|
||||
|
||||
x: {
|
||||
var cx = root.mapToItem(null, 0, 0).x + root.width / 2
|
||||
var dx = cx - cardW / 2
|
||||
return Math.max(screenPad, Math.min(dx, parent.width - cardW - screenPad))
|
||||
}
|
||||
width: cardW
|
||||
|
||||
anchors.top: root.isTop ? parent.top : undefined
|
||||
anchors.bottom: root.isTop ? undefined : parent.bottom
|
||||
anchors.topMargin: root.isTop ? (root.barHeight + 10) : 0
|
||||
anchors.bottomMargin: root.isTop ? 0 : (root.barHeight + 10)
|
||||
height: parent.height - root.barHeight - 10
|
||||
clip: true
|
||||
|
||||
Rectangle {
|
||||
id: card
|
||||
@@ -723,6 +674,5 @@ Rectangle {
|
||||
Item { height: 4 }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user