vendor icons and use phosphor icons
This commit is contained in:
parent
3e29ca8cc3
commit
4a635354c9
3033 changed files with 3068 additions and 42 deletions
|
|
@ -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