Public Access
Icons: small images of their own size for pages
Bitmaps that only pages use (backgrounds, images by state) are now icons: own width and height, stored in /icons, not in the page lists or the Home Assistant dropdowns. Page backgrounds and image elements use icons or bitmaps; the renderer gets icons expanded at the top left, so pages look the same. Web UI: Icons tab with an editor, Make icon / Make bitmap, Save as icon on the Draw tab, icons in the backup. A one-time migration in time-boxed steps moves the uploaded bitmaps that only pages use, after the new firmware is marked good. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1704cbf17b
commit
ab001e5d18
37 files changed
+955
-78
No files matched your search
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "display/bitmap_store.h"
|
||||
#include "display/font_store.h"
|
||||
#include "display/icon_store.h"
|
||||
#include "net/ha_api.h"
|
||||
|
||||
Stopwatch stopwatch;
|
||||
@@ -11,7 +12,13 @@ StoredPageResources pageResources(stopwatch);
|
||||
|
||||
bool StoredPageResources::background(const char *name, uint8_t *bitmap)
|
||||
{
|
||||
return loadBitmap(name, bitmap);
|
||||
if (loadBitmap(name, bitmap))
|
||||
return true;
|
||||
Icon icon;
|
||||
if (!loadIcon(name, icon))
|
||||
return false;
|
||||
iconToBitmap(icon, bitmap); // at the top left: images are drawn from their x, y
|
||||
return true;
|
||||
}
|
||||
|
||||
Font StoredPageResources::font(const char *name)
|
||||
|
||||
Reference in new issue
Block a user