Skip to content

Commit

Permalink
Fix black-on-black invalid layer warning, improve error color on dark…
Browse files Browse the repository at this point in the history
… theme, fix badge spacing
  • Loading branch information
nirvn committed Jul 26, 2023
1 parent ab3afe5 commit aa8cfd6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
12 changes: 5 additions & 7 deletions src/qml/LayerTreeItemProperties.qml
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,15 @@ Popup {

Text {
id: invalidText
property var invalidIcon: Theme.getThemeVectorIcon('ic_error_outline_24dp')
property var invalidSize: fontMetrics.height - 5

visible: index !== undefined && !layerTree.data(index, FlatLayerTreeModel.IsValid)
Layout.fillWidth: true
bottomPadding: 15

wrapMode: Text.WordWrap
textFormat: Text.RichText
text: '<img src="' + invalidIcon + '" width="' + invalidSize + '" height="' + invalidSize + '"> '
+ qsTr('This layer is invalid. This might be due to a network issue, a missing file or a misconfiguration of the project.')
text: qsTr('This layer is invalid. This might be due to a network issue, a missing file or a misconfiguration of the project.')
font: Theme.tipFont
color: Theme.errorColor
}

CheckBox {
Expand Down Expand Up @@ -321,11 +319,11 @@ Popup {

visible: isReadOnly || isGeometryLocked
Layout.fillWidth: true
topPadding: 5

wrapMode: Text.WordWrap
textFormat: Text.RichText
text: '<img src="' + padlockIcon + '" width="' + padlockSize + '" height="' + padlockSize + '"> '
+ (isReadOnly ? qsTr('Read-Only Layer') : qsTr('Geometry Locked Layer'))
text: isReadOnly ? qsTr('Read-only layer') : qsTr('Geometry-locked layer')
font: Theme.tipFont
color: Theme.secondaryTextColor

Expand Down
16 changes: 8 additions & 8 deletions src/qml/Legend.qml
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ ListView {
width: rectangle.width
- itemPadding
- 46
- ( InTracking ? 34 : 0 )
- ( ( ReadOnly || GeometryLocked ) ? 34 : 0 )
- ( !IsValid ? 34 : 0 )
- (InTracking ? 29 : 0)
- ((ReadOnly || GeometryLocked) ? 29 : 0)
- (!IsValid ? 29 : 0)
padding: 3
leftPadding: 0
text: Name
Expand Down Expand Up @@ -201,7 +201,7 @@ ListView {
}

QfToolButton {
visible: ReadOnly || GeometryLocked
visible: Type === 'layer' && !IsValid
height: 24
width: 24
padding: 4
Expand All @@ -211,12 +211,12 @@ ListView {
bgcolor: 'transparent'
opacity: 0.5

icon.source: Theme.getThemeIcon( 'ic_lock_black_24dp' )
icon.color: Theme.mainTextColor
icon.source: Theme.getThemeVectorIcon('ic_error_outline_24dp' )
icon.color: Theme.errorColor
}

QfToolButton {
visible: Type === 'layer' && !IsValid
visible: ReadOnly || GeometryLocked
height: 24
width: 24
padding: 4
Expand All @@ -226,7 +226,7 @@ ListView {
bgcolor: 'transparent'
opacity: 0.5

icon.source: Theme.getThemeVectorIcon('ic_error_outline_24dp' )
icon.source: Theme.getThemeIcon( 'ic_lock_black_24dp' )
icon.color: Theme.mainTextColor
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/qml/imports/Theme/Theme.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ QtObject {
readonly property color light: "#ffffff"
readonly property color hyperlinkBlue: '#0000EE'

readonly property color errorColor: "#c0392b"
readonly property color errorColor: darkTheme ? "#df3422" : "#c0392b"
readonly property color warningColor: "orange"
readonly property color cloudColor: "#4c6dac"

Expand Down

0 comments on commit aa8cfd6

Please sign in to comment.