mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Use system icons in the Web UI too
This commit is contained in:
parent
0b9a4e8aee
commit
b61e4363f5
7 changed files with 72 additions and 60 deletions
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue