Updated desktop icons (#37)
This commit is contained in:
parent
5558edccce
commit
03aa8f62ba
BIN
data/assets/app_icon_display_settings.png
Normal file
BIN
data/assets/app_icon_display_settings.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 333 B |
BIN
data/assets/app_icon_fallback.png
Normal file
BIN
data/assets/app_icon_fallback.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 240 B |
BIN
data/assets/app_icon_files.png
Normal file
BIN
data/assets/app_icon_files.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 286 B |
BIN
data/assets/app_icon_settings.png
Normal file
BIN
data/assets/app_icon_settings.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 535 B |
BIN
data/assets/app_icon_system_info.png
Normal file
BIN
data/assets/app_icon_system_info.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 436 B |
213
data/assets_sources/Desktop Icons.svg
Normal file
213
data/assets_sources/Desktop Icons.svg
Normal file
@ -0,0 +1,213 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
viewBox="0 0 512 512"
|
||||||
|
version="1.1"
|
||||||
|
id="svg11"
|
||||||
|
sodipodi:docname="Desktop Icons.svg"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:export-filename="app_icon_display_settings.png"
|
||||||
|
inkscape:export-xdpi="3"
|
||||||
|
inkscape:export-ydpi="3"
|
||||||
|
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><style
|
||||||
|
id="style1"><![CDATA[
|
||||||
|
#keylines circle, #keylines rect {
|
||||||
|
vector-effect: non-scaling-stroke;
|
||||||
|
fill: none;
|
||||||
|
stroke: #0000FF;
|
||||||
|
}
|
||||||
|
#mask path, #mask rect, #mask circle, #hatching path {
|
||||||
|
vector-effect: non-scaling-stroke;
|
||||||
|
fill: none;
|
||||||
|
stroke: #FF0000;
|
||||||
|
}
|
||||||
|
#keylines, #mask {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
]]></style><inkscape:_templateinfo><inkscape:_name>Android O icon template</inkscape:_name><inkscape:author>Venceslas DUET</inkscape:author><inkscape:_shortdesc>A collection of keylines and guides used to make adaptive icons for android O</inkscape:_shortdesc><inkscape:date>2021-02-14</inkscape:date><inkscape:_keywords>Android Icon Adaptive Keylines</inkscape:_keywords></inkscape:_templateinfo><defs
|
||||||
|
id="defs1"><clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipHatching"><rect
|
||||||
|
width="8"
|
||||||
|
height="8"
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
id="rect1" /></clipPath><pattern
|
||||||
|
patternUnits="userSpaceOnUse"
|
||||||
|
width="8"
|
||||||
|
height="8"
|
||||||
|
id="hatching"><path
|
||||||
|
d="M 1,-1 -1,1 M 9,7 7,9 M 9,-1 -1,9"
|
||||||
|
clip-path="url(#clipHatching)"
|
||||||
|
id="path1" /></pattern><clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipHatching-2"><rect
|
||||||
|
width="8"
|
||||||
|
height="8"
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
id="rect1-7" /></clipPath><pattern
|
||||||
|
patternUnits="userSpaceOnUse"
|
||||||
|
width="8"
|
||||||
|
height="8"
|
||||||
|
id="hatching-0"><path
|
||||||
|
d="M 1,-1 -1,1 M 9,7 7,9 M 9,-1 -1,9"
|
||||||
|
clip-path="url(#clipHatching-2)"
|
||||||
|
id="path1-9" /></pattern><clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath17"><rect
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
x="0.0081919599"
|
||||||
|
y="0.01246433"
|
||||||
|
ry="128"
|
||||||
|
id="rect17"
|
||||||
|
style="display:inline" /></clipPath><filter
|
||||||
|
style="color-interpolation-filters:sRGB;"
|
||||||
|
inkscape:label="Drop Shadow"
|
||||||
|
id="filter41"
|
||||||
|
x="-0.04317569"
|
||||||
|
y="-0.040927102"
|
||||||
|
width="1.1013429"
|
||||||
|
height="1.096065"><feFlood
|
||||||
|
result="flood"
|
||||||
|
in="SourceGraphic"
|
||||||
|
flood-opacity="0.29915108267716534"
|
||||||
|
flood-color="rgb(0,0,0)"
|
||||||
|
id="feFlood40" /><feGaussianBlur
|
||||||
|
result="blur"
|
||||||
|
in="SourceGraphic"
|
||||||
|
stdDeviation="6"
|
||||||
|
id="feGaussianBlur40" /><feOffset
|
||||||
|
result="offset"
|
||||||
|
in="blur"
|
||||||
|
dx="5"
|
||||||
|
dy="5"
|
||||||
|
id="feOffset40" /><feComposite
|
||||||
|
result="comp1"
|
||||||
|
operator="in"
|
||||||
|
in="flood"
|
||||||
|
in2="offset"
|
||||||
|
id="feComposite40" /><feComposite
|
||||||
|
result="comp2"
|
||||||
|
operator="over"
|
||||||
|
in="SourceGraphic"
|
||||||
|
in2="comp1"
|
||||||
|
id="feComposite41" /></filter></defs><sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
inkscape:current-layer="layer4"
|
||||||
|
showgrid="true"
|
||||||
|
units="px"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:guide-bbox="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:cx="202.98973"
|
||||||
|
inkscape:cy="282.86804"
|
||||||
|
pagecolor="#505050"
|
||||||
|
bordercolor="#eeeeee"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:showpageshadow="0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:zoom="1.2143472"
|
||||||
|
inkscape:window-width="1503"
|
||||||
|
inkscape:window-height="933"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"><inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
empspacing="8"
|
||||||
|
id="grid1"
|
||||||
|
visible="true"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
spacingy="1"
|
||||||
|
spacingx="1"
|
||||||
|
units="px" /><sodipodi:guide
|
||||||
|
position="256,256"
|
||||||
|
orientation="0,1"
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide1" /><sodipodi:guide
|
||||||
|
position="256,200"
|
||||||
|
orientation="0,1"
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide2" /><sodipodi:guide
|
||||||
|
position="256,312"
|
||||||
|
orientation="0,1"
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide3" /><sodipodi:guide
|
||||||
|
position="256,256"
|
||||||
|
orientation="1,0"
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide4" /><sodipodi:guide
|
||||||
|
position="200,256"
|
||||||
|
orientation="1,0"
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide5" /><sodipodi:guide
|
||||||
|
position="312,256"
|
||||||
|
orientation="1,0"
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide6" /><sodipodi:guide
|
||||||
|
position="256,256"
|
||||||
|
orientation="1,1"
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide7" /><sodipodi:guide
|
||||||
|
position="256,256"
|
||||||
|
orientation="1,-1"
|
||||||
|
inkscape:locked="false"
|
||||||
|
id="guide8" /></sodipodi:namedview><rect
|
||||||
|
style="display:none;opacity:1;fill:#9e9e9e;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||||
|
id="Background"
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
x="0.02173974"
|
||||||
|
y="0.030385898"
|
||||||
|
clip-path="url(#clipPath17)" /><g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer4"
|
||||||
|
inkscape:label="Icons"><path
|
||||||
|
d="m 212.48429,510.5 h 84.3951 l 18.4617,-74.4906 c 12.30779,-4.1402 23.95604,-9.07563 34.9447,-14.80628 10.98912,-5.73277 21.31888,-13.00885 30.98932,-21.82812 l 72.527,21.16643 L 496,347.78125 441.93403,296.82377 c 1.75966,-11.88934 3.07831,-25.11001 3.95602,-39.66212 0.8777,-14.55209 -0.003,-27.56091 -2.63946,-39.02647 l 52.74749,-50.2704 -42.19787,-72.760837 -71.20854,19.843727 C 372.92125,106.1284 362.3718,98.631997 350.94345,92.458553 339.51504,86.284646 327.64696,80.99297 315.33917,76.583523 L 298.19662,2.5 H 212.4824 l -15.82412,74.083523 c -12.30736,4.409447 -24.17545,9.701123 -35.60426,15.87503 -11.42839,6.173444 -21.97781,13.669847 -31.64825,22.489117 L 58.197238,93.781248 16,167.86478 l 54.0653,50.2704 c -2.637344,12.34739 -3.956016,25.35618 -3.956016,39.02647 0,13.66984 1.318672,26.67847 3.956016,39.02583 L 16,347.78125 58.197238,421.86476 130.72486,399.375 c 9.67003,7.93749 19.9996,14.99297 30.9887,21.16643 10.98911,6.17392 22.63736,11.46556 34.94472,15.87501 z m 43.2372,-158.75 c -26.18744,0 -48.51191,-9.35395 -66.97336,-28.06191 -18.46149,-18.70839 -27.69222,-41.19798 -27.69222,-67.46879 0,-26.27119 9.32399,-48.66724 27.97199,-67.18805 18.64883,-18.52082 41.06634,-27.78125 67.25251,-27.78125 26.18701,0 48.51126,9.35395 66.97272,28.0619 18.4615,18.70836 27.69223,41.19795 27.69223,67.46876 0,26.27122 -9.32399,48.66722 -27.97198,67.18809 C 304.32494,342.48958 281.90766,351.75 255.72149,351.75 Z"
|
||||||
|
id="Settings"
|
||||||
|
style="display:none;fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.3208;stroke-opacity:1"
|
||||||
|
sodipodi:nodetypes="ccccccccsccccccccccccccscccccccscscscscs" /><path
|
||||||
|
d="M 51.047467,512 Q 28.952485,512 14.476063,497.52393 0,483.0475 0,460.95253 V 51.047462 Q 0,28.190328 14.476063,14.095334 28.952485,0 51.047467,0 H 460.95253 Q 483.80967,0 497.90466,14.095334 512,28.190328 512,51.047462 V 460.95253 q 0,22.09497 -14.09534,36.5714 Q 483.80967,512 460.95253,512 Z M 54.857141,127.99998 H 457.14285 V 54.857136 H 54.857141 Z M 457.14285,182.85714 H 54.857141 V 457.14285 H 457.14285 Z M 54.857141,127.99998 v 54.85716 z m 0,0 V 54.857136 Z m 0,54.85716 v 274.28571 z"
|
||||||
|
id="Fallback"
|
||||||
|
style="display:none;fill:#333333;fill-opacity:1;stroke-width:0.761904" /><g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer5"
|
||||||
|
inkscape:label="System Info"
|
||||||
|
style="display:none"><path
|
||||||
|
d="m 207.3461,368.61149 c 4.24475,0 8.2964,-1.10767 12.15495,-3.323 3.85898,-2.21507 6.79308,-5.34536 8.80231,-9.39085 l 74.74094,-136.81458 26.5827,49.17833 c 1.7715,4.4304 4.54058,7.64247 8.30725,9.63617 3.76584,1.9937 8.08555,2.99055 12.95914,2.99055 H 510.3904 V 233.03904 H 365.51384 L 324.31067,157.9424 c -2.21531,-4.43039 -5.25245,-7.64244 -9.11143,-9.63616 -3.85853,-1.99263 -7.91018,-2.98895 -12.15494,-2.98895 -4.24475,0 -8.2964,0.99632 -12.15496,2.98895 -3.85897,1.99266 -6.8961,5.20471 -9.11139,9.63616 L 207.3461,294.84409 180.49221,245.81347 c -2.03515,-4.0859 -4.9819,-7.23639 -8.84026,-9.45148 -3.85856,-2.2153 -7.9102,-3.32295 -12.15494,-3.32295 H 0 v 47.84907 h 144.87656 l 41.5177,75.09183 c 2.00541,3.99063 4.93771,7.09348 8.7969,9.30855 3.85853,2.21533 7.91018,3.323 12.15494,3.323 z"
|
||||||
|
style="fill:#0d00be;fill-opacity:1;stroke-width:0.664569"
|
||||||
|
id="path1-8" /><path
|
||||||
|
d="m 0.48281402,192.83596 v -79.74848 c 0,-14.177585 4.99842408,-25.696778 14.99527098,-34.557575 C 25.47472,69.668868 37.492176,65.238358 51.530467,65.238358 H 459.91073 c 14.03785,0 26.04106,4.43051 36.00962,13.291547 9.96858,8.860797 14.95286,20.37999 14.95286,34.557575 v 79.74848 H 463.02408 V 113.08748 H 48.331914 v 79.74848 z M 51.445288,448.03116 c -14.037857,0 -26.041069,-4.43051 -36.009631,-13.29154 -9.9685626,-8.8608 -14.95284298,-20.38 -14.95284298,-34.55758 V 320.43356 H 48.331914 v 79.74848 H 463.02408 v -79.74848 h 47.84913 v 79.74848 c 0,14.17758 -4.99842,25.69678 -14.99528,34.55758 -9.99707,8.86103 -22.01453,13.29154 -36.0524,13.29154 z"
|
||||||
|
id="System_Info"
|
||||||
|
style="display:inline;fill:#333333;fill-opacity:1;stroke-width:0.664569"
|
||||||
|
sodipodi:nodetypes="cscsscsccccccscsccccccssss" /></g><path
|
||||||
|
d="m 128.42457,319.70188 h 31.96224 V 223.81515 H 128.42457 V 255.7774 H 96.462329 v 31.96225 h 31.962241 z m 63.92449,-31.96223 H 416.08475 V 255.7774 H 192.34906 Z m 159.81121,-63.9245 h 31.96224 v -31.96223 h 31.96224 V 159.89067 H 384.12251 V 127.92843 H 352.16027 Z M 96.462329,191.85292 H 320.19802 V 159.89067 H 96.462329 Z m 63.924481,287.66019 v -63.9245 H 48.518961 q -19.776638,0 -33.860161,-14.09119 Q 0.575596,387.40591 0.575596,367.61871 V 79.796797 q 0,-19.788137 14.083204,-33.77162 Q 28.742323,32.041695 48.518961,32.041695 H 464.02812 q 19.77663,0 33.85984,14.091514 14.08352,14.091196 14.08352,33.878376 V 367.83383 q 0,19.78783 -14.08352,33.7713 -14.08321,13.98348 -33.85984,13.98348 H 352.16027 v 63.9245 z M 48.518961,367.64525 H 464.02812 V 79.98506 H 48.518961 Z m 0,0 V 79.98506 Z"
|
||||||
|
id="Display_Settings"
|
||||||
|
style="stroke-width:0.665879;fill:#333333;fill-opacity:1" /><path
|
||||||
|
d="m 47.867683,447.55649 q -19.326766,0 -33.654939,-14.32849 Q -0.1157482,418.89983 -0.1157482,399.57306 V 111.67248 q 0,-19.793166 14.3284922,-33.888136 Q 28.540917,63.689052 47.867683,63.689052 H 191.81797 l 63.97791,63.977908 h 207.9282 q 19.79316,0 33.88814,14.09529 14.09529,14.09497 14.09529,33.88814 v 223.92267 q 0,19.32677 -14.09529,33.65494 -14.09498,14.32849 -33.88814,14.32849 z m 0,-47.98343 H 463.72408 V 175.65039 h -227.9213 l -63.9779,-63.97791 H 47.867683 Z m 0,0 V 111.67248 Z"
|
||||||
|
id="Files"
|
||||||
|
style="stroke-width:0.666435;fill:#333333;fill-opacity:1" /></g><style
|
||||||
|
id="style1-9"><![CDATA[
|
||||||
|
#keylines circle, #keylines rect {
|
||||||
|
vector-effect: non-scaling-stroke;
|
||||||
|
fill: none;
|
||||||
|
stroke: #0000FF;
|
||||||
|
}
|
||||||
|
#mask path, #mask rect, #mask circle, #hatching path {
|
||||||
|
vector-effect: non-scaling-stroke;
|
||||||
|
fill: none;
|
||||||
|
stroke: #FF0000;
|
||||||
|
}
|
||||||
|
#keylines, #mask {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
]]></style></svg>
|
||||||
|
After Width: | Height: | Size: 11 KiB |
@ -5,9 +5,7 @@
|
|||||||
- Show a warning screen if firmware encryption or secure boot are off when saving WiFi credentials.
|
- Show a warning screen if firmware encryption or secure boot are off when saving WiFi credentials.
|
||||||
- Show a warning screen when a user plugs in the SD card on a device that only supports mounting at boot.
|
- Show a warning screen when a user plugs in the SD card on a device that only supports mounting at boot.
|
||||||
- Try out Waveshare S3 120MHz mode for PSRAM (see "enabling 120M PSRAM is necessary" in [docs](https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-4.3#Other_Notes))
|
- Try out Waveshare S3 120MHz mode for PSRAM (see "enabling 120M PSRAM is necessary" in [docs](https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-4.3#Other_Notes))
|
||||||
- Fix for dark theme: the wifi icons should use the colour of the theme (they remain black when dark theme is set)
|
- T-Deck has random sdcard SPI crashes due to sharing bus with screen SPI: make it use the LVGL lock for sdcard operations?
|
||||||
- Update Wi-Fi status bar icon based on signal strength
|
|
||||||
- Auto-detect sdcard removal (with a service?)
|
|
||||||
|
|
||||||
# Core Ideas
|
# Core Ideas
|
||||||
- Make a HAL? It would mainly be there to support PC development. It's a lot of effort for supporting what's effectively a dev-only feature.
|
- Make a HAL? It would mainly be there to support PC development. It's a lot of effort for supporting what's effectively a dev-only feature.
|
||||||
|
|||||||
@ -114,7 +114,7 @@ static void app_stop(App app) {
|
|||||||
AppManifest wifi_connect_app = {
|
AppManifest wifi_connect_app = {
|
||||||
.id = "wifi_connect",
|
.id = "wifi_connect",
|
||||||
.name = "Wi-Fi Connect",
|
.name = "Wi-Fi Connect",
|
||||||
.icon = NULL,
|
.icon = LV_SYMBOL_WIFI,
|
||||||
.type = AppTypeSettings,
|
.type = AppTypeSettings,
|
||||||
.on_start = &app_start,
|
.on_start = &app_start,
|
||||||
.on_stop = &app_stop,
|
.on_stop = &app_stop,
|
||||||
|
|||||||
@ -157,7 +157,7 @@ static void app_stop(App app) {
|
|||||||
AppManifest wifi_manage_app = {
|
AppManifest wifi_manage_app = {
|
||||||
.id = "wifi_manage",
|
.id = "wifi_manage",
|
||||||
.name = "Wi-Fi",
|
.name = "Wi-Fi",
|
||||||
.icon = NULL,
|
.icon = LV_SYMBOL_WIFI,
|
||||||
.type = AppTypeSettings,
|
.type = AppTypeSettings,
|
||||||
.on_start = &app_start,
|
.on_start = &app_start,
|
||||||
.on_stop = &app_stop,
|
.on_stop = &app_stop,
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
#include "app_manifest_registry.h"
|
#include "app_manifest_registry.h"
|
||||||
|
#include "assets.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "lvgl.h"
|
#include "lvgl.h"
|
||||||
#include "services/loader/loader.h"
|
#include "services/loader/loader.h"
|
||||||
@ -14,7 +15,7 @@ static void on_app_pressed(lv_event_t* e) {
|
|||||||
static void create_app_widget(const AppManifest* manifest, void* parent) {
|
static void create_app_widget(const AppManifest* manifest, void* parent) {
|
||||||
tt_check(parent);
|
tt_check(parent);
|
||||||
lv_obj_t* list = (lv_obj_t*)parent;
|
lv_obj_t* list = (lv_obj_t*)parent;
|
||||||
const char* icon = manifest->icon ?: LV_SYMBOL_FILE;
|
const char* icon = manifest->icon ?: TT_ASSETS_APP_ICON_FALLBACK;
|
||||||
lv_obj_t* btn = lv_list_add_btn(list, icon, manifest->name);
|
lv_obj_t* btn = lv_list_add_btn(list, icon, manifest->name);
|
||||||
lv_obj_add_event_cb(btn, &on_app_pressed, LV_EVENT_CLICKED, (void*)manifest);
|
lv_obj_add_event_cb(btn, &on_app_pressed, LV_EVENT_CLICKED, (void*)manifest);
|
||||||
}
|
}
|
||||||
@ -24,10 +25,10 @@ static void desktop_show(TT_UNUSED App app, TT_UNUSED lv_obj_t* parent) {
|
|||||||
lv_obj_set_size(list, LV_PCT(100), LV_PCT(100));
|
lv_obj_set_size(list, LV_PCT(100), LV_PCT(100));
|
||||||
lv_obj_center(list);
|
lv_obj_center(list);
|
||||||
|
|
||||||
lv_list_add_text(list, "System");
|
|
||||||
tt_app_manifest_registry_for_each_of_type(AppTypeSystem, list, create_app_widget);
|
|
||||||
lv_list_add_text(list, "User");
|
lv_list_add_text(list, "User");
|
||||||
tt_app_manifest_registry_for_each_of_type(AppTypeUser, list, create_app_widget);
|
tt_app_manifest_registry_for_each_of_type(AppTypeUser, list, create_app_widget);
|
||||||
|
lv_list_add_text(list, "System");
|
||||||
|
tt_app_manifest_registry_for_each_of_type(AppTypeSystem, list, create_app_widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
const AppManifest desktop_app = {
|
const AppManifest desktop_app = {
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
#include "app.h"
|
#include "app.h"
|
||||||
|
#include "assets.h"
|
||||||
#include "lvgl.h"
|
#include "lvgl.h"
|
||||||
#include "preferences.h"
|
#include "preferences.h"
|
||||||
#include "tactility.h"
|
#include "tactility.h"
|
||||||
@ -64,7 +65,7 @@ static void app_hide(App app) {
|
|||||||
const AppManifest display_app = {
|
const AppManifest display_app = {
|
||||||
.id = "display",
|
.id = "display",
|
||||||
.name = "Display",
|
.name = "Display",
|
||||||
.icon = NULL,
|
.icon = TT_ASSETS_APP_ICON_DISPLAY_SETTINGS,
|
||||||
.type = AppTypeSettings,
|
.type = AppTypeSettings,
|
||||||
.on_start = NULL,
|
.on_start = NULL,
|
||||||
.on_stop = NULL,
|
.on_stop = NULL,
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
#include "app_manifest_registry.h"
|
#include "app_manifest_registry.h"
|
||||||
|
#include "assets.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "lvgl.h"
|
#include "lvgl.h"
|
||||||
#include "services/loader/loader.h"
|
#include "services/loader/loader.h"
|
||||||
@ -15,7 +16,8 @@ static void on_app_pressed(lv_event_t* e) {
|
|||||||
static void create_app_widget(const AppManifest* manifest, void* parent) {
|
static void create_app_widget(const AppManifest* manifest, void* parent) {
|
||||||
tt_check(parent);
|
tt_check(parent);
|
||||||
lv_obj_t* list = (lv_obj_t*)parent;
|
lv_obj_t* list = (lv_obj_t*)parent;
|
||||||
lv_obj_t* btn = lv_list_add_btn(list, LV_SYMBOL_FILE, manifest->name);
|
const char* icon = manifest->icon ?: TT_ASSETS_APP_ICON_FALLBACK;
|
||||||
|
lv_obj_t* btn = lv_list_add_btn(list, icon, manifest->name);
|
||||||
lv_obj_add_event_cb(btn, &on_app_pressed, LV_EVENT_CLICKED, (void*)manifest);
|
lv_obj_add_event_cb(btn, &on_app_pressed, LV_EVENT_CLICKED, (void*)manifest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,7 +36,7 @@ static void on_show(TT_UNUSED App app, lv_obj_t* parent) {
|
|||||||
const AppManifest settings_app = {
|
const AppManifest settings_app = {
|
||||||
.id = "settings",
|
.id = "settings",
|
||||||
.name = "Settings",
|
.name = "Settings",
|
||||||
.icon = LV_SYMBOL_SETTINGS,
|
.icon = TT_ASSETS_APP_ICON_SETTINGS,
|
||||||
.type = AppTypeSystem,
|
.type = AppTypeSystem,
|
||||||
.on_start = NULL,
|
.on_start = NULL,
|
||||||
.on_stop = NULL,
|
.on_stop = NULL,
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
#include "files_data.h"
|
#include "files_data.h"
|
||||||
|
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
|
#include "assets.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "file_utils.h"
|
#include "file_utils.h"
|
||||||
#include "lvgl.h"
|
#include "lvgl.h"
|
||||||
#include "services/loader/loader.h"
|
#include "services/loader/loader.h"
|
||||||
|
#include "string_utils.h"
|
||||||
#include "ui/toolbar.h"
|
#include "ui/toolbar.h"
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <string_utils.h>
|
|
||||||
|
|
||||||
#define TAG "files_app"
|
#define TAG "files_app"
|
||||||
|
|
||||||
@ -99,7 +100,7 @@ static void create_file_widget(FilesData* files_data, lv_obj_t* parent, struct d
|
|||||||
} else if (dir_entry->d_type == TT_DT_LNK) {
|
} else if (dir_entry->d_type == TT_DT_LNK) {
|
||||||
symbol = LV_SYMBOL_LOOP;
|
symbol = LV_SYMBOL_LOOP;
|
||||||
} else {
|
} else {
|
||||||
symbol = LV_SYMBOL_SETTINGS;
|
symbol = LV_SYMBOL_FILE;
|
||||||
}
|
}
|
||||||
lv_obj_t* button = lv_list_add_btn(list, symbol, dir_entry->d_name);
|
lv_obj_t* button = lv_list_add_btn(list, symbol, dir_entry->d_name);
|
||||||
lv_obj_set_user_data(button, files_data);
|
lv_obj_set_user_data(button, files_data);
|
||||||
@ -149,7 +150,7 @@ static void on_stop(App app) {
|
|||||||
const AppManifest files_app = {
|
const AppManifest files_app = {
|
||||||
.id = "files",
|
.id = "files",
|
||||||
.name = "Files",
|
.name = "Files",
|
||||||
.icon = NULL,
|
.icon = TT_ASSETS_APP_ICON_FILES,
|
||||||
.type = AppTypeSystem,
|
.type = AppTypeSystem,
|
||||||
.on_start = &on_start,
|
.on_start = &on_start,
|
||||||
.on_stop = &on_stop,
|
.on_stop = &on_stop,
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
#include "app.h"
|
#include "app.h"
|
||||||
|
#include "assets.h"
|
||||||
#include "lvgl.h"
|
#include "lvgl.h"
|
||||||
#include "ui/toolbar.h"
|
#include "ui/toolbar.h"
|
||||||
|
|
||||||
@ -47,7 +48,7 @@ static void app_show(App app, lv_obj_t* parent) {
|
|||||||
AppManifest system_info_app = {
|
AppManifest system_info_app = {
|
||||||
.id = "systeminfo",
|
.id = "systeminfo",
|
||||||
.name = "System Info",
|
.name = "System Info",
|
||||||
.icon = NULL,
|
.icon = TT_ASSETS_APP_ICON_SYSTEM_INFO,
|
||||||
.type = AppTypeSystem,
|
.type = AppTypeSystem,
|
||||||
.on_start = NULL,
|
.on_start = NULL,
|
||||||
.on_stop = NULL,
|
.on_stop = NULL,
|
||||||
|
|||||||
@ -3,9 +3,18 @@
|
|||||||
#define TT_ASSET_FOLDER "A:/assets/"
|
#define TT_ASSET_FOLDER "A:/assets/"
|
||||||
#define TT_ASSET(file) TT_ASSET_FOLDER file
|
#define TT_ASSET(file) TT_ASSET_FOLDER file
|
||||||
|
|
||||||
|
// App icons
|
||||||
|
#define TT_ASSETS_APP_ICON_FALLBACK TT_ASSET("app_icon_fallback.png")
|
||||||
|
#define TT_ASSETS_APP_ICON_FILES TT_ASSET("app_icon_files.png")
|
||||||
|
#define TT_ASSETS_APP_ICON_DISPLAY_SETTINGS TT_ASSET("app_icon_display_settings.png")
|
||||||
|
#define TT_ASSETS_APP_ICON_SETTINGS TT_ASSET("app_icon_settings.png")
|
||||||
|
#define TT_ASSETS_APP_ICON_SYSTEM_INFO TT_ASSET("app_icon_system_info.png")
|
||||||
|
|
||||||
|
// SD card status
|
||||||
#define TT_ASSETS_ICON_SDCARD TT_ASSET("sdcard.png")
|
#define TT_ASSETS_ICON_SDCARD TT_ASSET("sdcard.png")
|
||||||
#define TT_ASSETS_ICON_SDCARD_ALERT TT_ASSET("sdcard_alert.png")
|
#define TT_ASSETS_ICON_SDCARD_ALERT TT_ASSET("sdcard_alert.png")
|
||||||
|
|
||||||
|
// Wifi status
|
||||||
#define TT_ASSETS_ICON_WIFI_CONNECTION_ISSUE TT_ASSET("wifi_connection_issue.png")
|
#define TT_ASSETS_ICON_WIFI_CONNECTION_ISSUE TT_ASSET("wifi_connection_issue.png")
|
||||||
#define TT_ASSETS_ICON_WIFI_FIND TT_ASSET("wifi_find.png")
|
#define TT_ASSETS_ICON_WIFI_FIND TT_ASSET("wifi_find.png")
|
||||||
#define TT_ASSETS_ICON_WIFI_OFF TT_ASSET("wifi_off.png")
|
#define TT_ASSETS_ICON_WIFI_OFF TT_ASSET("wifi_off.png")
|
||||||
|
|||||||
@ -116,7 +116,6 @@ lv_obj_t* tt_statusbar_create(lv_obj_t* parent) {
|
|||||||
lv_obj_set_width(obj, LV_PCT(100));
|
lv_obj_set_width(obj, LV_PCT(100));
|
||||||
lv_obj_set_height(obj, STATUSBAR_HEIGHT);
|
lv_obj_set_height(obj, STATUSBAR_HEIGHT);
|
||||||
tt_lv_obj_set_style_no_padding(obj);
|
tt_lv_obj_set_style_no_padding(obj);
|
||||||
tt_lv_obj_set_style_bg_blacken(obj);
|
|
||||||
lv_obj_center(obj);
|
lv_obj_center(obj);
|
||||||
lv_obj_set_flex_flow(obj, LV_FLEX_FLOW_ROW);
|
lv_obj_set_flex_flow(obj, LV_FLEX_FLOW_ROW);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user