Remove message buttons, make font bigger

master
Tanner Collin 1 year ago
parent 0073735647
commit 98dd426e8a
  1. 8
      messagegui/messagegui.app.js

@ -285,14 +285,14 @@ function showMessage(msgid) {
if (body) { if (body) {
var w = g.getWidth()-10; var w = g.getWidth()-10;
if (g.setFont(bodyFont).stringWidth(body) > w * 2) { if (false && g.setFont(bodyFont).stringWidth(body) > w * 2) {
bodyFont = fontBig; bodyFont = fontBig;
if (settings.fontSize!=1 && g.setFont(bodyFont).stringWidth(body) > w * 3) if (settings.fontSize!=1 && g.setFont(bodyFont).stringWidth(body) > w * 3)
bodyFont = fontMedium; bodyFont = fontMedium;
} }
if (g.setFont(bodyFont).stringWidth(body) > w) { if (g.setFont(bodyFont).stringWidth(body) > w) {
lines = g.setFont(bodyFont).wrapString(msg.body, w); lines = g.setFont(bodyFont).wrapString(msg.body, w);
var maxLines = Math.floor((g.getHeight()-110) / g.getFontHeight()); var maxLines = Math.floor((g.getHeight()-75) / g.getFontHeight());
body = (lines.length>maxLines) ? lines.slice(0,maxLines).join("\n")+"..." : lines.join("\n"); body = (lines.length>maxLines) ? lines.slice(0,maxLines).join("\n")+"..." : lines.join("\n");
} }
} }
@ -304,7 +304,7 @@ function showMessage(msgid) {
} }
var buttons = [ var buttons = [
]; ];
if (msg.positive) { if (false && msg.positive) {
buttons.push({type:"btn", src:atob("GRSBAAAAAYAAAcAAAeAAAfAAAfAAAfAAAfAAAfAAAfBgAfA4AfAeAfAPgfAD4fAA+fAAP/AAD/AAA/AAAPAAADAAAA=="), cb:()=>{ buttons.push({type:"btn", src:atob("GRSBAAAAAYAAAcAAAeAAAfAAAfAAAfAAAfAAAfAAAfBgAfA4AfAeAfAPgfAD4fAA+fAAP/AAD/AAA/AAAPAAADAAAA=="), cb:()=>{
msg.new = false; msg.new = false;
cancelReloadTimeout(); // don't auto-reload to clock now cancelReloadTimeout(); // don't auto-reload to clock now
@ -312,7 +312,7 @@ function showMessage(msgid) {
checkMessages({clockIfNoMsg:1,clockIfAllRead:1,showMsgIfUnread:1,openMusic:openMusic}); checkMessages({clockIfNoMsg:1,clockIfAllRead:1,showMsgIfUnread:1,openMusic:openMusic});
}}); }});
} }
if (msg.negative) { if (false && msg.negative) {
if (buttons.length) buttons.push({width:32}); // nasty hack... if (buttons.length) buttons.push({width:32}); // nasty hack...
buttons.push({type:"btn", src:atob("FhaBADAAMeAB78AP/4B/fwP4/h/B/P4D//AH/4AP/AAf4AB/gAP/AB/+AP/8B/P4P4fx/A/v4B//AD94AHjAAMA="), cb:()=>{ buttons.push({type:"btn", src:atob("FhaBADAAMeAB78AP/4B/fwP4/h/B/P4D//AH/4AP/AAf4AB/gAP/AB/+AP/8B/P4P4fx/A/v4B//AD94AHjAAMA="), cb:()=>{
msg.new = false; msg.new = false;

Loading…
Cancel
Save