← Back to team overview

ubuntu-phone team mailing list archive

Re: [Ubuntu-touch-coreapps] App theming

 

Hi,

Hmm... there might be GTK support at some point after we move to Mir. But 
there is no focus on GTK which means, there won't be a touch friendly theme 
any time soon.

If you want to have your app running on Ubuntu touch, I'd recommend to check 
out Qt/QML.

The PyQt project has released a first release working with Qt5 so that might be 
worth a try. http://www.riverbankcomputing.com/news

If porting from PyGTK to PyQt turns out to be a rewrite, I actually recommend 
directly looking into using Qt and QML instead of rewriting everything with 
PyQt.

Best regards.
Michael

On Monday 03 June 2013 23:36:24 Luke Bryan wrote:
> Greetings!
> 
> This question actually reminded me of a question I've had for some time,
> about the new Ubuntu for touch devices. Sorry if this is a dumb question,
> but I see lots of info about QML and javascript, but what is the upgrade
> path (if any) for existing GTK apps? I maintain a Python+GTK app, how can I
> make sure it will run properly on Ubuntu phone/tablet? Or will full
> applications only run when the device is plugged in to monitor and
> keyboard?
> 
> Thanks,
> Luke
> 
> Date: Tue, 4 Jun 2013 02:03:44 +0100
> From: hmiguellima@xxxxxxxxx
> To: david.planella@xxxxxxxxxx
> CC: ubuntu-phone@xxxxxxxxxxxxxxxxxxx;
> ubuntu-touch-coreapps@xxxxxxxxxxxxxxxxxxx Subject: Re: [Ubuntu-phone]
> [Ubuntu-touch-coreapps] App theming
> 
> Hi everyone !
> 
> Thanks for the links David !
> 
> I've looked into the camera app and as it seems, it sets the theme from c++
> (main.cpp) instead of loading it from javascript (Theme.loadTheme) which
> goes against the plain QML+Javascript methodology.
> 
> 
> I've got the teeming kind of working in the latest commit
> (https://code.launchpad.net/~ubuntu-facebook-dev/ubuntu-facebook-app/trunk)
> , but I had to resort to copy all of the original styles from the ambiance
> theme for it to work, then I was able to re-style the header component, as
> you can see in the attached image.
> 
> 
> I also tried to re-style the "new-tabs" component, but it failed the moment
> I add a style rule for the "new-tabs" like this:
> 
> .new-tabs {
>     headerTextColor: "#ffffff";
> 
> }
> 
> 
> this rule causes the tabs header to completely disappear, and no useful
> warning or error on the log.
> 
> Another thing I tried was to create a new "NewTabsDelegate", and map it to a
> style rule, like the camera-app did for the "ThinSliderDelegate", but it
> seems I need to create a new qml module for the theme which I wasn't able
> to do.
> 
> 
> This styling of the header component and new tabs delegate would be great to
> allow us to further change the app look to be more  compliant with the
> Facebook apps. One change could be, to add two icon buttons, for
> notifications and messages, to the top right corner of the tabs delegate.
> 
> 
> Any suggestions ?
> 
> Cheers,
> Hugo.
> 
> 
> 
> 2013/6/3 David Planella <david.planella@xxxxxxxxxx>
> 
> Al 27/05/13 11:43, En/na Hugo Lima ha escrit:
> > Hi everyone !
> > 
> > 
> > 
> > I'm having a lot of difficulties trying to get my app themed. Basically
> > 
> > I had to copy the ambiance default.qmltheme to a app.theme located in my
> > 
> > app folder, that I load with Theme.loadTheme, I also had to copy the
> > 
> > image resources from the ambiance theme into my app folder.
> > 
> > 
> > 
> > This shouldn't have to be this way :(
> > 
> > 
> > 
> > Can someone point me to an example app that overrides the default theme
> > 
> > with a qmltheme file loaded from inside an app.
> > 
> > 
> > 
> > Many thanks,
> > 
> > Hugo.
> 
> Hi Hugo,
> 
> 
> 
> This might provide some insight:
> 
> 
> 
> 
> 
> http://askubuntu.com/questions/282766/how-to-use-theming-in-qml-for-ubuntu-p
> hone
> 
> 
> 
> The camera app uses theming:
> 
> 
> 
>     https://code.launchpad.net/camera-app
> 
> 
> 
> Perhaps someone from the SDK team can chip in and help Hugo?
> 
> 
> 
> Cheers,
> 
> David.


References