aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2021-03-08 18:28:26 +0200
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2021-03-09 10:53:12 +0000
commit2de66272e87bc71ac0793df9f652fe8ec3211894 (patch)
tree3ca7d7d5d592debf2b07799bf2c6d30e7771e631
parentaf41cca569d22d6f7255408f484637e03ff12a33 (diff)
QmlDesigner: Fix item library header
Title text of tab buttons no longer overlaps the plus sign. Fixes: QDS-3842 Change-Id: Iec51ebf00e6f719eac8b7204634ae8dc7696939a Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml42
1 files changed, 26 insertions, 16 deletions
diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml
index 12052d2a3c..da2e18ff87 100644
--- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml
+++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml
@@ -66,25 +66,33 @@ Item {
{title: qsTr("Assets"), addToolTip: qsTr("Add new assets to project.")}]
TabButton {
- contentItem: Text { // TabButton text
- text: modelData.title
- font.pixelSize: 13
- font.bold: true
- color: tabBar.currentIndex === index ? "#0094ce" : "#dadada"
- anchors.bottomMargin: 2
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignBottom
- elide: Text.ElideRight
- }
+ topPadding: 4
+ bottomPadding: 4
+ contentItem: Item {
+ implicitHeight: plusButton.height
+
+ Text { // TabButton text
+ text: modelData.title
+ font.pixelSize: 13
+ font.bold: true
+ color: tabBar.currentIndex === index ? "#0094ce" : "#dadada"
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.right: plusButton.left
+ anchors.bottomMargin: 2
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignBottom
+ elide: Text.ElideRight
+ }
- background: Item { // TabButton background
Rectangle { // + button
+ id: plusButton
anchors.right: parent.right
- anchors.bottom: parent.bottom
- anchors.rightMargin: 2
- anchors.bottomMargin: 2
- width: 25
- height: 25
+ anchors.top: parent.top
+ anchors.topMargin: 1
+ width: 24
+ height: 24
color: mouseArea.containsMouse ? "#353535" : "#262626"
ToolTip.delay: 500
@@ -109,7 +117,9 @@ Item {
: rootView.handleAddAsset()
}
}
+ }
+ background: Item { // TabButton background
Rectangle { // bottom strip
anchors.bottom: parent.bottom
width: parent.width