Taskbar improvements
- Fix broken tooltip and truncate them if too long - Fix SystemInfo width which can lead to blurry image in the taskbar
This commit is contained in:
parent
34fec629e7
commit
9857ef583c
3 changed files with 10 additions and 3 deletions
|
|
@ -8,6 +8,10 @@ Row {
|
|||
spacing: 10
|
||||
visible: Settings.settings.showSystemInfoInBar
|
||||
|
||||
// The width calculation below is required to ensure our row width is an integer.
|
||||
// If omitted the next component to the right might get blurry (Taskbar icons).
|
||||
width: Math.floor(cpuUsageLayout.width + cpuTempLayout.width + memoryUsageLayout.width + (2 * 10))
|
||||
|
||||
Row {
|
||||
id: cpuUsageLayout
|
||||
spacing: 6
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ Item {
|
|||
// Attach custom tooltip
|
||||
StyledTooltip {
|
||||
id: styledTooltip
|
||||
positionAbove: false
|
||||
}
|
||||
|
||||
function getAppIcon(toplevel: Toplevel): string {
|
||||
|
|
@ -94,7 +95,8 @@ Item {
|
|||
cursorShape: Qt.PointingHandCursor
|
||||
|
||||
onEntered: {
|
||||
styledTooltip.text = appTitle || appId;
|
||||
var text = appTitle || appId;
|
||||
styledTooltip.text = text.length > 60 ? text.substring(0, 60) + "..." : text;
|
||||
styledTooltip.targetItem = appButton;
|
||||
styledTooltip.tooltipVisible = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue