vendor icons and use phosphor icons
This commit is contained in:
parent
3e29ca8cc3
commit
4a635354c9
3033 changed files with 3068 additions and 42 deletions
|
|
@ -19,16 +19,16 @@ Singleton {
|
|||
let mute = root.ready ? sink.audio.muted : true;
|
||||
let volume = root.ready ? sink.audio.volume : 0;
|
||||
if (mute) {
|
||||
return "audio-volume-muted-symbolic";
|
||||
return "speaker-slash";
|
||||
}
|
||||
if (volume <= 0.33) {
|
||||
return "audio-volume-low-symbolic";
|
||||
return "speaker-none";
|
||||
}
|
||||
if (volume <= 0.66) {
|
||||
return "audio-volume-medium-symbolic";
|
||||
return "speaker-low";
|
||||
}
|
||||
if (volume >= 0.66) {
|
||||
return "audio-volume-high-symbolic";
|
||||
return "speaker-high";
|
||||
}
|
||||
}
|
||||
function setDefaultSink(node: PwNode): void {
|
||||
|
|
|
|||
|
|
@ -13,32 +13,27 @@ Singleton {
|
|||
function getWiredIcon() {
|
||||
if (wiredDev?.hasLink ?? false) {
|
||||
if (wiredDev.connected ?? false) {
|
||||
return "network-wired";
|
||||
return "network";
|
||||
} else
|
||||
return "network-wired-unavailable";
|
||||
return "network-slash";
|
||||
} else
|
||||
return "network-wired-unavailable";
|
||||
return "network-x";
|
||||
}
|
||||
function getWifiIcon() {
|
||||
Networking.checkConnectivity();
|
||||
let state = wifiDev?.state ?? ConnectionState.Unknown;
|
||||
if (state === ConnectionState.Disconnected || state === ConnectionState.Unknown)
|
||||
return "network-wireless-disconnected";
|
||||
if (state === ConnectionState.Connecting || state === ConnectionState.Disconnecting)
|
||||
return "network-wireless-acquiring";
|
||||
|
||||
return "wifi-slash";
|
||||
if (wifiDev?.connected ?? false) {
|
||||
let strength = connectedNet?.signalStrength ?? 0.0;
|
||||
if (strength <= 0.2)
|
||||
return "network-wireless-signal-none";
|
||||
if (strength <= 0.40)
|
||||
return "network-wireless-signal-weak";
|
||||
if (strength <= 0.60)
|
||||
return "network-wireless-signal-ok";
|
||||
if (strength <= 0.80)
|
||||
return "network-wireless-signal-good";
|
||||
if (strength > 0.80)
|
||||
return "network-wireless-signal-excellect";
|
||||
if (strength <= 0.25)
|
||||
return "wifi-none";
|
||||
if (strength <= 0.5)
|
||||
return "wifi-low";
|
||||
if (strength <= 0.75)
|
||||
return "wifi-medium";
|
||||
if (strength > 0.75)
|
||||
return "wifi-high";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@ Rectangle {
|
|||
StyledIcon {
|
||||
readonly property bool isDefault: audioDelContainer.modelData === Audio.defaultAudio
|
||||
readonly property bool isPreferred: audioDelContainer.modelData === Audio.preferredAudio
|
||||
iconName: isDefault ? "radio-checked-symbolic" : "radio-symbolic"
|
||||
iconName: "radio-button"
|
||||
fill: isDefault
|
||||
opacity: (isPreferred && !isDefault) ? 0.5 : 1.0
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
|
|
@ -16,19 +16,26 @@ BarComponent {
|
|||
property bool charging: UPower.displayDevice.state === UPowerDeviceState.Charging
|
||||
implicitWidth: batLayout.implicitWidth + 16
|
||||
|
||||
function batteryIcon(): string {
|
||||
const p = root.percent;
|
||||
function batteryIcon(): string {
|
||||
const level = root.percent;
|
||||
const chg = root.charging;
|
||||
const isFull = root.full;
|
||||
|
||||
if (isFull)
|
||||
return "battery-level-100-charged-symbolic";
|
||||
|
||||
if (p < 10)
|
||||
return chg ? "battery-empty-charging-symbolic" : "battery-empty-symbolic";
|
||||
|
||||
const level = Math.min(100, Math.floor(p / 10) * 10);
|
||||
return chg ? `battery-level-${level}-charging-symbolic` : `battery-level-${level}-symbolic`;
|
||||
if (chg) {
|
||||
return "battery-charging";
|
||||
}
|
||||
if (level <= 25) {
|
||||
return "battery-warning";
|
||||
}
|
||||
if (level <= 50) {
|
||||
return "battery-medium";
|
||||
}
|
||||
if (level <= 75) {
|
||||
return "battery-high";
|
||||
}
|
||||
if (level > 75) {
|
||||
return "battery-full";
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
id: batLayout
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ BarComponent {
|
|||
required property ShellScreen barScreen
|
||||
StyledIcon {
|
||||
id: text
|
||||
iconName: "games-config-theme"
|
||||
iconName: "paint-brush-broad"
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
MouseArea {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ BarComponent {
|
|||
id: songLayout
|
||||
anchors.centerIn: root
|
||||
StyledIcon {
|
||||
iconName: "folder-music-symbolic"
|
||||
iconName: "music-note"
|
||||
}
|
||||
StyledText {
|
||||
Layout.maximumWidth: 400
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ BarComponent {
|
|||
implicitWidth: implicitHeight
|
||||
required property ShellScreen barScreen
|
||||
StyledIcon {
|
||||
iconName: "preferences-desktop-wallpaper-symbolic"
|
||||
iconName: "image"
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
MouseArea {
|
||||
|
|
|
|||
Loading…
Reference in a new issue