Skip to content

Commit

Permalink
Add support for website links
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnet committed May 7, 2021
1 parent 86cf72b commit 4a039b7
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
rpi-imager (1.6.2) unstable; urgency=medium

* Add website link support
* Add CLI support

-- Floris Bos <[email protected]> Fri, 07 May 2021 13:19:19 +0200

rpi-imager (1.6.1) unstable; urgency=medium

* When saving advanced options delay modifying files
Expand Down
Binary file added icons/ic_info_12px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/ic_info_16px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 13 additions & 3 deletions main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ ApplicationWindow {
name: qsTr("Back")
description: qsTr("Go back to main menu")
tooltip: ""
website: ""
}
}

Expand Down Expand Up @@ -414,6 +415,7 @@ ApplicationWindow {
name: qsTr("Erase")
description: qsTr("Format card as FAT32")
tooltip: ""
website: ""
}

ListElement {
Expand Down Expand Up @@ -479,8 +481,11 @@ ApplicationWindow {
font.family: roboto.name
textFormat: Text.RichText
text: {
var txt = "<p style='margin-bottom: 5px;'><b>"+name+"</b></p>"
txt += "<font color='#1a1a1a'>"+description+"</font><font style='font-weight: 200' color='#646464'>"
var txt = "<p style='margin-bottom: 5px; font-weight: bold;'>"+name
if (typeof(website) == "string" && website) {
txt += " &nbsp; <a href='"+website+"'> <img src='icons/ic_info_16px.png' align='top'></a>"
}
txt += "</p><font color='#1a1a1a'>"+description+"</font><font style='font-weight: 200' color='#646464'>"
if (typeof(release_date) == "string" && release_date)
txt += "<br>"+qsTr("Released: %1").arg(release_date)
if (typeof(url) == "string" && url != "" && url != "internal://format") {
Expand All @@ -496,6 +501,7 @@ ApplicationWindow {

return txt;
}
id: osText

/*
Accessible.role: Accessible.ListItem
Expand Down Expand Up @@ -538,7 +544,11 @@ ApplicationWindow {
}

onClicked: {
selectOSitem(model)
if (osText.hoveredLink) {
Qt.openUrlExternally(osText.hoveredLink)
} else {
selectOSitem(model)
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@
<file>countries.txt</file>
<file>timezones.txt</file>
<file>UseSavedSettingsPopup.qml</file>
<file>icons/ic_info_16px.png</file>
<file>icons/ic_info_12px.png</file>
</qresource>
</RCC>

0 comments on commit 4a039b7

Please sign in to comment.