[SailfishDevel] Image + text element, or a non-rectangular text field possible in silica?
szopin at gmail.com
szopin at gmail.com
Mon Jan 6 19:31:01 UTC 2020
Ok, so scrolling the whole panel is the way to go, thanks!
szopin
On Monday, 6 January 2020, David Llewellyn-Jones wrote:
> On 06/01/2020 21:00, szopin at gmail.com wrote:
> > Picture will probably illustrate what I mean easier:
> > https://i.imgur.com/IKyMnAV.png
>
> The pictures are definitely helpful!
>
> > This is a self-expanding TextArea as you type, but it will happily go
> > over the screen size and there is no way to get the text at the
> > beginning into focus, I'm probably missing some super obvious way to
> > avoid this? The only way I found to force scroll option was
> > hardcoding its height which is noy pretty.
> I could be misunderstanding completely (especially since you mention in
> your other email about it being in a docked panel, and I'm not sure
> whether that might affect things).
>
> I think the usual way would be to place the TextArea inside a
> SilicaFlickable with SilicaFlickable.contentHeight set to
> TextArea.contentHeight (or possibly TextArea.implicitHeight or
> TextArea.height). If you include other stuff/padding inside the
> flickable you'll need to take that into account too.
>
> You can then set the height of the SilicaFlickable to the height
> available on the screen to allow scrolling of everything inside it.
>
> The notes app does something like this. It's not a great example because
> there's a lot going on, but it might help:
>
> Line 160 sets the contentHeight:
>
> /usr/share/jolla-notes/pages/NotePage.qml
>
> David
> --
> Website: http://www.flypig.co.uk
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.or
--
Sent from my Jolla
More information about the Devel
mailing list