PluginsTab: elide urls, move trash icon to the left of toggle

This commit is contained in:
Ly-sec
2025-12-09 20:43:12 +01:00
parent 56ce95630d
commit a6c09ac7d2
+13 -10
View File
@@ -285,17 +285,20 @@ ColumnLayout {
ColumnLayout {
spacing: Style.marginS
Layout.fillWidth: true
NText {
text: modelData.name
font.weight: Font.Medium
color: Color.mOnSurface
Layout.fillWidth: true
}
NText {
text: modelData.url
font.pointSize: Style.fontSizeS
color: Color.mOnSurfaceVariant
Layout.fillWidth: true
}
}
@@ -303,6 +306,16 @@ ColumnLayout {
Layout.fillWidth: true
}
NIconButton {
icon: "trash"
tooltipText: I18n.tr("settings.plugins.sources.remove.tooltip")
visible: index !== 0 // Cannot remove official source
baseSize: Style.baseWidgetSize * 0.7
onClicked: {
PluginRegistry.removePluginSource(modelData.url);
}
}
// Enable/Disable a source
NToggle {
checked: modelData.enabled !== false // Default to true if not set
@@ -313,16 +326,6 @@ ColumnLayout {
ToastService.showNotice(I18n.tr("settings.plugins.refresh.refreshing"));
}
}
NIconButton {
icon: "trash"
tooltipText: I18n.tr("settings.plugins.sources.remove.tooltip")
visible: index !== 0 // Cannot remove official source
baseSize: Style.baseWidgetSize * 0.7
onClicked: {
PluginRegistry.removePluginSource(modelData.url);
}
}
}
}