Making Kivy behave more like a native app on Windows/Mac

654 views
Skip to first unread message

Sam Brotherton

unread,
Dec 11, 2012, 3:28:40 PM12/11/12
to kivy-...@googlegroups.com
Hi all,

I've been developing Kivy mobile apps for six months or so now, and it's a truly awesome framework for mobile NUI things. However, I just got a contract to develop a cross-platform business app for Windows/Mac, and I would very much like to use Kivy rather than Tkinter, etc. UI development is way faster and easier with KV language, and the finished product looks much more modern.

A few things about the default user experience are deal breakers, though: namely the default use of the multitouch simulator and the fact that pressing the Escape key breaks the program. Can I somehow disable these "features" when packaging the program? I need to be able to pick up right-clicks instead of having them lock a touch.

Also, is allowing drag and drop of files onto the screen a possibility at all? This isn't a requirement but it would be nice.

Thanks in advance!

Sam

Gabriel Pettier

unread,
Dec 11, 2012, 3:40:07 PM12/11/12
to kivy-...@googlegroups.com
Le 11/12/2012 21:28, Sam Brotherton a �crit :
> Hi all,
>
> I've been developing Kivy mobile apps for six months or so now, and
> it's a truly awesome framework for mobile NUI things. However, I just
> got a contract to develop a cross-platform business app for
> Windows/Mac, and I would very much like to use Kivy rather than
> Tkinter, etc. UI development is way faster and easier with KV
> language, and the finished product looks much more modern.
>
> A few things about the default user experience are deal breakers,
> though: namely the default use of the multitouch simulator and the
> fact that pressing the Escape key breaks the program. Can I somehow
> disable these "features" when packaging the program? I need to be able
> to pick up right-clicks instead of having them lock a touch.
>
Yes, you can change the config from inside the app, just start by
importing Config from kivy.config, and add the option in the object, see
http://kivy.org/docs/api-kivy.input.providers.mouse.html#disabling-multitouch-interaction-with-mouse
and http://kivy.org/docs/api-kivy.config.html

Then right clicks will be regular touches, just as left clicks, but
you'll be able to discriminate them using the "button" attribute they
will have (see
http://kivy.org/docs/api-kivy.input.motionevent.html#profiles)
> Also, is allowing drag and drop of files onto the screen a possibility
> at all? This isn't a requirement but it would be nice.
>
Not sure about this one, needs to see if the window provider used on
both (pygame) supports that in some way.

> Thanks in advance!
>
> Sam
> --
>
>

skeezix

unread,
Dec 11, 2012, 4:00:18 PM12/11/12
to kivy-...@googlegroups.com
On Tue, 11 Dec 2012, Sam Brotherton wrote:

# I've been developing Kivy mobile apps for six months or so now, and it's a truly awesome framework for mobile NUI things. However, I just got a contract to develop a cross-platform business app for Windows/Mac, and I would very much
# like to use Kivy rather than Tkinter, etc. UI development is way faster and easier with KV language, and the finished product looks much more modern.
#
# A few things about the default user experience are deal breakers, though: namely the default use of the multitouch simulator and the fact that pressing the Escape key breaks the program. Can I somehow disable these "features" when
# packaging the program? I need to be able to pick up right-clicks instead of having them lock a touch.

If you capture keydown events, you can just swallow the ESCape key
rather than hand it back to kivy.

There are a lot of other issues though, depending on the type of
app you're doing; ie: it won't look and feel like any existing framework
.. it won't look like a win32 application on Windows, or an OSX app on
OSX. There won't be scrollbars on widgets except while they are
scrolliung, and they won't look like normal ones, etc.

So forget business applications or the like .. but for a certain
class of applications.. perfect :)

jeff

--
If everyone would put barbecue sauce on their food, there would be no war.

Sam Brotherton

unread,
Dec 11, 2012, 4:17:32 PM12/11/12
to kivy-...@googlegroups.com
Well, I already "fixed" the scrollbar issue with these three lines:

class ScrollViewWithBars(ScrollView):
    def _start_decrease_alpha(self, *l):
        pass

but I agree that it's not quite appropriate for your standard "business application", at least yet. Still, it's a joy to develop with and with the proper skinning it could be usable for clients who are willing to "think outside the box" a bit (and/or value the fact that it will run on Android/iOS). I'm gonna try to pitch it and I'll tell you how it goes...

Sam



--



skeezix

unread,
Dec 11, 2012, 4:32:46 PM12/11/12
to kivy-...@googlegroups.com
On Tue, 11 Dec 2012, Sam Brotherton wrote:

# Well, I already "fixed" the scrollbar issue with these three lines:
# class ScrollViewWithBars(ScrollView):
#     def _start_decrease_alpha(self, *l):
#         pass

oh? I'll have to try that -- are they operable? (click and drag to
scroll? as is, can't really use them at all, so no idea ;)

That should be a widget-creation-time setting.

# but I agree that it's not quite appropriate for your standard "business
# application", at least yet. Still, it's a joy to develop with and with
# the proper skinning it could be usable for clients who are willing to
# "think outside the box" a bit (and/or value the fact that it will run on
# Android/iOS). I'm gonna try to pitch it and I'll tell you how it goes...

Keep us in the loop; and fully agree.. a 'free' port for
iOS/Android is a pretty compelling value :) (and also agree Kivy is great
fun to work with!)

Sam Brotherton

unread,
Dec 11, 2012, 4:39:21 PM12/11/12
to kivy-...@googlegroups.com
# Well, I already "fixed" the scrollbar issue with these three lines:
# class ScrollViewWithBars(ScrollView):
#     def _start_decrease_alpha(self, *l):
#         pass

        oh? I'll have to try that -- are they operable? (click and drag to
scroll? as is, can't really use them at all, so no idea ;)

        That should be a widget-creation-time setting.

Agreed! Unfortunately they are not operable, it just forces them to be visible. I think it still adds substantially to usability on touch-screens, since people will do swipe-to-scroll but need some kind of visual cue that an area is scrollable.

It would be nice if you could put "real" scrollbars on a ScrollView for desktop applications. I'll take a look at what this would entail.
 

Gabriel Pettier

unread,
Dec 11, 2012, 4:45:37 PM12/11/12
to kivy-...@googlegroups.com
I agree kivy is not fully ready for desktop yet, there are things that can be made better, help is welcome on that ;) if there is something you feel can be improved, we can guide you through doing it, so everybody gains from it, we are a small team, and there is so much to do ;).

Hope you'll succeed pitching your boss into using kivy for that (hint: your time is their money :D).
--
 
 

Reply all
Reply to author
Forward
0 new messages