Skip to content

Commit

Permalink
ch settings protection small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Oct 3, 2019
1 parent 050c722 commit 5c7bc66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
12 changes: 6 additions & 6 deletions modular-psu-firmware.eez-project
Original file line number Diff line number Diff line change
Expand Up @@ -8277,7 +8277,7 @@
{
"type": "Text",
"style": {
"inheritFrom": "edit_value_S_left",
"inheritFrom": "default_disabled_S_left",
"padding": 0
},
"activeStyle": {
Expand Down Expand Up @@ -9605,7 +9605,7 @@
"inheritFrom": "default"
},
"left": 13,
"top": 46,
"top": 45,
"width": 221,
"height": 2
},
Expand All @@ -9620,7 +9620,7 @@
"padding": 0
},
"left": 9,
"top": 48,
"top": 47,
"width": 50,
"height": 23,
"bitmap": "Vset"
Expand Down Expand Up @@ -14127,7 +14127,7 @@
"inheritFrom": "default",
"padding": 0
},
"action": "ch_settings_adv_remote_toggle_sense",
"action": "",
"left": 0,
"top": 0,
"width": 100,
Expand All @@ -14144,7 +14144,7 @@
"inheritFrom": "default",
"padding": 0
},
"action": "ch_settings_adv_remote_toggle_sense",
"action": "",
"left": 0,
"top": 0,
"width": 100,
Expand All @@ -14161,7 +14161,7 @@
"inheritFrom": "default",
"padding": 0
},
"action": "ch_settings_adv_remote_toggle_sense",
"action": "",
"left": 0,
"top": 0,
"width": 100,
Expand Down
17 changes: 0 additions & 17 deletions src/eez/gui/draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,23 +289,6 @@ void drawBitmap(void *bitmapPixels, int bpp, int bitmapWidth, int bitmapHeight,
if (y_offset < 0)
y_offset = y1;

uint16_t background_color = active
? (activeStyle ? activeStyle->background_color : style->color)
: style->background_color;
display::setColor(background_color);

// fill background
if (x1 <= x_offset - 1 && y1 <= y2)
display::fillRect(x1, y1, x_offset - 1, y2);
if (x_offset + width <= x2 && y1 <= y2)
display::fillRect(x_offset + width, y1, x2, y2);

int right = MIN(x_offset + width - 1, x2);

if (x_offset <= right && y1 <= y_offset - 1)
display::fillRect(x_offset, y1, right, y_offset - 1);
if (x_offset <= right && y_offset + height <= y2)
display::fillRect(x_offset, y_offset + height, right, y2);

// draw bitmap
uint8_t savedOpacity = display::getOpacity();
Expand Down

0 comments on commit 5c7bc66

Please sign in to comment.