Update changelog for v1.0.0-101pika7; improve ActiveWindow icon retrieval and adjust image dimensions for better display
All checks were successful
PikaOS Package Build & Release (amd64-v3) / build (push) Successful in 50s

This commit is contained in:
ferreo 2024-11-17 22:16:58 +00:00
parent bc894da4a9
commit f1f4fb1f2c
3 changed files with 13 additions and 11 deletions

View File

@ -1 +1 @@
1 2

View File

@ -1,4 +1,4 @@
pikabar (1.0.0-101pika6) pika; urgency=medium pikabar (1.0.0-101pika7) pika; urgency=medium
* Font fixes and icon fixes * Font fixes and icon fixes

View File

@ -2,32 +2,34 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import Quickshell import Quickshell
import Quickshell.Wayland import Quickshell.Wayland
import Quickshell.Widgets
import "root:/" import "root:/"
Row { Row {
spacing: 10 spacing: 10
function getIcon() { function getIcon() {
var icon = Quickshell.iconPath(ToplevelManager.activeToplevel.appId.toLowerCase()) var icon = Quickshell.iconPath(ToplevelManager.activeToplevel.appId.toLowerCase());
if (!icon) { if (!icon) {
icon = Quickshell.iconPath(ToplevelManager.activeToplevel.appId) icon = Quickshell.iconPath(ToplevelManager.activeToplevel.appId);
} }
if (!icon) { if (!icon) {
icon = Quickshell.iconPath(ToplevelManager.activeToplevel.title) icon = Quickshell.iconPath(ToplevelManager.activeToplevel.title);
} }
if (!icon) { if (!icon) {
icon = Quickshell.iconPath(ToplevelManager.activeToplevel.title.toLowerCase()) icon = Quickshell.iconPath(ToplevelManager.activeToplevel.title.toLowerCase());
} }
if (!icon) { if (!icon) {
icon = Quickshell.iconPath("application-x-executable") icon = Quickshell.iconPath("application-x-executable");
} }
return icon
return icon;
} }
SimpleImage { IconImage {
height: 42 height: 42
Layout.fillHeight: true Layout.fillHeight: true
implicitWidth: parent.height / 2 implicitWidth: parent.height * 0.6
source: ToplevelManager.activeToplevel ? getIcon() : "" source: ToplevelManager.activeToplevel ? getIcon() : ""
} }