attah / harbour-tint

SailfishOS app for Philips Hue
Other
5 stars 0 forks source link

All lights off button on cover page #9

Closed JSEHV closed 5 years ago

JSEHV commented 5 years ago

Is it possible for you to create an "all lights on/off button" on the cover page of the app?

This way you can turn on or off all lights without opening the app. Very handy when you leave or enter the house.

You can use one of the icons in the Sailfish Reference under the section "cover action" as your switch:

https://sailfishos.org/develop/docs/jolla-ambient/

If you prefer to use a different/own style icon, I've made you this one (with transparent background; the blue background is just to show here on Github how it would look like in the app on the cover)

harbour-tint-cover-button

All sizes:

harbour-tint-cover-button.zip

attah commented 5 years ago

Very good suggestion. I was planning the ability to have two favourites, but the global switch and in the future one favourite seems better. As you seem to have figured out, there isn't really any good icon to choose from. A power switch like that would be much better suited, but i'm not sold on the fat base of the "1" it. It doesn't look as clean as the sfos graphics in general, to me it looks almost like a speedometer. I'm curious if i can add the regular glowing dot switch somehow...

JSEHV commented 5 years ago

Are you sure you can't use a switch on the cover page?

https://sailfishos.org/develop/docs/silica/qml-sailfishsilica-sailfish-silica-switch.html/

or

https://sailfishos.org/develop/docs/silica/qml-sailfishsilica-sailfish-silica-textswitch.html/

attah commented 5 years ago

Yes, pretty sure it needs to be a CoverAction https://sailfishos.org/develop/docs/silica/qml-sailfishsilica-sailfish-silica-coveraction.html/ But perhaps i can go digging for the switch images...

JSEHV commented 5 years ago

What about these, instead of just a light (like the Sailfish standard radio button). For the lights on you can pick between the 'no glow' and 'glow' version. Shown here with background due to Githubs white background.

bulb-switch-unavailable-bg (Lights unavailable, no hub found) bulb-switch-off-bg (Lights off) bulb-switch-on-bg (Lights on, no glow) bulb-switch-on-bg-glow (Lights on, glow)

All 4 versions in all sizes:

bulb-switches.zip

attah commented 5 years ago

I think these could work nicely. Since you included multiple sizes, do you have an idea on how the size should be adapting to displays with different DPI? At first glance it seems i dn't need to do anything.

JSEHV commented 5 years ago

I don't think you have to do that much indeed, but I don't know the nitty gritty details. Most apps seem to use 32px icons here. Standard cover icons from Jolla also seem to be 32px... Just try it out and see :) Won't hurt to learn it that way, right. Worst that can happen is that you have to fix it in a next release.

attah commented 5 years ago

Sounds good to me. Discovery of Hue hubs is borked now, service giving complete garbage results from the upnp service/server. (before i started getting some extra, now i don't get the one i have) So hacking up some cover actions will have to wait until i can discover my hub again..

JSEHV commented 5 years ago

Maybe you need a flat simple .svg (not the multilayer ones I supplied) for the icons.

https://sailfishos.org/develop/docs/silica/sailfish-application-scalability.html/

Can be done after you have it working. Just go with .png files for now. I will check it on an XA2 and a Jolla 1 and let you know how it looks :)