|
|
|
@ -56,7 +56,20 @@
|
|
|
|
|
return "calc(var(--css-scale) * " + pix + "px)"; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
BI.toPix = BI.pixFormat; |
|
|
|
|
var oldPix = BI.toPix; |
|
|
|
|
BI.toPix = function (pix, border) { |
|
|
|
|
var context = BI.useContext("cssScale"); |
|
|
|
|
if (!context) { |
|
|
|
|
return oldPix.apply(this, arguments); |
|
|
|
|
} |
|
|
|
|
if (!BI.isNumber(pix)) { |
|
|
|
|
return pix; |
|
|
|
|
} |
|
|
|
|
if (border > 0) { |
|
|
|
|
return "calc(var(--css-scale) * " + pix + "px" + " - " + border + "px"+")"; |
|
|
|
|
} |
|
|
|
|
return "calc(var(--css-scale) * " + pix + "px)"; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var Child = BI.inherit(BI.Widget, { |
|
|
|
|
render: function () { |
|
|
|
|