From c6f34c59b4c91247a869d1c6a394218000fb5e86 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Fri, 29 Jan 2021 13:26:08 +0800 Subject: [PATCH] Update to logo by @thepoweroftwo --- .gitmodules | 3 ++ bin/gen-images.sh | 19 +++++++++++ {images => deprecated}/icon-18dp.png | Bin {images => deprecated}/icon-24px.svg | 0 {images => deprecated}/icon.png | Bin design | 1 + images/genfiles.sh | 11 ------ src/graphics/img/icon.xbm | 49 ++++++++++----------------- 8 files changed, 41 insertions(+), 42 deletions(-) create mode 100755 bin/gen-images.sh rename {images => deprecated}/icon-18dp.png (100%) rename {images => deprecated}/icon-24px.svg (100%) rename {images => deprecated}/icon.png (100%) create mode 160000 design delete mode 100755 images/genfiles.sh diff --git a/.gitmodules b/.gitmodules index 785c573a4..4f9bb6b77 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "sdk-nrfxlib"] path = sdk-nrfxlib url = https://github.com/nrfconnect/sdk-nrfxlib.git +[submodule "design"] + path = design + url = https://github.com/meshtastic/meshtastic-design.git diff --git a/bin/gen-images.sh b/bin/gen-images.sh new file mode 100755 index 000000000..c4335718e --- /dev/null +++ b/bin/gen-images.sh @@ -0,0 +1,19 @@ + + +set -e + +# regen the design bins first +cd design +bin/generate-pngs.sh +cd .. + +# assumes 50 wide, 28 high +convert design/logo/png/Mesh_Logo_Black_Small.png -background white -alpha Background src/graphics/img/icon.xbm + +inkscape --batch-process -o images/compass.png -w 48 -h 48 images/location_searching-24px.svg +convert compass.png -background white -alpha Background src/graphics/img/compass.xbm + +inkscape --batch-process -o images/face.png -w 13 -h 13 images/face-24px.svg + +inkscape --batch-process -o images/pin.png -w 13 -h 13 images/room-24px.svg +convert pin.png -background white -alpha Background src/graphics/img/pin.xbm diff --git a/images/icon-18dp.png b/deprecated/icon-18dp.png similarity index 100% rename from images/icon-18dp.png rename to deprecated/icon-18dp.png diff --git a/images/icon-24px.svg b/deprecated/icon-24px.svg similarity index 100% rename from images/icon-24px.svg rename to deprecated/icon-24px.svg diff --git a/images/icon.png b/deprecated/icon.png similarity index 100% rename from images/icon.png rename to deprecated/icon.png diff --git a/design b/design new file mode 160000 index 000000000..73ba05cee --- /dev/null +++ b/design @@ -0,0 +1 @@ +Subproject commit 73ba05ceef8beff81eb546a0b9e8ecad03a1216d diff --git a/images/genfiles.sh b/images/genfiles.sh deleted file mode 100755 index bc14f6e8e..000000000 --- a/images/genfiles.sh +++ /dev/null @@ -1,11 +0,0 @@ -# using height of 50 to have 14 pixels beneath icon for text -inkscape -z -e icon.png -w 50 -h 50 icon-24px.svg -convert icon.png -background white -alpha Background ../src/icon.xbm - -inkscape -z -e compass.png -w 48 -h 48 location_searching-24px.svg -convert compass.png -background white -alpha Background ../src/compass.xbm - -inkscape -z -e face.png -w 13 -h 13 face-24px.svg - -inkscape -z -e pin.png -w 13 -h 13 room-24px.svg -convert pin.png -background white -alpha Background ../src/pin.xbm diff --git a/src/graphics/img/icon.xbm b/src/graphics/img/icon.xbm index d7394c8e7..2b698e4c9 100644 --- a/src/graphics/img/icon.xbm +++ b/src/graphics/img/icon.xbm @@ -1,33 +1,20 @@ #define icon_width 50 -#define icon_height 50 +#define icon_height 28 static char icon_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, - 0xFF, 0x07, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, - 0xF0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0x00, - 0x00, 0x00, 0xFE, 0x0F, 0xC0, 0xFF, 0x01, 0x00, 0x00, 0xFF, 0x03, 0x00, - 0xFF, 0x03, 0x00, 0x80, 0xFF, 0x00, 0x00, 0xFC, 0x07, 0x00, 0xC0, 0x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00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, - 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFC, 0x03, 0x00, - 0x00, 0x00, 0x80, 0x7F, 0xF8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF0, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x0C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, }; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x80, 0x07, 0xC0, 0x07, 0x00, 0x00, 0x00, 0xC0, 0x1F, + 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0xE0, 0x0F, 0x00, 0x00, 0x00, + 0xE0, 0x0F, 0xF0, 0x1F, 0x00, 0x00, 0x00, 0xF0, 0x07, 0xF0, 0x3F, 0x00, + 0x00, 0x00, 0xF8, 0x03, 0xF8, 0x7F, 0x00, 0x00, 0x00, 0xF8, 0x03, 0xFC, + 0x7F, 0x00, 0x00, 0x00, 0xFC, 0x01, 0xFC, 0xFE, 0x00, 0x00, 0x00, 0xFE, + 0x00, 0xFE, 0xFC, 0x01, 0x00, 0x00, 0xFE, 0x00, 0x7F, 0xFC, 0x01, 0x00, + 0x00, 0x7F, 0x00, 0x3F, 0xF8, 0x03, 0x00, 0x80, 0x3F, 0x80, 0x3F, 0xF0, + 0x07, 0x00, 0x80, 0x3F, 0xC0, 0x1F, 0xF0, 0x07, 0x00, 0xC0, 0x1F, 0xC0, + 0x0F, 0xE0, 0x0F, 0x00, 0xE0, 0x0F, 0xE0, 0x0F, 0xC0, 0x1F, 0x00, 0xE0, + 0x0F, 0xF0, 0x07, 0x80, 0x1F, 0x00, 0xF0, 0x07, 0xF8, 0x03, 0x80, 0x3F, + 0x00, 0xF8, 0x03, 0xF8, 0x03, 0x00, 0x7F, 0x00, 0xFC, 0x03, 0xFC, 0x01, + 0x00, 0x7E, 0x00, 0xFC, 0x01, 0xFE, 0x00, 0x00, 0xFE, 0x00, 0xFE, 0x00, + 0xFE, 0x00, 0x00, 0xFC, 0x01, 0x7E, 0x00, 0x7F, 0x00, 0x00, 0xF8, 0x01, + 0x7E, 0x00, 0x3E, 0x00, 0x00, 0xF8, 0x01, 0x38, 0x00, 0x3C, 0x00, 0x00, + 0x70, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, };