aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorMahmoud Badri <mahmoud.badri@qt.io>2021-12-08 14:29:51 +0200
committerMahmoud Badri <mahmoud.badri@qt.io>2021-12-08 19:03:01 +0000
commit5453c539b50cfbea817a0b3979b86731bd6c394f (patch)
tree59693f56063296bdee166450d8f7d7ce130152cb /share
parentd22a6a66fd0a82a6fc96b75e7232f7428cbc5abe (diff)
QmlDesigner: Remove flexible width from Component Library items
...so that resizing the view doesn't cause sluggish animation to the items. Also removed an unnecessary top padding from the horizontal lib to avoid a slight vertical jump when switching between the 2 layouts. Change-Id: I0af75db885398dc93fc234d760156a55042f59d0 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml10
1 files changed, 4 insertions, 6 deletions
diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml
index 034d460d8f..f37a0e05d0 100644
--- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml
+++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml
@@ -266,8 +266,7 @@ Item {
Grid {
id: itemGrid
- property real actualWidth: parent.width - itemGrid.leftPadding -itemGrid.rightPadding
- property int flexibleWidth: (itemGrid.actualWidth / columns) - styleConstants.cellWidth
+ property real actualWidth: parent.width - itemGrid.leftPadding - itemGrid.rightPadding
leftPadding: 6
rightPadding: 6
@@ -280,7 +279,7 @@ Item {
visible: itemVisible
textColor: importUnimported ? StudioTheme.Values.themeUnimportedModuleColor
: StudioTheme.Values.themeTextColor
- width: styleConstants.cellWidth + itemGrid.flexibleWidth
+ width: styleConstants.cellWidth
height: styleConstants.cellHeight
onShowContextMenu: {
if (!itemUsable) {
@@ -304,7 +303,7 @@ Item {
id: horizontalView
Row {
- padding: 5
+ leftPadding: 5
ScrollView {
id: horizontalScrollView
@@ -421,7 +420,6 @@ Item {
Grid {
id: hItemGrid
property real actualWidth: itemsView.width - 294
- property int flexibleWidth: (hItemGrid.actualWidth / hItemGrid.columns) - styleConstants.cellWidth
leftPadding: 9
rightPadding: 9
@@ -435,7 +433,7 @@ Item {
visible: itemVisible
textColor: itemLibraryModel.importUnimportedSelected
? StudioTheme.Values.themeUnimportedModuleColor : StudioTheme.Values.themeTextColor
- width: styleConstants.cellWidth + hItemGrid.flexibleWidth
+ width: styleConstants.cellWidth
height: styleConstants.cellHeight
onShowContextMenu: {
if (!itemUsable) {