Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connections: fix layout as some icons were off screen #54

Merged
merged 3 commits into from
Jan 25, 2017

Conversation

lrusak
Copy link
Member

@lrusak lrusak commented Jan 23, 2017

This is much better. If someone would like me to move things around more let me know.

before:

before

after:

after

@lrusak lrusak added the bug label Jan 23, 2017
@MilhouseVH
Copy link
Contributor

Looks good!

Having just reviewed the code for the Connections list from what I see it appears we don't have an "unlocked padlock" security icon for insecure connections - would it be a good idea to add that, otherwise I think we'll just show no security icon at all (which isn't terribly helpful if it's the only connection and/or the user isn't familiar with the security icons that can be shown for a WiFi connection).

Not related to the connections, but @chewitt pointed out the main menu items are not centred vertically - for example, the highlighted Connections menu entry in the screenshots above is vertically positioned slightly above centre.

@MilhouseVH
Copy link
Contributor

Thanks for making these changes, although the Unlock.png icon doesn't exist so will need to be created. There's plenty of space to the right of the padlock so having the unlocked shackle overhang the right side of the padlock body might work.

@lrusak
Copy link
Member Author

lrusak commented Jan 23, 2017

@MilhouseVH thanks

I've added a couple commits

here is the menu alignment now and the lock/unlock symbol (currently waiting for unlock photo to be made):
alignment

PS. the lock/unlock doesn't seem like it was ever working right, because the object is passed as an array. ie: ['none'] or ['psk', 'wps'] so no matter what the length would evaluate to 1 or more.

to verify please test this simple script
http://sprunge.us/HXMD
note that you may have to scan wifi first
connmanctl scan wifi

output should be like

/net/connman/service/ethernet_b827eb8359d8_cable
[]

/net/connman/service/wifi_98ded015090f_5269636b746f62792d322e3447_managed_psk
[dbus.String(u'psk'), dbus.String(u'wps')]

/net/connman/service/wifi_98ded015090f_534841572d454639343430_managed_psk
[dbus.String(u'psk')]

/net/connman/service/wifi_98ded015090f_696d796f75727a65726f_managed_none
[dbus.String(u'none')]

@lrusak
Copy link
Member Author

lrusak commented Jan 23, 2017

pushed a fixup, this is how it looks now

alignment

might still want to fix the unlock.png a slight bit so the alignment is perfect

@lrusak
Copy link
Member Author

lrusak commented Jan 24, 2017

current look with fixed up icons from @chewitt

icons

@@ -806,7 +806,12 @@ def menu_connections(self, focusItem, services={}, removed={}, force=False):
if properties[prop]['type'] == 2:
result = unicode(result)
if properties[prop]['type'] == 3:
result = unicode(len(result))
if ('psk' or 'wep' or 'ieee8021x') in result:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test isn't working as intended - it will only return true for psk:

result=['ieee8021x','wep']
if ('psk' or 'wep' or 'ieee8021x') in result:
  print("yes")
else:
  print("no")

will print no

@MilhouseVH
Copy link
Contributor

Perfect! :)

@chewitt chewitt merged commit c2821a2 into LibreELEC:master Jan 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants