diff --git a/radio/src/bitmaps/Horus/background.png b/radio/src/bitmaps/Horus/background.png new file mode 100644 index 000000000..02fa6695d Binary files /dev/null and b/radio/src/bitmaps/Horus/background.png differ diff --git a/radio/src/bitmaps/Horus/mask_htrim_frame.png b/radio/src/bitmaps/Horus/mask_htrim_frame.png new file mode 100644 index 000000000..964827b53 Binary files /dev/null and b/radio/src/bitmaps/Horus/mask_htrim_frame.png differ diff --git a/radio/src/bitmaps/Horus/mask_vtrim_frame.png b/radio/src/bitmaps/Horus/mask_vtrim_frame.png new file mode 100644 index 000000000..bf0f329f0 Binary files /dev/null and b/radio/src/bitmaps/Horus/mask_vtrim_frame.png differ diff --git a/radio/src/gui/Horus/lcd.cpp b/radio/src/gui/Horus/lcd.cpp index 15ec8d1a3..fdef225f1 100644 --- a/radio/src/gui/Horus/lcd.cpp +++ b/radio/src/gui/Horus/lcd.cpp @@ -820,7 +820,10 @@ void lcdDrawTransparentPixel(display_t * p, uint8_t opacity, uint16_t color) { ASSERT_IN_DISPLAY(p); - if (opacity != OPACITY_MAX) { + if (opacity == OPACITY_MAX) { + lcdDrawPixel(p, color); + } + else if (opacity != 0) { uint8_t bgWeight = OPACITY_MAX - opacity; COLOR_SPLIT(color, red, green, blue); COLOR_SPLIT(*p, bgRed, bgGreen, bgBlue); @@ -829,9 +832,6 @@ void lcdDrawTransparentPixel(display_t * p, uint8_t opacity, uint16_t color) uint16_t b = (bgBlue * bgWeight + blue * opacity) / OPACITY_MAX; lcdDrawPixel(p, COLOR_JOIN(r, g, b)); } - else if (opacity != 0) { - lcdDrawPixel(p, color); - } } void lcdDrawPoint(coord_t x, coord_t y, LcdFlags att) @@ -850,11 +850,11 @@ void lcd_hlineStip(coord_t x, coord_t y, coord_t w, uint8_t pat, LcdFlags att) display_t * p = PIXEL_PTR(x, y); display_t color = lcdColorTable[COLOR_IDX(att)]; + uint8_t opacity = 0x0F - (att >> 24); while (w--) { - if (pat&1) { - *p = color; - // lcd_mask(p, mask, 0); + if (pat & 1) { + lcdDrawTransparentPixel(p, opacity, color); pat = (pat >> 1) | 0x80; } else { diff --git a/radio/src/gui/Horus/view_main.cpp b/radio/src/gui/Horus/view_main.cpp index 734f2079a..3b147eefe 100644 --- a/radio/src/gui/Horus/view_main.cpp +++ b/radio/src/gui/Horus/view_main.cpp @@ -331,6 +331,10 @@ void onMainViewMenu(const char *result) void displayTelemetryScreen(int index, unsigned int evt); +const uint16_t LBM_MAINVIEW_BACKGROUND[] = { +#include "../../bitmaps/Horus/background.lbm" +}; + const uint16_t LBM_MAINVIEW_FLAT[] = { #include "../../bitmaps/Horus/mainview_flat.lbm" }; @@ -393,6 +397,7 @@ void menuMainView(evt_t event) break; } + lcdDrawBitmap(0, 0, LBM_MAINVIEW_BACKGROUND); // lcdDrawBitmap(0, 0, LBM_MAINVIEW_FLAT); // Header @@ -411,13 +416,12 @@ void menuMainView(evt_t event) // Trims displayTrims(mode); - // Model bitmap - lcdDrawBitmap(256, 104, LBM_CORSAIR); - - // Model name - lcdDrawBitmapPattern(256, 62, LBM_MODEL_ICON, MENU_TITLE_COLOR); + // Model panel + lcdDrawFilledRectWithAttributes(248, 58, 188, 158, SOLID, TEXT_BGCOLOR | (5<<24)); + lcdDrawBitmapPattern(256, 62, LBM_MODEL_ICON, TITLE_BGCOLOR); lcd_putsAtt(293, 68, "MyPlane Name", SMLSIZE); lcdDrawHorizontalLine(287, 85, 140, TITLE_BGCOLOR); + lcdDrawBitmap(256, 104, LBM_CORSAIR); #if 0