[SailfishDevel] pageStack navigation

Olavi Haapala ojhaapala at gmail.com
Thu Jul 21 07:41:35 UTC 2016


Hey, have you tried using pageStack.replace() or pageStack.replaceAbove() ?
That's what I'm using in my application.

First time ever answering to these mail lists... so hope i'm not doing
something wrong here :)

-Olpe

On Thu, Jul 21, 2016 at 8:50 AM <devel-request at lists.sailfishos.org> wrote:

> Send Devel mailing list submissions to
>         devel at lists.sailfishos.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.sailfishos.org/cgi-bin/mailman/listinfo/devel
> or, via email, send a message with subject or body 'help' to
>         devel-request at lists.sailfishos.org
>
> You can reach the person managing the list at
>         devel-owner at lists.sailfishos.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Devel digest..."
>
>
> Today's Topics:
>
>    1. Resolution-independent in-app icons (Osmo Salomaa)
>    2. Re: pageStack navigation (Matthew Vogt)
>    3. Re: Resolution-independent in-app icons
>       (?????????? ?????? ?????????)
>    4. Re: Timeout of MerSDK and the Emulator (Martin Kampas)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 20 Jul 2016 23:27:59 +0300
> From: Osmo Salomaa <otsaloma at iki.fi>
> To: devel at lists.sailfishos.org
> Subject: [SailfishDevel] Resolution-independent in-app icons
> Message-ID: <3e5c1670-6b19-6c30-88e1-c019f25bd67c at iki.fi>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hello,
>
> SFOS has standard sizes for application launcher icons and Silica has
> stock icons, whose sizes (I assume) vary by device, but how should I
> handle custom in-app icons, e.g. a position icon in a map application,
> so that it would look right on different pixel-density screens?
>
> I tried using a large PNG or SVG and having QML scale that to one of the
> Theme.iconSize* constants, but the result of such downscaling is not
> smooth, even when using Image's smooth=true. Additionally the QML
> documentation says there's a possibly significant performace cost to
> smooth scaling. This implies that I'd need different size PNGs on
> different devices and show those 1:1 without scaling.
>
> So, is there some SFOS image resizing script I can run on RPM's
> post-install to generate the right size icons from SVGs or large PNGs?
> Or should I just roll my own solution that packs in icons of different
> sizes and loads the closest match at runtime?
>
> --
> Osmo Salomaa <otsaloma at iki.fi>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 20 Jul 2016 21:37:39 +0000
> From: Matthew Vogt <matthew.vogt at jolla.com>
> To: Sailfish OS Developers <devel at lists.sailfishos.org>
> Subject: Re: [SailfishDevel] pageStack navigation
> Message-ID:
>         <
> A85A5B205F68764C8A8C58654A9F49FA019103DE at ord2mbx12c.mex05.mlsrvr.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> The PageStack itself does not report the completion of transitions, but
> the Page objects involved in the transition see the transition events as
> changes to their 'status' property:
>
> https://sailfishos.org/develop/docs/silica/qml-sailfishsilica-sailfish-silica-page.html/#status-prop
>
> When a transition begins, the incoming page status changes to
> PageStatus.Activating, and the outgoing page status changes to
> PageStatus.Deactivating.  After the transition completes, their respective
> statuses become PageStatus.Active and PageStatus.Inactive.
>
> You can perform actions in response to changes of the Page.status
> property, knowing that the PageStack transition is no longer active.
>
> Thanks,
> Matt
>
> ________________________________
> From: devel-bounces at lists.sailfishos.org [
> devel-bounces at lists.sailfishos.org] on behalf of occirol [
> developer at nordan.ch]
> Sent: Thursday, July 21, 2016 5:15 AM
> To: Sailfish OS Developers
> Subject: Re: [SailfishDevel] pageStack navigation
>
> @Dylan
> According to the doc, there is no function completeTransition for a
> PageStack object.
>
> @Oleg
> I've something weird with your solution. Goal is reach but the MainPage is
> empty, as if the app was never started. :/
>
> If I found a solution I'll let you know. If someone as an idea, welcome ;)
>
> @+, Fab
>
>
> Le 20. 07. 16 ? 18:37, Oleg Linkin a ?crit :
> Why not do the next:
>
> pageStack.clear()
> pageStack.push(MainPage)?
>
> 2016-07-20 19:36 GMT+03:00 Dylan Van Assche <
> dylan.van.assche at protonmail.com
> <redir.aspx?REF=5UfGJdZjuqfB1yv-ScC_Jl8ln1hC0ANG73GhHb8J_doJuNKC5bDTCAFtYWlsdG86ZHlsYW4udmFuLmFzc2NoZUBwcm90b25tYWlsLmNvbQ..>>:
> Hi,
>
> You should add this:
>
> if(!pageStack.busy)
> {
> pageStack.pop()
> }
>
> This will prevent the issue but it will give you another bug: only one
> page will be popped.
>
> You can fix it like this:
>
>
> if(!pageStack.busy)
> {
> pageStack.pop()
> pageStack.completeTransition() // This will pop the page directly.
> }
>
> -------- Original Message --------
> Subject: [SailfishDevel] pageStack navigation
> Local Time: July 20, 2016 6:02 PM
> UTC Time: July 20, 2016 4:02 PM
> From: developer at nordan.ch
> <redir.aspx?REF=pWRC7fgoRnOnLMp5PpvXAXQhNjiRykk-V_o1O0-w0NQJuNKC5bDTCAFtYWlsdG86ZGV2ZWxvcGVyQG5vcmRhbi5jaA..>
> To: devel at lists.sailfishos.org
> <redir.aspx?REF=eBLTWFeh7MMSxFSKmc9AeGHy9zj7NGQg6imd4kxByF4JuNKC5bDTCAFtYWlsdG86ZGV2ZWxAbGlzdHMuc2FpbGZpc2hvcy5vcmc.>
>
>
>
> Hello everybody !
>
> I can't figure out how to go back to the main page of an app and clear the
> stack of pages. Let me explain:
>
> I've a main page, by selecting a menu entry push a page (lets call it
> page1). On this page1, calling a certain action, push another page (call it
> page2, it is a dialog page) on the stack.
>
> So in the stack, I have the following pages:  [MainPage, Page1, Page2]
>
> But now, from page2, I want to go back to MainPage. So I did this first in
> the page2 code :
>
>    onAccepted: {
>         pageStack.pop()
>     }
>
> But:
>
>
> Warning: cannot pop while transition is in progress
>
> Ok, so I tried this instead:
>
> acceptDestination: Qt.resolvedUrl("MainPage.qml") acceptDestinationAction:
> PageStackAction.Pop
>
> Still: Warning: cannot pop while transition is in progress
>
> And doing this:
>
>    onAccepted: {         pageStack.pop(null, false)     }
>
> Is working in term of results, but before going to the main page I see the
> page2 for a little while.
>
> So, I should miss something here for sure. Any ideas or recommendation ?
> Maybe am I bad designing the navigation in the app ?
>
> Thanks a lot !
>
> Regards,
>
> Fab
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
> <redir.aspx?REF=NK_0t54EQ2um-GsqRVRTvrVjKvqQxYRZQuX1UA5Txy4JuNKC5bDTCAFtYWlsdG86ZGV2ZWwtdW5zdWJzY3JpYmVAbGlzdHMuc2FpbGZpc2hvcy5vcmc.>
>
>
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
> <redir.aspx?REF=NK_0t54EQ2um-GsqRVRTvrVjKvqQxYRZQuX1UA5Txy4JuNKC5bDTCAFtYWlsdG86ZGV2ZWwtdW5zdWJzY3JpYmVAbGlzdHMuc2FpbGZpc2hvcy5vcmc.>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://lists.sailfishos.org/pipermail/devel/attachments/20160720/03f73042/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Thu, 21 Jul 2016 10:47:05 +0600
> From: ?????????? ?????? ????????? <coderusinbox at gmail.com>
> To: devel at lists.sailfishos.org
> Subject: Re: [SailfishDevel] Resolution-independent in-app icons
> Message-ID: <94e3ac96-7396-a05d-fcd9-e0a1949429e1 at gmail.com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Prefer using svg images. Carrying multiple sizes png images is so 2000.
>
>
> 21.07.2016 02:27, Osmo Salomaa ?????:
> > Hello,
> >
> > SFOS has standard sizes for application launcher icons and Silica has
> > stock icons, whose sizes (I assume) vary by device, but how should I
> > handle custom in-app icons, e.g. a position icon in a map application,
> > so that it would look right on different pixel-density screens?
> >
> > I tried using a large PNG or SVG and having QML scale that to one of
> > the Theme.iconSize* constants, but the result of such downscaling is
> > not smooth, even when using Image's smooth=true. Additionally the QML
> > documentation says there's a possibly significant performace cost to
> > smooth scaling. This implies that I'd need different size PNGs on
> > different devices and show those 1:1 without scaling.
> >
> > So, is there some SFOS image resizing script I can run on RPM's
> > post-install to generate the right size icons from SVGs or large PNGs?
> > Or should I just roll my own solution that packs in icons of different
> > sizes and loads the closest match at runtime?
> >
>
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 21 Jul 2016 05:50:05 +0000
> From: Martin Kampas <martin.kampas at jolla.com>
> To: Marcin Mielniczuk <marmistrzmar at gmail.com>
> Cc: Sailfish OS Developers <devel at lists.sailfishos.org>
> Subject: Re: [SailfishDevel] Timeout of MerSDK and the Emulator
> Message-ID:
>         <
> 597ECB6BFD23CC488EED8B6CD7566AD232F11068 at ORD2MBX01B.mex05.mlsrvr.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Marcin,
>
> failed.log, statefs.log: both failing statefs and tmpfiles are known
> issues and shouldn't be related to this.
>
> sshd.log: according to the log you mistyped "sshd" as "ssh", but anyway
> "sshd.service" is not used, instead you should check the status of
> "sshd.socket". Also note that the config is "/etc/ssh/sshd_config_engine".
>
> If the output of `journalctl _COMM=sshd -b` was empty after trying to log
> in via SSH even with verbosity increased, then my suspicion falls on
> host/virtualbox.
>
> You could also verify with tcpdump that it did not reach the guest
> (install with `zypper in tcpdump`, run as `tcpdump -n port ssh` inside the
> MerSDK VM). And on host you can check that the ports are really occupied by
> virtualbox with `sudo ss -tpln |grep ':222[23]\>'`.
>
> I am also using Arch Linux as you (last full system upgrade on 2016-06-28)
> and it works well. Did you try reboot? :)
>
> BR,
> Martin
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://lists.sailfishos.org/pipermail/devel/attachments/20160721/b890c950/attachment.html
> >
>
> ------------------------------
>
> _______________________________________________
> Devel mailing list
> Devel at lists.sailfishos.org
> https://lists.sailfishos.org/cgi-bin/mailman/listinfo/devel
>
> End of Devel Digest, Vol 27, Issue 16
> *************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20160721/3aa4534b/attachment-0001.html>


More information about the Devel mailing list