Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:epopov:branches:openSUSE:Factory
plasma6-nm
2001-details.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2001-details.patch of Package plasma6-nm
diff --git a/applet/contents/ui/ConnectionItem.qml b/applet/contents/ui/ConnectionItem.qml index 47214279343fb5f0db64e7527a1a79c0b319a4d9..10d4091ae46eea7bf96ee5496e80e06c4d2c83d3 100644 --- a/applet/contents/ui/ConnectionItem.qml +++ b/applet/contents/ui/ConnectionItem.qml @@ -5,18 +5,18 @@ SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Controls 2.15 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls -import org.kde.coreaddons 1.0 as KCoreAddons +import org.kde.coreaddons as KCoreAddons import org.kde.kcmutils as KCMUtils -import org.kde.kirigami 2.20 as Kirigami -import org.kde.plasma.components 3.0 as PlasmaComponents3 -import org.kde.plasma.extras 2.0 as PlasmaExtras +import org.kde.kirigami as Kirigami +import org.kde.plasma.components as PlasmaComponents3 +import org.kde.plasma.extras as PlasmaExtras import org.kde.plasma.networkmanagement as PlasmaNM -import org.kde.plasma.plasmoid 2.0 +import org.kde.plasma.plasmoid PlasmaExtras.ExpandableListItem { id: connectionItem @@ -115,16 +115,18 @@ PlasmaExtras.ExpandableListItem { implicitHeight: contentHeight position: PlasmaComponents3.TabBar.Header visible: showSpeed + onCurrentIndexChanged: { // Only if there are the two tabs. if (showSpeed) { - Plasmoid.configuration.currentDetailsTab = ["speed", "details"][currentIndex]; + Plasmoid.configuration.currentDetailsTab = ["details", "speed"][currentIndex]; } } - PlasmaComponents3.TabButton { - id: speedTabButton - text: i18n("Speed") + onVisibleChanged: { + if (!visible) { + currentIndex = 0; + } } PlasmaComponents3.TabButton { @@ -132,8 +134,13 @@ PlasmaExtras.ExpandableListItem { text: i18n("Details") } + PlasmaComponents3.TabButton { + id: speedTabButton + text: i18n("Speed") + } + Component.onCompleted: { - if (!showSpeed || Plasmoid.configuration.currentDetailsTab === "details") { + if (showSpeed && Plasmoid.configuration.currentDetailsTab === "speed") { currentIndex = 1; } } @@ -143,23 +150,12 @@ PlasmaExtras.ExpandableListItem { id: detailsTextColumn width: parent.width - visible: detailsTabBar.currentIndex === 1 + visible: detailsTabBar.currentIndex === 0 activeFocusOnTab: details.length > 0 details: ConnectionDetails Accessible.description: details.join(" ") - - Loader { - anchors.fill: parent - active: parent.activeFocus - asynchronous: true - z: -1 - - sourceComponent: PlasmaExtras.Highlight { - hovered: true - } - } } FocusScope { @@ -168,23 +164,12 @@ PlasmaExtras.ExpandableListItem { right: parent.right } height: trafficMonitorGraph.implicitHeight - visible: detailsTabBar.currentIndex === 0 + visible: detailsTabBar.currentIndex === 1 activeFocusOnTab: true Accessible.description: i18nc("@info:tooltip", "Current download speed is %1 kibibytes per second; current upload speed is %2 kibibytes per second", Math.round(rxSpeed / 1024), Math.round(txSpeed / 1024)) - Loader { - anchors.fill: parent - active: parent.activeFocus - asynchronous: true - z: -1 - - sourceComponent: PlasmaExtras.Highlight { - hovered: true - } - } - TrafficMonitor { id: trafficMonitorGraph width: parent.width diff --git a/applet/contents/ui/DetailsText.qml b/applet/contents/ui/DetailsText.qml index aa9b7eec84176975c78410c99e288eb452a155ce..ca745833ca00531a805bfa11cd7e5bcf3ff6e6f2 100644 --- a/applet/contents/ui/DetailsText.qml +++ b/applet/contents/ui/DetailsText.qml @@ -4,13 +4,13 @@ SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ -import QtQuick 2.2 -import QtQuick.Layouts 1.15 +import QtQuick +import QtQuick.Layouts -import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons -import org.kde.kirigami 2.20 as Kirigami -import org.kde.plasma.extras 2.0 as PlasmaExtras -import org.kde.plasma.components 3.0 as PlasmaComponents3 +import org.kde.kquickcontrolsaddons as KQuickControlsAddons +import org.kde.kirigami as Kirigami +import org.kde.plasma.extras as PlasmaExtras +import org.kde.plasma.components as PlasmaComponents3 MouseArea { height: detailsGrid.implicitHeight @@ -54,21 +54,22 @@ MouseArea { width: parent.width columns: 2 rowSpacing: Kirigami.Units.smallSpacing / 4 + uniformCellWidths: true Repeater { id: repeater - model: details.length + model: details PlasmaComponents3.Label { Layout.fillWidth: true readonly property bool isContent: index % 2 - elide: isContent ? Text.ElideRight : Text.ElideNone + elide: Text.ElideMiddle font: Kirigami.Theme.smallFont horizontalAlignment: isContent ? Text.AlignLeft : Text.AlignRight - text: isContent ? details[index] : `${details[index]}:` + text: isContent ? modelData : `${modelData}:` textFormat: Text.PlainText opacity: isContent ? 1 : 0.6 }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor