mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-17 20:08:33 +00:00
Renamed class variables
There's a Monkey C convention to have class variable names start with 'm', then be camel case. 'm' for 'member' according to https://developer.garmin.com/connect-iq/reference-guides/monkey-c-reference/.
This commit is contained in:
@ -23,7 +23,7 @@ using Toybox.WatchUi;
|
||||
using Toybox.Math;
|
||||
|
||||
class ScalableView extends WatchUi.View {
|
||||
hidden var screenWidth;
|
||||
hidden var mScreenWidth;
|
||||
|
||||
function initialize() {
|
||||
View.initialize();
|
||||
@ -40,9 +40,9 @@ class ScalableView extends WatchUi.View {
|
||||
// height > width.
|
||||
//
|
||||
function pixelsForScreen(pc as Lang.Float) as Lang.Number {
|
||||
if (screenWidth == null) {
|
||||
screenWidth = System.getDeviceSettings().screenWidth;
|
||||
if (mScreenWidth == null) {
|
||||
mScreenWidth = System.getDeviceSettings().screenWidth;
|
||||
}
|
||||
return Math.round(pc * screenWidth) / 100;
|
||||
return Math.round(pc * mScreenWidth) / 100;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user