Hi
Thanks for your replays
cover: null 
works but it has some quirks. I have an image centered in first page. When in 
cover mode, if the phone is verticall works good, if I flip the phone 
horizontally, the images goes out of the cover, like this: 
https://s16.postimg.org/ghddy6xpx/mak_hor_Xvert.png
I also noticed that a real cover has a 293x468 resolution, while a null cover, 
still shows the 720x1280 fullscreen resolution.
Unless I my code is buggy, it seems the cover: null doenst do a proper scaling 
of the  first page. 
My code looks like this


Page {    id: page        // To enable PullDownMenu, place our content in a 
SilicaFlickable   SilicaFlickable {       id: flick        anchors.fill: parent

        // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, 
SilicaListView or SilicaGridView        PullDownMenu {            MenuItem {    
            text: qsTr("About")                onClicked: 
pageStack.push(Qt.resolvedUrl("SecondPage.qml"))            }        }
        // Tell SilicaFlickable the height of its content.        
contentHeight: mainItem.height

        Item {            id: mainItem            width: flick.width //>= 
flick.height ? flick.height : flick.width            height: flick.height
            Text { //debug                id: tex                color: 
Theme.highlightColor                text: "page.width: "+page.width+ 
":page.height: "+page.height+                      "\nsilica.width: 
"+flick.width+":silica.height: "+flick.height            }
            Image {                 id: clock                 anchors.centerIn: 
parent                 width: parent.width > parent.height ? parent.height : 
parent.width                 height: width                 source: 
"../images/clock.png"                 fillMode: Image.PreserveAspectFit

.......
Have a great weekendJoão

 

    Em Sábado, 3 de Dezembro de 2016 20:25, Riku Lahtinen 
<rikul.lajo...@kiu.as> escreveu:
 

  Thanks for an answer, works perfectly! If you want to have e.g. cover actions 
on the top of the background view in cover it seems to be a little bit more 
complicated. One example of that seems to be in the app sailfish-maps. The 
example code can be explored in the folder /usr/share/sailfish-maps/cover.
  Best regards Riku
  
 02.12.2016, 10:50, Kimmo Lindholm kirjoitti:
  
 
#yiv8914946321 #yiv8914946321 -- _filtered #yiv8914946321 
{font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv8914946321 
{panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv8914946321 
{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv8914946321 
{font-family:Consolas;panose-1:2 11 6 9 2 2 4 3 2 4;}#yiv8914946321 
#yiv8914946321 p.yiv8914946321MsoNormal, #yiv8914946321 
li.yiv8914946321MsoNormal, #yiv8914946321 div.yiv8914946321MsoNormal 
{margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}#yiv8914946321 a:link, 
#yiv8914946321 span.yiv8914946321MsoHyperlink 
{color:blue;text-decoration:underline;}#yiv8914946321 a:visited, #yiv8914946321 
span.yiv8914946321MsoHyperlinkFollowed 
{color:purple;text-decoration:underline;}#yiv8914946321 pre 
{margin:0cm;margin-bottom:.0001pt;font-size:10.0pt;}#yiv8914946321 
p.yiv8914946321msonormal0, #yiv8914946321 li.yiv8914946321msonormal0, 
#yiv8914946321 div.yiv8914946321msonormal0 
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}#yiv8914946321 
span.yiv8914946321HTMLPreformattedChar {font-family:Consolas;}#yiv8914946321 
span.yiv8914946321EmailStyle20 {color:windowtext;}#yiv8914946321 
.yiv8914946321MsoChpDefault {font-size:10.0pt;} _filtered #yiv8914946321 
{margin:70.85pt 2.0cm 70.85pt 2.0cm;}#yiv8914946321 
div.yiv8914946321WordSection1 {}#yiv8914946321  cover: null       From: Devel 
[mailto:devel-boun...@lists.sailfishos.org] On Behalf Of joao morgado
 Sent: 2. joulukuuta 2016 4:05
 To: devel@lists.sailfishos.org
 Subject: [SailfishDevel] How to make cover display the firstPage scaled        
Hi sailors        My app UI is very simple, basically is just a timer clock, so 
the cover should look the same but scaled to fit Cover's size.   Afaik, android 
apps have the same behaviour, the cover is just a scaled down display of the 
app fullscrean display.   The following code works but doenst scale the 
content:       initialPage: Component { FirstPage { } } cover: initialPage 
//Qt.resolvedUrl("cover/CoverPage.qml")       So any ideias how to solve this ? 
   Thanks João    
  
 _______________________________________________
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

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

Reply via email to