Active Topics

 


Reply
Thread Tools
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#1
Hi.
Maybe someone can explain me what the problem and why option "rotated" using only last parameter...
For example I wanted to use it in spacing block, like this:
Code:
Item {
     width: parent.width
     height: Screen.sizeCategory < Screen.Large ? Theme.paddingLarge*6 : (rotated ? Theme.paddingLarge*6 : Theme.paddingLarge*18)
     }
On my tablet it should use Theme.paddingLarge*6 in landscape and Theme.paddingLarge*18 in portrait mode. But for some reasons it use only Theme.paddingLarge*18 in both rotations...

Can someone explain me what the problem here?

The whole code is here: http://pastebin.com/YsyP6j6A
Thanks
 
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, España
#2
Hey Schturman, I won't pretend to know quite what you're asking, but from playing with other files, I have noted that changing Large for Small where " < Screen.Large ? Theme.padding" is written has an effect. ...or maybe change to Screen.Medium instead of .Small........as you know, I tinker!, so above suggestions may not help at all!
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#3
Originally Posted by Markkyboy View Post
Hey Schturman, I won't pretend to know quite what you're asking, but from playing with other files, I have noted that changing Large for Small where " < Screen.Large ? Theme.padding" is written has an effect. ...or maybe change to Screen.Medium instead of .Small........as you know, I tinker!, so above suggestions may not help at all!
Hmm, I thought the tablet recognized as Screen.Large. Thanks for tip, I will try...
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#4
use page.isPortrait instead. Lipstick.compositor is working only inside Lipstick compositor windows (homescreen)
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following 4 Users Say Thank You to coderus For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#5
Originally Posted by coderus View Post
use page.isPortrait instead. Lipstick.compositor is working only inside Lipstick compositor windows (homescreen)
Thanks for explanation Coderus, it should look like this ?:
Code:
Item {
     width: parent.width
     height: Screen.sizeCategory < Screen.Large ? Theme.paddingLarge*6 : (page.isPortrait ? Theme.paddingLarge*6 : Theme.paddingLarge*18)
     }
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#6
seems so, try yourself and check
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#7
Originally Posted by coderus View Post
seems so, try yourself and check
Thanks, will do it. I'm not near pc now, will test it later and will report.
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#8
coderus, it work perfectly. I learned something new
Thank you very much.
 

The Following User Says Thank You to Schturman For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#9
well, you can always start learning a normal way: https://sailfishos.org/develop/docs/...lica-all.html/
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following 3 Users Say Thank You to coderus For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#10
Originally Posted by coderus View Post
well, you can always start learning a normal way: https://sailfishos.org/develop/docs/...lica-all.html/
Coderus, I'm trying to do the same with column, when whole qml file is column, started with:
Code:
Column {
id: mycolumn
I'm tried to change page.isPortrait to mycolumn.isPortrait, but it not work... It use only last parameter (-Theme.paddingLarge), for example:
Code:
height: mycolumn.isPortrait ? Theme.paddingLarge*9 : -Theme.paddingLarge
Tried to read here about Page and Coumn (https://sailfishos.org/develop/docs/...lumnview.html/), but didn't found answer to my question.

Can you suggest something ?
Thanks
 
Reply


 
Forum Jump


All times are GMT. The time now is 12:37.