Re: [SailfishDevel] Way to determine the height of a cover action?

2016-12-01 Thread micu
Hey Joona,

Thanks a lot for your answer!

On Montag, 24. Oktober 2016 18:42:59 CET Joona Petrell wrote:
> Excellent question. Unfortunately and a bit surprisingly (sorry!) no such
> API exists yet.

OK, this is really reassuring to me --- having a little sanity check that 
verifies I am not completely stupid is helpful ;).

Also thank you very much for your hints regarding future APIs and workarounds!

Best, micu

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


Re: [SailfishDevel] Way to determine the height of a cover action?

2016-10-24 Thread Joona Petrell
Hi,

Excellent question. Unfortunately and a bit surprisingly (sorry!) no such API 
exists yet. We noticed that also recently, in the second upcoming release after 
the current public (Sailfish OS 2.0.4) we'll introduce Cover.coverActionArea 
API, which is an Item that can be anchored to or you can bind to the height of 
the item.

Cover { Component.onCompleted: console.log("Cover action area height is", 
coverActionArea.height) }

In the mean time you can calculate the cover action height with following code 
(not supported in the long run, replace with the proper API once available):

property real scale: width / Theme.coverSizeLarge.width
property int coverActionHeight: Math.min(scale*Theme.itemSizeSmall, width/2)

Br,

Joona


From: Devel [devel-boun...@lists.sailfishos.org] on behalf of micu 
[micuin...@gmx.de]
Sent: 24 October 2016 17:27
To: Sailfish OS Developers
Subject: [SailfishDevel] Way to determine the height of a cover action?

Dear fellow sailors,

My name is micu and I'd like to say hello to all of you.

Currently I am working* on a Sailfish version



of the Berlin Vegan Guide
(I took also part in developing the new 2.x Android version of the app):



I noticed that my current application cover doesn't look too nice with a cover
action on top of some text. So I wonder whether it is possible to ascertain
the height of the cover action area in the bottom part of the cover?

I discovered that the cover proportions are a little bit different for the two
possible cover sizes. I also looked at the QML file for the call list, but it
obviously does not anchor its text area to the cover action area, but instead
simply limits its list to five items.

Does anyone by any chance have an idea? That would be really helpful.

Kind regards,
micu

---
* In case somebody is interested in helping with the development of this app,
of course I'd be more than happy if you join.

Furthermore, if you take a glance at the code and some ideas pop up in your
head on how to improve the code, I'd love to hear your suggestions. My
Sailfish and QML experience is still fresh and I would like to learn more
about QML and Sailfish best practices.
--
OpenPGP / GnuPG:0xE4CB4E80
Fingerprint:1A15 A480 1F8B 07F6 9D12 3426 CEFE 7455 E4CB 4E80

<<>

http://www.micuintus.de
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org