Re: [SailfishDevel] Setting application screen orientation from C++

2014-07-31 Thread Tomasz Sterna
Dnia 2014-07-31, czw o godzinie 08:49 +0300, Iosif Hamlatzis pisze:
 the same answer that I should do the rotation translation my self and
 not only for rendering but for touch screen.

I agree that's a huge inconvenience, also a waste of effort that every
single application in the need of landscape layout needs to bring own
solution. I can understand that you do not want to make this effort.

Also a regression from Maemo... where the only thing application cared
is getting notified, that its window dimensions is not 480x800 anymore,
but 800x480 and it needs to relayout. Also, the relayouting process was
cleverly hidden by rotating the screenshot of the last state of the
application, so the user does not see the relayouting itself.

I perfectly understand that's... discouraging, to require so much
developer effort for such a niche platform.


-- 
Tomasz Sterna @ http://abadcafe.pl/ @ http://www.xiaoka.com/

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Pagestack problems

2014-07-31 Thread Chris Walker
On Thu, 10 Jul 2014 15:38:52 +0100
Chris Walker cdw_noki...@the-walker-household.co.uk wrote:

 On Thu, 10 Jul 2014 16:14:34 +0200 (CEST)
 sfietkonstan...@free.fr wrote:
 
  Hello, looking a bit at your code, you are using a pagestack.push,
  meaning that you effectively adds another page to your pagestack.
  
  For adding a new beer, I think that the best would be using a Dialog
  component.
 
 Ok. I'll take a look at how I might do that.

I've finally tried adding a Dialog component but it's not working i.e.
it's not opening a new page but the worst bit is that Creator is not
telling me what's wrong i.e. it isn't reporting any errors.

Here are (what I think) the relevant parts of the code :-

Page {
id: brewerylistpage
...
PullDownMenu {
MenuItem {
text: qsTr(About);
onClicked: {
pageStack.push(Qt.resolvedUrl(About.qml))
}
}
MenuItem {
text: Add Brewery
onClicked:

Qt.createComponent(AddBreweryPage.qml).createObject(brewerylistpage,
{});

The AddBreweryPage has already been defined and works but leads to page
navigation problems as discussed above.

In an effort to resolve my problem, I've been looking at this page -
http://qt-project.org/forums/viewthread/26455 but it hasn't helped me
fix it.

So where have I gone wrong?

For reference, I haven't uploaded any of this modified code to git.
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Setting application screen orientation from C++

2014-07-31 Thread Robin Burchell
Den 31.07.14, 10.39 skrev Tomasz Sterna to...@xiaoka.com:
Dnia 2014-07-31, czw o godzinie 08:49 +0300, Iosif Hamlatzis pisze:
 the same answer that I should do the rotation translation my self and
 not only for rendering but for touch screen.

Also a regression from Maemo... where the only thing application cared
is getting notified, that its window dimensions is not 480x800 anymore,
but 800x480 and it needs to relayout. Also, the relayouting process was
cleverly hidden by rotating the screenshot of the last state of the
application, so the user does not see the relayouting itself.

It¹s a change (I wouldn¹t call it a regression, as I¹m quite sure it was a
deliberate choice) from Maemo 5, but not Maemo 6. Maemo 6 did not do
server-side rotation or window resizing. It was up to the client toolkit
(MeeGo Touch, or qt-components being the built-in examples) to do that.

The only part that is different is the default frame buffer orientation
(landscape on Maemo devices, portrait on the Jolla).

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Setting application screen orientation from C++

2014-07-31 Thread Robin Burchell
Den 31.07.14, 07.49 skrev Iosif Hamlatzis 
i.hamlat...@gmail.commailto:i.hamlat...@gmail.com:
I had asked a while a go the same question regarding orientation when I started 
porting my SDL games and received the same answer that I should do the rotation 
translation my self and not only for rendering but for touch screen. Also the 
same question that it would be faster if I did the calculations instead of the 
system automatically.

You’re right, that doesn’t sound correct in today’s world. If there is a 
difference, I can’t imagine it’s a significant one: there’s still going to be a 
transform (whether it’s on your client application’s rendering) or when 
rendering the client texture in the compositor, after all.

In the past, though, it did make quite a lot of difference. X11 was a totally 
different beast to the graphics stack we had now, and it had much larger 
problems with things like performantly resizing and such.

Client side rotation does buy you some things, though: the capability to do 
more complex transitions and to customize the transition if you feel like it.

See for instance:
https://sailfishos.org/sailfish-silica/qml-sailfishsilica-page.html#defaultOrientationTransition-prop
https://sailfishos.org/sailfish-silica/qml-sailfishsilica-page.html#orientationTransitions-prop

So the answer: Do it yourself because it's faster has NO merit. IMHO either 
jolla doesn't have the skills or the man power to do it.

You’re right, we don’t. We attempted this shortly (~1-2 months) before shipping 
if I recall rightly, because I think that server-side transitions do make sense 
for a large number of cases (like SDL). Unfortunately, we ran into driver bugs 
that made it an impossible task at the time (given the time constraints we 
had), and due to a lack of time/resources we haven’t revisited the problem 
since then.

There’s an awful lot of work on our plate, and we really need to pick and 
choose what work we take on to give the largest slice of our user base the 
biggest «bang» for their buck. So far, this hasn’t been considered a priority. 
If you think it should be, then feel free to file a suggestion on 
together.jolla.com and try gather some interest for it.

It doesn't matter any more, for the company I work for we no longer consider 
porting our games to this platform, not in the near future. We tested it and 
given it an F (for fail)

It’s a shame to hear that. I hope that one day you’ll be able to reconsider.
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] [API] Ambience DBus API

2014-07-31 Thread Mohammed Hassan
On Wed, 23 Jul 2014 08:20:30 +0200
Tomasz Sterna to...@xiaoka.com wrote:
  I can't actually imagine one except the colorset change
  notification but if I understand correctly Silica's Theme object
  already contains current ambience colors.
 
 SDL apps may find useful to get ambience colours to paint UI
 accordingly, without round trip to QML.

You can do that already now by using MGConfItem from mlite and monitor
the dconf keys related to colors ;-)

MGconfItem is harbour whitelisted. The dconf key paths are not official
API however.

Cheers,

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org