Skip to content

Commit

Permalink
Refs #21818: Show complete name for single topic graphs
Browse files Browse the repository at this point in the history
Signed-off-by: Carlosespicur <[email protected]>
  • Loading branch information
Carlosespicur committed Nov 20, 2024
1 parent 457139f commit 4b27305
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions qml/DomainGraphLayout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Item
readonly property int elements_spacing_: 5
readonly property int containers_spacing_: 100
readonly property int topic_tag_size_: 150
readonly property int topic_tag_margin_: 30
readonly property int max_topic_name_size_: 100
readonly property int endpoint_height_: 30
readonly property int first_indentation_: 5
Expand Down Expand Up @@ -230,20 +231,20 @@ Item
Rectangle
{
id: topic_tag
implicitWidth: topic_tag_size_
height: label_height_
color: parent.even_position ? topic_color_ : topic_color2_
radius: radius_
y: !parent.even_position ? topicsList.yOffset : 0
property int textFullWidth: text_metrics.width
implicitWidth: topicsList.count > 1 ? topic_tag_size_ : Math.max(topic_tag_label.width + topic_tag_margin_, topic_tag_size_)

Label {
id: topic_tag_label
anchors.centerIn: parent
text: modelData["alias"]
Layout.rightMargin: 2* first_indentation_
color: "white"
width: max_topic_name_size_
width: topicsList.count > 1 ? max_topic_name_size_ : text.width
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
}
Expand Down

0 comments on commit 4b27305

Please sign in to comment.