From 1e4486861a672f13f5accf405862f6df0654502d Mon Sep 17 00:00:00 2001 From: sir-indy <53864146+sir-indy@users.noreply.github.com> Date: Fri, 29 Apr 2022 10:26:44 +0100 Subject: [PATCH] Update Layout.js --- modules/Layout.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/Layout.js b/modules/Layout.js index 39aab9dc8..230d488be 100644 --- a/modules/Layout.js +++ b/modules/Layout.js @@ -233,8 +233,18 @@ Layout.prototype.render = function (l) { }, "btn":function(l){ var x = l.x+(0|l.pad), y = l.y+(0|l.pad), w = l.w-(l.pad<<1), h = l.h-(l.pad<<1); - var bg = l.selected?g.theme.bgH:g.theme.bg2; - g.setColor(bg).fillRect({x:x,y:y,x2:x+w,y2:y+h,r:4}).setColor(l.selected ? g.theme.fgH : g.theme.fg2).drawRect({x:x,y:y,x2:x+w,y2:y+h,r:4}); + var poly = [ + x,y+4, + x+4,y, + x+w-5,y, + x+w-1,y+4, + x+w-1,y+h-5, + x+w-5,y+h-1, + x+4,y+h-1, + x,y+h-5, + x,y+4 + ], bg = l.selected?g.theme.bgH:g.theme.bg2; + g.setColor(bg).fillPoly(poly).setColor(l.selected ? g.theme.fgH : g.theme.fg2).drawPoly(poly); if (l.col!==undefined) g.setColor(l.col); if (l.src) g.setBgColor(bg).drawImage( "function"==typeof l.src?l.src():l.src,