mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 23:17:21 -06:00
Use system icons in the Web UI too
This commit is contained in:
@@ -217,9 +217,11 @@ void HttpConnection::respond() {
|
||||
} else {
|
||||
if(list[1] == "preferences") {
|
||||
respondPreferencesJson();
|
||||
return;
|
||||
} else {
|
||||
if(list[1] == "transferInfo") {
|
||||
respondGlobalTransferInfoJson();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -233,14 +235,21 @@ void HttpConnection::respond() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (list[0] == "images") {
|
||||
list[0] = "Icons";
|
||||
// Icons from theme
|
||||
qDebug() << "list[0]" << list[0];
|
||||
if(list[0] == "theme" && list.size() == 2) {
|
||||
url = misc::getIconPath(list[1]);
|
||||
qDebug() << "There icon:" << url;
|
||||
} else {
|
||||
if(list.last().endsWith(".html"))
|
||||
list.prepend("html");
|
||||
list.prepend("webui");
|
||||
if (list[0] == "images") {
|
||||
list[0] = "Icons";
|
||||
} else {
|
||||
if(list.last().endsWith(".html"))
|
||||
list.prepend("html");
|
||||
list.prepend("webui");
|
||||
}
|
||||
url = ":/" + list.join("/");
|
||||
}
|
||||
url = ":/" + list.join("/");
|
||||
QFile file(url);
|
||||
if(!file.open(QIODevice::ReadOnly))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user