2727 readonly property bool driverInstalledLocally: page .nvidiaDetector .driverVersion .length > 0 || page .nvidiaUpdater .currentVersion .length > 0
2828 readonly property string installedVersionLabel: page .nvidiaDetector .driverVersion .length > 0 ? page .nvidiaDetector .driverVersion : page .nvidiaUpdater .currentVersion
2929 readonly property bool catalogAvailable: page .nvidiaUpdater .latestVersion .length > 0 || page .nvidiaUpdater .availableVersions .length > 0
30+ readonly property color driverVersionStatusColor: page .nvidiaUpdater .updateAvailable
31+ ? (theme && theme .warning ? theme .warning : page .softTextColor )
32+ : page .softTextColor
3033 readonly property color bgColor: theme && theme .card ? theme .card : " #ffffff"
3134 readonly property color cardColor: theme && theme .cardStrong ? theme .cardStrong : " #f5f8ff"
3235 readonly property color borderColor: theme && theme .border ? theme .border : " #d9e1f0"
@@ -75,6 +78,21 @@ Item {
7578 return qsTr (" Driver scan pending" );
7679 }
7780
81+ function driverVersionStatusLabel () {
82+ if (page .installedVersionLabel .length > 0 && page .nvidiaUpdater .latestVersion .length > 0 ) {
83+ if (page .nvidiaUpdater .updateAvailable )
84+ return qsTr (" New version available: %1" ).arg (page .nvidiaUpdater .latestVersion );
85+ return qsTr (" Installed version is up to date." );
86+ }
87+ if (page .installedVersionLabel .length > 0 )
88+ return qsTr (" Installed version detected." );
89+ if (page .nvidiaUpdater .latestVersion .length > 0 )
90+ return qsTr (" Not installed. Latest available version: %1" ).arg (page .nvidiaUpdater .latestVersion );
91+ if (page .catalogAvailable )
92+ return qsTr (" Driver catalog loaded." );
93+ return qsTr (" Checking whether a newer driver is available..." );
94+ }
95+
7896 function closedLicenseText () {
7997 const agreement = page .nvidiaInstaller .proprietaryAgreementText || " " ;
8098 if (agreement .length > 0 )
@@ -146,7 +164,44 @@ Item {
146164 anchors .margins : 12
147165 spacing: 6
148166
149- Label { text: qsTr (" Driver Version" ); color: page .softTextColor ; font .weight : Font .DemiBold ; font .pixelSize : Math .round (12 * page .uiScale ) }
167+ RowLayout {
168+ width: parent .width
169+ spacing: 8
170+
171+ Label {
172+ Layout .fillWidth : true
173+ text: qsTr (" Driver Version" )
174+ color: page .softTextColor
175+ font .weight : Font .DemiBold
176+ font .pixelSize : Math .round (12 * page .uiScale )
177+ }
178+
179+ ToolButton {
180+ id: refreshButton
181+ implicitWidth: Math .round (34 * page .uiScale )
182+ implicitHeight: Math .round (34 * page .uiScale )
183+ enabled: ! page .nvidiaUpdater .busy && ! page .nvidiaInstaller .busy
184+ display: AbstractButton .IconOnly
185+ ToolTip .visible : hovered
186+ ToolTip .text : qsTr (" Rescan and check updates" )
187+ onClicked: page .refreshDriverState (true )
188+
189+ contentItem: Image {
190+ source: " qrc:/qt/qml/rocontrol/assets/icon-refresh.svg"
191+ sourceSize .width : Math .round (17 * page .uiScale )
192+ sourceSize .height : Math .round (17 * page .uiScale )
193+ fillMode: Image .PreserveAspectFit
194+ }
195+
196+ background: Rectangle {
197+ radius: width / 2
198+ color: refreshButton .down ? page .infoBg : page .bgColor
199+ border .width : 1
200+ border .color : page .borderColor
201+ }
202+ }
203+ }
204+
150205 Label {
151206 text: page .driverVersionMainLabel ()
152207 color: page .textColor
@@ -155,6 +210,13 @@ Item {
155210 elide: Text .ElideRight
156211 width: parent .width
157212 }
213+ Label {
214+ width: parent .width
215+ text: page .driverVersionStatusLabel ()
216+ color: page .driverVersionStatusColor
217+ wrapMode: Text .Wrap
218+ maximumLineCount: 2
219+ }
158220 }
159221 }
160222
@@ -183,11 +245,10 @@ Item {
183245 }
184246 Label {
185247 width: parent .width
186- text: page .nvidiaDetector .secureBootKnown
187- ? (page .nvidiaDetector .secureBootEnabled
188- ? qsTr (" Kernel module signing may be required." )
189- : qsTr (" No Secure Boot signing requirement detected." ))
190- : qsTr (" Secure Boot state could not be verified." )
248+ visible: page .nvidiaDetector .secureBootKnown
249+ text: page .nvidiaDetector .secureBootEnabled
250+ ? qsTr (" Kernel module signing may be required." )
251+ : qsTr (" No Secure Boot signing requirement detected." )
191252 color: page .softTextColor
192253 wrapMode: Text .Wrap
193254 maximumLineCount: 2
@@ -221,27 +282,6 @@ Item {
221282 font .pixelSize : Math .round (18 * page .uiScale )
222283 font .weight : Font .DemiBold
223284 }
224-
225- ToolButton {
226- id: refreshButton
227- implicitWidth: Math .round (38 * page .uiScale )
228- implicitHeight: Math .round (38 * page .uiScale )
229- enabled: ! page .nvidiaUpdater .busy && ! page .nvidiaInstaller .busy
230- icon .source : " qrc:/qt/qml/rocontrol/assets/icon-refresh.svg"
231- icon .width : Math .round (18 * page .uiScale )
232- icon .height : Math .round (18 * page .uiScale )
233- display: AbstractButton .IconOnly
234- ToolTip .visible : hovered
235- ToolTip .text : qsTr (" Rescan and check updates" )
236- onClicked: page .refreshDriverState (true )
237-
238- background: Rectangle {
239- radius: width / 2
240- color: refreshButton .down ? page .infoBg : page .bgColor
241- border .width : 1
242- border .color : page .borderColor
243- }
244- }
245285 }
246286
247287 Label {
0 commit comments