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

scale property does not work with anchors.centerIn: parent #428

Open
roe85 opened this issue Mar 10, 2018 · 3 comments
Open

scale property does not work with anchors.centerIn: parent #428

roe85 opened this issue Mar 10, 2018 · 3 comments

Comments

@roe85
Copy link

roe85 commented Mar 10, 2018

When a Item is scaled, a child element does not adhere to its new center when placed with anchors.centerIn: parent:

import QtQuick 2.0

Rectangle {
  width: 500; height: 200
  color: "lightgray"
  scale: 2
  Text {
    id: helloText
    text: "Hello world!"
    anchors.centerIn: parent
    font.pointSize: 24; font.bold: true;
  }
}

The position of the text is independent of the parent's scale property. In regular QML this does work.

@ChALkeR
Copy link
Member

ChALkeR commented Mar 10, 2018

@roe85 This testcase seems to work for me on current master.

@roe85
Copy link
Author

roe85 commented Mar 10, 2018

I can reproduce it here: https://qmlweb.github.io/

@ChALkeR
Copy link
Member

ChALkeR commented Mar 10, 2018

@roe85 The demo website uses version 0.2.0.

See instructions here or here (last option) to build QmlWeb from the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants