Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Positioning of items is off #19

Closed
fredldotme opened this issue Mar 30, 2019 · 9 comments

Comments

@fredldotme
Copy link

commented Mar 30, 2019

Qt on edge now properly supports pixel density whereas the QQC2 Suru styling implementation still shows the same issue of positioning items wrongly.
Examples:

Suru style:
scaleddown_screenshot20190329_135522701

compared to Material style:
scaleddown_screenshot20190330_171444908

@bhdouglass

This comment has been minimized.

Copy link
Member

commented Mar 31, 2019

Was this an issue before pixel density was supported? Also can you provide some example code or links to the code that is giving this issue?

@fredldotme

This comment has been minimized.

Copy link
Author

commented Mar 31, 2019

This was already an issue before, yes.
I'd suggest looking at the project from the screenshot, recursive clone + clickable should get you there:

https://github.com/fredldotme/harbour-owncloud

Specifically, FileBrowser.qml and GCButton.qml:
https://github.com/fredldotme/harbour-owncloud/blob/master/src/app/qml/qqc/pages/browser/FileBrowser.qml#L481
https://github.com/fredldotme/harbour-owncloud/blob/master/src/app/qml/qqc/controls/GCButton.qml

You''ll have to revert this commit for now as Material styling doesn't expose that issue:
fredldotme/harbour-owncloud@e352321

@bhdouglass

This comment has been minimized.

Copy link
Member

commented May 6, 2019

I took a look at this today, I can see the issue happening, but I'm not sure why it only happens for Suru style. I'm not seeing any suru related elements in that GCButton. @cibersheep maybe you have an idea?

@cibersheep

This comment has been minimized.

Copy link
Collaborator

commented May 7, 2019

I'll take a look today... let's see if I can spot something

@cibersheep

This comment has been minimized.

Copy link
Collaborator

commented May 7, 2019

I need to sit down and do some tests. I want to try a couple of things:

  • Check if makes any difference to use layout.width but not using a top RowLayout (at least that I can see)
  • upgrading the versions of import modules (I'm not confident but sometimes they fix bugs)

https://doc.qt.io/qt-5/qtquicklayouts-overview.html

@cibersheep

This comment has been minimized.

Copy link
Collaborator

commented May 8, 2019

Changing Row { Column {} } by RowLayout { Column {} } makes the app behave similarly with Material and Suru styles. Looks like Row and Column are clashing with the Layouts or we have a wrong style in Suru for it

@bhdouglass

This comment has been minimized.

Copy link
Member

commented May 8, 2019

🤔 interesting. Although I didn't think we were doing anything that would effect the Row.

@cibersheep

This comment has been minimized.

Copy link
Collaborator

commented May 9, 2019

I know. I double checked that we are not doing anything to the Row in the style. I remember reading to not mess regular Row with Layouts but I honestly don't know where to look... in the package we serve in the image? We could try to compare the Row element in plain qqc2 and ours, or Android and ours...

@bhdouglass

This comment has been minimized.

Copy link
Member

commented May 9, 2019

Ok, I think I fixed it: #27
Turns out the issue was in the Label component, not the row/column

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.