Aligned naming of menu item types
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<drawables>
|
<drawables>
|
||||||
<bitmap id="ErrorIcon" filename="error.svg"/>
|
<bitmap id="ErrorIcon" filename="error.svg"/>
|
||||||
<bitmap id="MenuIcon" filename="menu.svg"/>
|
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
|
||||||
<bitmap id="TapIcon" filename="tap.svg"/>
|
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
|
||||||
</drawables>
|
</drawables>
|
||||||
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<drawables>
|
<drawables>
|
||||||
<bitmap id="ErrorIcon" filename="error.svg"/>
|
<bitmap id="ErrorIcon" filename="error.svg"/>
|
||||||
<bitmap id="MenuIcon" filename="menu.svg"/>
|
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
|
||||||
<bitmap id="TapIcon" filename="tap.svg"/>
|
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
|
||||||
</drawables>
|
</drawables>
|
||||||
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<drawables>
|
<drawables>
|
||||||
<bitmap id="ErrorIcon" filename="error.svg"/>
|
<bitmap id="ErrorIcon" filename="error.svg"/>
|
||||||
<bitmap id="MenuIcon" filename="menu.svg"/>
|
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
|
||||||
<bitmap id="TapIcon" filename="tap.svg"/>
|
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
|
||||||
</drawables>
|
</drawables>
|
||||||
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<drawables>
|
<drawables>
|
||||||
<bitmap id="ErrorIcon" filename="error.svg"/>
|
<bitmap id="ErrorIcon" filename="error.svg"/>
|
||||||
<bitmap id="MenuIcon" filename="menu.svg"/>
|
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
|
||||||
<bitmap id="TapIcon" filename="tap.svg"/>
|
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
|
||||||
</drawables>
|
</drawables>
|
||||||
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<drawables>
|
<drawables>
|
||||||
<bitmap id="ErrorIcon" filename="error.svg"/>
|
<bitmap id="ErrorIcon" filename="error.svg"/>
|
||||||
<bitmap id="MenuIcon" filename="menu.svg"/>
|
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
|
||||||
<bitmap id="TapIcon" filename="tap.svg"/>
|
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
|
||||||
</drawables>
|
</drawables>
|
||||||
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<drawables>
|
<drawables>
|
||||||
<bitmap id="ErrorIcon" filename="error.svg"/>
|
<bitmap id="ErrorIcon" filename="error.svg"/>
|
||||||
<bitmap id="MenuIcon" filename="menu.svg"/>
|
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
|
||||||
<bitmap id="TapIcon" filename="tap.svg"/>
|
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
|
||||||
</drawables>
|
</drawables>
|
||||||
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<drawables>
|
<drawables>
|
||||||
<bitmap id="ErrorIcon" filename="error.svg"/>
|
<bitmap id="ErrorIcon" filename="error.svg"/>
|
||||||
<bitmap id="MenuIcon" filename="menu.svg"/>
|
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
|
||||||
<bitmap id="TapIcon" filename="tap.svg"/>
|
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
|
||||||
</drawables>
|
</drawables>
|
||||||
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<drawables>
|
<drawables>
|
||||||
<bitmap id="ErrorIcon" filename="error.svg"/>
|
<bitmap id="ErrorIcon" filename="error.svg"/>
|
||||||
<bitmap id="MenuIcon" filename="menu.svg"/>
|
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
|
||||||
<bitmap id="TapIcon" filename="tap.svg"/>
|
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
|
||||||
</drawables>
|
</drawables>
|
||||||
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<drawables>
|
<drawables>
|
||||||
<bitmap id="ErrorIcon" filename="error.svg"/>
|
<bitmap id="ErrorIcon" filename="error.svg"/>
|
||||||
<bitmap id="MenuIcon" filename="menu.svg"/>
|
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
|
||||||
<bitmap id="TapIcon" filename="tap.svg"/>
|
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
|
||||||
</drawables>
|
</drawables>
|
||||||
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<drawables>
|
<drawables>
|
||||||
<bitmap id="ErrorIcon" filename="error.svg"/>
|
<bitmap id="ErrorIcon" filename="error.svg"/>
|
||||||
<bitmap id="MenuIcon" filename="menu.svg"/>
|
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
|
||||||
<bitmap id="TapIcon" filename="tap.svg"/>
|
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
|
||||||
</drawables>
|
</drawables>
|
||||||
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<drawables>
|
<drawables>
|
||||||
<bitmap id="ErrorIcon" filename="error.svg"/>
|
<bitmap id="ErrorIcon" filename="error.svg"/>
|
||||||
<bitmap id="MenuIcon" filename="menu.svg"/>
|
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
|
||||||
<bitmap id="TapIcon" filename="tap.svg"/>
|
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
|
||||||
</drawables>
|
</drawables>
|
||||||
|
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 782 B After Width: | Height: | Size: 782 B |
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
<drawables>
|
<drawables>
|
||||||
<bitmap id="ErrorIcon" filename="error.svg"/>
|
<bitmap id="ErrorIcon" filename="error.svg"/>
|
||||||
<bitmap id="MenuIcon" filename="menu.svg"/>
|
<bitmap id="GroupTypeIcon" filename="group_type.svg"/>
|
||||||
<bitmap id="TapIcon" filename="tap.svg"/>
|
<bitmap id="TapTypeIcon" filename="tap_type.svg"/>
|
||||||
</drawables>
|
</drawables>
|
||||||
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
@ -24,7 +24,7 @@
|
|||||||
<!-- Best be a public URL in order to work away from your home LAN and have a trusted HTTPS certificate -->
|
<!-- Best be a public URL in order to work away from your home LAN and have a trusted HTTPS certificate -->
|
||||||
<property id="config_url" type="string"></property>
|
<property id="config_url" type="string"></property>
|
||||||
|
|
||||||
<property id="lean_ui" type="boolean"></property>
|
<property id="types_representation" type="boolean"></property>
|
||||||
|
|
||||||
<property id="menu_alignment" type="boolean"></property>
|
<property id="menu_alignment" type="boolean"></property>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -44,8 +44,8 @@
|
|||||||
</setting>
|
</setting>
|
||||||
|
|
||||||
<setting
|
<setting
|
||||||
propertyKey="@Properties.lean_ui"
|
propertyKey="@Properties.types_representation"
|
||||||
title="More leaner UI"
|
title="Representing types with labels (off) or with icons (on)"
|
||||||
>
|
>
|
||||||
<settingConfig
|
<settingConfig
|
||||||
type="boolean"
|
type="boolean"
|
||||||
|
@ -27,11 +27,11 @@ class HomeAssistantMenuItemFactory {
|
|||||||
private var mMenuItemAlignment;
|
private var mMenuItemAlignment;
|
||||||
private var mLabelToggle;
|
private var mLabelToggle;
|
||||||
private var strMenuItemTap;
|
private var strMenuItemTap;
|
||||||
private var bLeanDesign;
|
private var bRepresentTypesWithIcons;
|
||||||
|
|
||||||
private var mTapIcon;
|
private var mTapTypeIcon;
|
||||||
|
|
||||||
private var mMenuIcon;
|
private var mGroupTypeIcon;
|
||||||
|
|
||||||
private static var instance;
|
private static var instance;
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ class HomeAssistantMenuItemFactory {
|
|||||||
:disabled => WatchUi.loadResource($.Rez.Strings.MenuItemOff) as Lang.String
|
:disabled => WatchUi.loadResource($.Rez.Strings.MenuItemOff) as Lang.String
|
||||||
};
|
};
|
||||||
|
|
||||||
bLeanDesign = Application.Properties.getValue("lean_ui") as Lang.Boolean;
|
bRepresentTypesWithIcons = Application.Properties.getValue("types_representation") as Lang.Boolean;
|
||||||
|
|
||||||
var menuItemAlignment = Application.Properties.getValue("menu_alignment") as Lang.Boolean;
|
var menuItemAlignment = Application.Properties.getValue("menu_alignment") as Lang.Boolean;
|
||||||
|
|
||||||
@ -53,14 +53,14 @@ class HomeAssistantMenuItemFactory {
|
|||||||
|
|
||||||
|
|
||||||
strMenuItemTap = WatchUi.loadResource($.Rez.Strings.MenuItemTap);
|
strMenuItemTap = WatchUi.loadResource($.Rez.Strings.MenuItemTap);
|
||||||
mTapIcon = new WatchUi.Bitmap({
|
mTapTypeIcon = new WatchUi.Bitmap({
|
||||||
:rezId=>$.Rez.Drawables.TapIcon,
|
:rezId=>$.Rez.Drawables.TapTypeIcon,
|
||||||
:locX=>WatchUi.LAYOUT_HALIGN_CENTER,
|
:locX=>WatchUi.LAYOUT_HALIGN_CENTER,
|
||||||
:locY=>WatchUi.LAYOUT_VALIGN_CENTER
|
:locY=>WatchUi.LAYOUT_VALIGN_CENTER
|
||||||
});
|
});
|
||||||
|
|
||||||
mMenuIcon = new WatchUi.Bitmap({
|
mGroupTypeIcon = new WatchUi.Bitmap({
|
||||||
:rezId=>Rez.Drawables.MenuIcon,
|
:rezId=>$.Rez.Drawables.GroupTypeIcon,
|
||||||
:locX=>WatchUi.LAYOUT_HALIGN_CENTER,
|
:locX=>WatchUi.LAYOUT_HALIGN_CENTER,
|
||||||
:locY=>WatchUi.LAYOUT_VALIGN_CENTER
|
:locY=>WatchUi.LAYOUT_VALIGN_CENTER
|
||||||
});
|
});
|
||||||
@ -76,7 +76,7 @@ class HomeAssistantMenuItemFactory {
|
|||||||
function toggle(label as Lang.String or Lang.Symbol, identifier as Lang.Object or Null) as WatchUi.MenuItem{
|
function toggle(label as Lang.String or Lang.Symbol, identifier as Lang.Object or Null) as WatchUi.MenuItem{
|
||||||
var subLabel = null;
|
var subLabel = null;
|
||||||
|
|
||||||
if (bLeanDesign == false){
|
if (bRepresentTypesWithIcons == false){
|
||||||
subLabel=mLabelToggle;
|
subLabel=mLabelToggle;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,13 +90,13 @@ class HomeAssistantMenuItemFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function tap(label as Lang.String or Lang.Symbol, identifier as Lang.Object or Null, service as Lang.String or Null) as WatchUi.MenuItem{
|
function tap(label as Lang.String or Lang.Symbol, identifier as Lang.Object or Null, service as Lang.String or Null) as WatchUi.MenuItem{
|
||||||
if (bLeanDesign) {
|
if (bRepresentTypesWithIcons) {
|
||||||
return new HomeAssistantIconMenuItem(
|
return new HomeAssistantIconMenuItem(
|
||||||
label,
|
label,
|
||||||
null,
|
null,
|
||||||
identifier,
|
identifier,
|
||||||
service,
|
service,
|
||||||
mTapIcon,
|
mTapTypeIcon,
|
||||||
mMenuItemAlignment
|
mMenuItemAlignment
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -112,8 +112,8 @@ class HomeAssistantMenuItemFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function group(definition as Lang.Dictionary) as WatchUi.MenuItem{
|
function group(definition as Lang.Dictionary) as WatchUi.MenuItem{
|
||||||
if (bLeanDesign) {
|
if (bRepresentTypesWithIcons) {
|
||||||
return new HomeAssistantViewIconMenuItem(definition, mMenuIcon, mMenuItemAlignment);
|
return new HomeAssistantViewIconMenuItem(definition, mGroupTypeIcon, mMenuItemAlignment);
|
||||||
} else {
|
} else {
|
||||||
return new HomeAssistantViewMenuItem(definition);
|
return new HomeAssistantViewMenuItem(definition);
|
||||||
}
|
}
|
||||||
|