mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-16 11:28:40 +00:00
Cached 'has' result in initialize()
Also amended a bit of README that was missed and added a memory usage in the RootView for widgets here memory is limited, to serve as a warning to users who are likely to complain.
This commit is contained in:
@ -32,10 +32,14 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
|
||||
private var mApiStatus as WatchUi.Text or Null;
|
||||
private var mMenuText as WatchUi.Text or Null;
|
||||
private var mMenuStatus as WatchUi.Text or Null;
|
||||
private var mAntiAlias as Lang.Boolean = false;
|
||||
|
||||
function initialize(app as HomeAssistantApp) {
|
||||
GlanceView.initialize();
|
||||
mApp = app;
|
||||
if (Graphics.Dc has :setAntiAlias) {
|
||||
mAntiAlias = true;
|
||||
}
|
||||
}
|
||||
|
||||
function onLayout(dc as Graphics.Dc) as Void {
|
||||
@ -85,9 +89,9 @@ class HomeAssistantGlanceView extends WatchUi.GlanceView {
|
||||
});
|
||||
}
|
||||
|
||||
function onUpdate(dc) as Void {
|
||||
function onUpdate(dc as Graphics.Dc) as Void {
|
||||
GlanceView.onUpdate(dc);
|
||||
if(dc has :setAntiAlias) {
|
||||
if(mAntiAlias) {
|
||||
dc.setAntiAlias(true);
|
||||
}
|
||||
dc.setColor(
|
||||
|
Reference in New Issue
Block a user