Add an icon to the general tab

This commit is contained in:
Simon Hausmann 2021-10-07 13:37:22 +02:00 committed by Simon Hausmann
parent f916ca4124
commit bcf4f2b3de
3 changed files with 18 additions and 0 deletions

View file

@ -12,3 +12,10 @@ cargo install sixtyfps-viewer
The examples also assume that [`jq`](https://stedolan.github.io/jq/) is in the path
* `simple_input.sh`: shows how to query a few parameter with bash
## Attributions
The `laptop.svg` icon is `emoji_u1f4bb.svg` from the Noto Emoji font from
https://github.com/googlefonts/noto-emoji
and licensed under the terms of the Apache license, version 2.0; copyright Google Inc.

1
examples/bash/laptop.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 128 128"><path d="M106 24.79H22.15c-1.92 0-3.48 1.56-3.48 3.48v57.59c0 1.92 1.56 3.48 3.48 3.48H106c1.92 0 3.48-1.56 3.48-3.48V28.27c0-1.92-1.55-3.48-3.48-3.48z" fill="#b7d5e5"/><radialGradient id="ssvg-id-laptopa" cx="48.408" cy="13.024" r="75.465" gradientTransform="matrix(1 0 0 1.0843 0 -10.19)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2f7889"/><stop offset="1" stop-color="#424242"/></radialGradient><path fill="url(#ssvg-id-laptopa)" d="M104.75 83.2H23.4l.96-52.27h79.43z"/><path d="M121.09 123.82H7.59c-.43 0-.83-.03-1.2-.09c-2.88-.44-4.21-4.18-2.5-6.74l.39-.59h119.59l.4.6c1.86 2.78.12 6.76-3.04 6.81c-.04.01-.09.01-.14.01z" fill="#2f7889"/><path d="M106.84 90.41H20.6c-1.27 0-2.54.77-3.25 1.99l-14 25.48c-.59.88-.01 2.12.99 2.12H123.8c1 0 1.58-1.24.99-2.12l-14.71-25.63c-.7-1.08-1.97-1.84-3.24-1.84z" fill="#eee"/><path fill="#b7d5e5" d="M86.36 115.52H41.8l2.85-7.98h39.07z"/><g opacity=".57" fill="#69a1ba"><path d="M72.69 94.84l-.27-2.2h-3.44l.13 2.2z"/><path d="M67.14 94.84l-.14-2.2h-3.45v2.2z"/><path d="M93.61 94.84l-.81-2.2h-3.26l.68 2.2z"/><path d="M88.36 94.84l-.68-2.2h-3.32l.54 2.2z"/><path d="M83.18 94.84l-.54-2.2h-3.37l.41 2.2z"/><path d="M102.11 94.84l-.95-2.2h-6.71l.82 2.2z"/><path d="M77.61 94.84l-.41-2.2h-3.41l.28 2.2z"/><path d="M33.76 94.84l.68-2.2h-3.26l-.81 2.2z"/><path d="M50.51 94.84l.27-2.2h-3.41l-.4 2.2z"/><path d="M39.35 94.84l.54-2.2h-3.32l-.67 2.2z"/><path d="M28.17 94.84l.81-2.2H25.8l-.95 2.2z"/><path d="M44.93 94.84l.41-2.2h-3.37l-.54 2.2z"/><path d="M56.08 94.84l.14-2.2h-3.44l-.27 2.2z"/><path d="M61.65 94.84v-2.2H58.2l-.14 2.2z"/><g><path d="M83.78 103.73H44.36l-.75 2.2h41.08z"/><path d="M102.15 105.93l-1.21-2.2h6.54l.95 2.2z"/><path d="M86.75 105.93l-.83-2.2h6.29l.96 2.2z"/><path d="M95.39 105.93l-.96-2.2h4.31l1.1 2.2z"/><path d="M25.67 105.93l1.21-2.2h-6.54l-.95 2.2z"/><path d="M41.07 105.93l.83-2.2h-6.29l-.96 2.2z"/><path d="M32.42 105.93l.97-2.2h-4.31l-1.11 2.2z"/></g><g><path d="M29.71 98.51l.82-2.19h-6.67l-.95 2.19z"/><path d="M97.95 98.51l-.81-2.19h6.66l.95 2.19z"/><path d="M96.25 98.51l-.96-2.19h-3.85l.82 2.19z"/><path d="M86.23 98.51l-.65-2.19h3.85l.78 2.19z"/><path d="M80.19 98.51l-.47-2.19h3.85l.6 2.19z"/><path d="M74.15 98.51l-.28-2.19h3.84l.43 2.19z"/><path d="M68.12 98.51l-.11-2.19h3.85l.24 2.19z"/><path d="M62.08 98.51l.07-2.19H66l.06 2.19z"/><path d="M56.04 98.51l.25-2.19h3.85l-.11 2.19z"/><path d="M50.01 98.51l.42-2.19h3.85l-.29 2.19z"/><path d="M43.97 98.51l.6-2.19h3.85l-.47 2.19z"/><path d="M37.93 98.51l.78-2.19h3.85l-.64 2.19z"/><path d="M31.9 98.51l.95-2.19h3.85l-.82 2.19z"/></g><g><path d="M29.7 102.22l.81-2.2h-8.75l-.95 2.2z"/><path d="M95.87 102.22l-.77-2.2h-4.17l.64 2.2z"/><path d="M84.93 102.22l-.48-2.2h4.16l.62 2.2z"/><path d="M78.28 102.22l-.32-2.2h4.17l.45 2.2z"/><path d="M71.64 102.22l-.17-2.2h4.17l.3 2.2z"/><path d="M65 102.22l-.01-2.2h4.16l.15 2.2z"/><path d="M58.36 102.22l.14-2.2h4.17l-.01 2.2z"/><path d="M51.71 102.22l.3-2.2h4.17l-.17 2.2z"/><path d="M45.07 102.22l.46-2.2h4.16l-.32 2.2z"/><path d="M38.43 102.22l.61-2.2h4.17l-.48 2.2z"/><path d="M31.78 102.22l.77-2.2h4.17l-.63 2.2z"/><path d="M97.47 102.22l-.82-2.2h8.75l.95 2.2z"/></g></g><path d="M124.73 117.88L110.39 92.4c-.71-1.07-1.98-1.84-3.25-1.84c0 0 1.22 1.1 1.59 1.63l12.59 23.59c.56 1.02-.18 2.26-1.34 2.26H7.96c-1.15 0-1.89-1.23-1.35-2.24l11.95-23.18c.35-.6 1.88-1.99 1.88-1.99h-.45c-1.27 0-2.54.77-3.25 1.99L3.28 117.88c-.59.88-.01 2.12.99 2.12h119.46c1.01 0 1.59-1.24 1-2.12z" fill="#b7d5e5"/><path fill="none" stroke="#eee" stroke-width="2.936" stroke-linecap="round" stroke-miterlimit="10" d="M25.97 28.02h13.21"/><path d="M109.37 30.11c0-1.04-1.01-1.12-1.01.11v55.8c0 1.34-1.09 2.43-2.43 2.43H22.08c-1.34 0-2.43-1.09-2.43-2.43v-55.8c0-1.23-1.01-1.15-1.01-.11l-.95 55.91c0 2.42 1.24 4.39 4.39 4.39h83.85c2.73 0 4.39-1.97 4.39-4.39l-.95-55.91z" fill="#75a7bc"/></svg>

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -41,7 +41,12 @@ SysInfo := Dialog {
title: "General";
GridBox {
Row {
Image {
rowspan: 6;
source: @image-url("laptop.svg");
}
Text {
col: 1;
text: "Operating System:";
max-width: min-width;
}
@ -49,6 +54,7 @@ SysInfo := Dialog {
}
Row {
Text {
col: 1;
text: "CPU Model:";
max-width: min-width;
}
@ -56,6 +62,7 @@ SysInfo := Dialog {
}
Row {
Text {
col: 1;
text: "CPU Vendor:";
max-width: min-width;
}
@ -63,6 +70,7 @@ SysInfo := Dialog {
}
Row {
Text {
col: 1;
text: "Number of logical cores:";
max-width: min-width;
}
@ -70,6 +78,7 @@ SysInfo := Dialog {
}
Row {
Text {
col: 1;
text: "Memory Size:";
max-width: min-width;
}
@ -79,6 +88,7 @@ SysInfo := Dialog {
}
Row {
Text{
col: 1;
text: "Uptime:";
max-width: min-width;
}