forked from qt-creator/qt-creator
QmlDesigner: Fix issues panel word wrap
Change-Id: I392985ed7a2a47a0414ea4f4094f7c0ce4fba955 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
9c0d0e4a6b
commit
61487090ed
@@ -11,7 +11,7 @@ import StudioTheme as StudioTheme
|
|||||||
import OutputPane
|
import OutputPane
|
||||||
|
|
||||||
ScrollView {
|
ScrollView {
|
||||||
id: issuesPanel
|
id: root
|
||||||
|
|
||||||
signal showCodeViewSignal
|
signal showCodeViewSignal
|
||||||
|
|
||||||
@@ -23,12 +23,12 @@ ScrollView {
|
|||||||
ScrollBar.vertical: StudioControls.TransientScrollBar {
|
ScrollBar.vertical: StudioControls.TransientScrollBar {
|
||||||
id: verticalScrollBar
|
id: verticalScrollBar
|
||||||
style: StudioTheme.Values.viewStyle
|
style: StudioTheme.Values.viewStyle
|
||||||
parent: issuesPanel
|
parent: root
|
||||||
x: issuesPanel.width - verticalScrollBar.width
|
x: root.width - verticalScrollBar.width
|
||||||
y: 0
|
y: 0
|
||||||
height: issuesPanel.availableHeight
|
height: root.availableHeight
|
||||||
orientation: Qt.Vertical
|
orientation: Qt.Vertical
|
||||||
show: (issuesPanel.hovered || issuesPanel.focus) && verticalScrollBar.isNeeded
|
show: (root.hovered || root.focus) && verticalScrollBar.isNeeded
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -37,46 +37,58 @@ ScrollView {
|
|||||||
|
|
||||||
model: MessageModel { id: messageModel }
|
model: MessageModel { id: messageModel }
|
||||||
|
|
||||||
delegate: RowLayout {
|
delegate: Row {
|
||||||
spacing: 10
|
id: row
|
||||||
|
|
||||||
required property int index
|
required property int index
|
||||||
required property string message
|
required property string message
|
||||||
required property string location
|
required property string location
|
||||||
required property string type
|
required property string type
|
||||||
|
|
||||||
|
width: root.width
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
id: labelIcon
|
||||||
font.family: StudioTheme.Constants.iconFont.family
|
font.family: StudioTheme.Constants.iconFont.family
|
||||||
font.pixelSize: StudioTheme.Values.baseIconFontSize
|
font.pixelSize: StudioTheme.Values.baseIconFontSize
|
||||||
color: (type == "Warning") ? StudioTheme.Values.themeAmberLight
|
color: (type == "Warning") ? StudioTheme.Values.themeAmberLight
|
||||||
: StudioTheme.Values.themeRedLight
|
: StudioTheme.Values.themeRedLight
|
||||||
text: (type == "Warning") ? StudioTheme.Constants.warning2_medium
|
text: (type == "Warning") ? StudioTheme.Constants.warning2_medium
|
||||||
: StudioTheme.Constants.error_medium
|
: StudioTheme.Constants.error_medium
|
||||||
|
width: 18
|
||||||
|
height: 18
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
id: labelLocation
|
||||||
text: location
|
text: location
|
||||||
color: "#57b9fc"
|
color: "#57b9fc"
|
||||||
font.pixelSize: 12
|
font.pixelSize: StudioTheme.Values.baseFontSize
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
Layout.preferredHeight: 18
|
font.underline: mouseArea.containsMouse
|
||||||
font.underline: mouseArea.containsMouse ? true : false
|
height: 18
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: mouseArea.containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: mouseArea.containsMouse ? Qt.PointingHandCursor
|
||||||
|
: Qt.ArrowCursor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
id: labelInfo
|
||||||
color: (type == "Warning") ? StudioTheme.Values.themeAmberLight
|
color: (type == "Warning") ? StudioTheme.Values.themeAmberLight
|
||||||
: StudioTheme.Values.themeRedLight
|
: StudioTheme.Values.themeRedLight
|
||||||
text: message
|
text: message
|
||||||
font.pixelSize: StudioTheme.Values.baseFontSize
|
font.pixelSize: StudioTheme.Values.baseFontSize
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignTop
|
||||||
Layout.preferredHeight: 18
|
wrapMode: Text.WordWrap
|
||||||
|
width: row.width - labelIcon.width - labelLocation.width - row.spacing * 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -43,8 +43,6 @@ ScrollView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: clayout
|
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: parentList
|
id: parentList
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user