forked from qt-creator/qt-creator
QmlDesigner: Ensure item library content is visible
Make sure the ScrollView content area is visible after content size changes. Fixes: QDS-3795 Change-Id: I1f7408db9ad318a5c54b5186569dd04235a3d952 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -87,6 +87,12 @@ ScrollView {
|
|||||||
itemContextMenu.close()
|
itemContextMenu.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onContentHeightChanged: {
|
||||||
|
var maxPosition = Math.max(contentHeight - height, 0)
|
||||||
|
if (contentY > maxPosition)
|
||||||
|
contentY = maxPosition
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: styleConstants
|
id: styleConstants
|
||||||
property int textWidth: 58
|
property int textWidth: 58
|
||||||
|
Reference in New Issue
Block a user