messagesoverlay - Shift some colors around

pull/3307/head
Martin Boonk 2024-03-29 18:09:26 +01:00
parent ab10887a18
commit 56330543ec
1 changed files with 11 additions and 5 deletions

View File

@ -101,11 +101,10 @@ let roundedRect = function(ovr, x,y,w,h,filled){
};
let drawScreen = function(ovr, title, titleFont, src, iconcolor, icon){
ovr.setColor(ovr.theme.fg);
ovr.setBgColor(ovr.theme.bg);
ovr.clearRect(2,2,ovr.getWidth()-3,37);
ovr.drawRect(2,38,ovr.getWidth()-2,39);
ovr.setColor(ovr.theme.fg2);
ovr.setFont(settings.fontSmall);
ovr.setFontAlign(0,-1);
@ -123,7 +122,7 @@ let drawScreen = function(ovr, title, titleFont, src, iconcolor, icon){
ovr.setFont(titleFont);
if (title) ovr.drawString(title, textCenter, 38/2 + 5);
ovr.setColor(ovr.theme.fg2);
ovr.setColor(ovr.theme.fg);
ovr.setFont(settings.fontMedium);
roundedRect(ovr, ovr.getWidth()-26,5,22,30,false);
@ -171,13 +170,15 @@ let showMessage = function(ovr, msg) {
let drawBorder = function(img) {
LOG("drawBorder", isQuiet());
ovr.setBgColor(ovr.theme.bg);
if (img) ovr=img;
if (Bangle.isLocked())
ovr.setColor(ovr.theme.fgH);
else
ovr.setColor(ovr.theme.fg);
else
ovr.setColor(ovr.theme.fgH);
ovr.drawRect(0,0,ovr.getWidth()-1,ovr.getHeight()-1);
ovr.drawRect(1,1,ovr.getWidth()-2,ovr.getHeight()-2);
ovr.drawRect(2,38,ovr.getWidth()-2,39);
show(ovr);
};
@ -294,6 +295,9 @@ let drawMessage = function(ovr, msg) {
return ovr.wrapString(str, maxWidth);
};
ovr.setColor(ovr.theme.fg);
ovr.setBgColor(ovr.theme.bg);
if (typeof msg.FirstLine === "undefined") msg.FirstLine = 0;
let padding = eventQueue.length > 1 ? (eventQueue.length > 3 ? 7 : 5) : 3;
@ -492,6 +496,8 @@ exports.message = function(type, event) {
});
}
ovr.reset();
if (bpp == 4)
ovr.theme = g.theme;
else