Paint Roller icon for S.Painter & fix make_bitmap.py to generate Clang-compliant code (#1181)

* Generate Clang-compliant output file

* Paint roller icon for Screen Painter app

* Paint roller icon for Screen Painter app

* Paint roller icon for Spectrum Painter
This commit is contained in:
Mark Thompson 2023-06-23 09:57:35 -05:00 committed by GitHub
parent 0c75713820
commit e60c4dc34b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 11 deletions

View File

@ -5341,6 +5341,44 @@ static constexpr Bitmap bitmap_icon_new_dir{
{16, 16},
bitmap_icon_new_dir_data};
static constexpr uint8_t bitmap_icon_paint_data[] = {
0xFE,
0x3F,
0xFF,
0x3F,
0xFF,
0xFF,
0xFF,
0xBF,
0xFE,
0xBF,
0x00,
0x80,
0x80,
0xFF,
0x80,
0x00,
0x80,
0x00,
0xC0,
0x01,
0xC0,
0x01,
0xC0,
0x01,
0xC0,
0x01,
0xC0,
0x01,
0xC0,
0x01,
0xC0,
0x01,
};
static constexpr Bitmap bitmap_icon_paint{
{16, 16},
bitmap_icon_paint_data};
} /* namespace ui */
#endif /*__BITMAP_HPP__*/

View File

@ -570,7 +570,7 @@ TransmittersMenuView::TransmittersMenuView(NavigationView& nav) {
{"TEDI/LCR", ui::Color::yellow(), &bitmap_icon_lcr, [&nav]() { nav.push<LCRView>(); }},
{"TouchTune", ui::Color::yellow(), &bitmap_icon_remote, [&nav]() { nav.push<TouchTunesView>(); }},
{"Playlist", ui::Color::green(), &bitmap_icon_scanner, [&nav]() { nav.push<PlaylistView>(); }},
{"S.Painter", ui::Color::orange(), &bitmap_icon_morse, [&nav]() { nav.push<SpectrumPainterView>(); }},
{"S.Painter", ui::Color::orange(), &bitmap_icon_paint, [&nav]() { nav.push<SpectrumPainterView>(); }},
//{ "Remote", ui::Color::dark_grey(), &bitmap_icon_remote, [&nav](){ nav.push<RemoteView>(); } },
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

View File

@ -48,7 +48,6 @@ def convert_png(file):
name = path.basename(file).split(".")[0].lower();
f.write("static constexpr uint8_t bitmap_" + name + "_data[] = {\n")
f.write(' ') # Tab
for i in range(rgb_im.size[1]):
for j in range(rgb_im.size[0]):
@ -60,17 +59,12 @@ def convert_png(file):
data += 128
if j % 8 == 7:
f.write("0x%0.2X, " % data)
f.write(" 0x%0.2X,\n" % data)
data = 0
f.write("\n")
if i < rgb_im.size[1] - 1:
f.write(' ') # Tab
f.write("};\n")
f.write("static constexpr Bitmap bitmap_" + name + " {\n")
f.write(" { " + str(rgb_im.size[0]) + ", " + str(rgb_im.size[1]) + " }, bitmap_" + name+ "_data\n")
f.write("};\n\n")
f.write("static constexpr Bitmap bitmap_" + name + "{\n")
f.write(" {" + str(rgb_im.size[0]) + ", " + str(rgb_im.size[1]) + "},\n bitmap_" + name+ "_data};\n\n")
return
count = 0
@ -108,7 +102,6 @@ for file in listdir(sys.argv[1]):
convert_png(sys.argv[1] + file)
count += 1
f.write("\n")
f.write("} /* namespace ui */\n\n")
f.write("#endif/*__BITMAP_HPP__*/\n")