Browse Source

Merge pull request #15170 from Chocobo1/tooltip

Add tooltip for various columns
adaptive-webui-19844
Chocobo1 3 years ago committed by GitHub
parent
commit
ee696e6f36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/gui/macutilities.mm
  2. 2
      src/gui/properties/trackerlistwidget.cpp
  3. 8
      src/webui/www/private/scripts/dynamicTable.js

4
src/gui/macutilities.mm

@ -68,14 +68,14 @@ namespace MacUtils @@ -68,14 +68,14 @@ namespace MacUtils
if (class_getInstanceMethod(delClass, shouldHandle))
{
if (class_replaceMethod(delClass, shouldHandle, (IMP)dockClickHandler, "B@:"))
if (class_replaceMethod(delClass, shouldHandle, reinterpret_cast<IMP>(dockClickHandler), "B@:"))
qDebug("Registered dock click handler (replaced original method)");
else
qWarning("Failed to replace method for dock click handler");
}
else
{
if (class_addMethod(delClass, shouldHandle, (IMP)dockClickHandler, "B@:"))
if (class_addMethod(delClass, shouldHandle, reinterpret_cast<IMP>(dockClickHandler), "B@:"))
qDebug("Registered dock click handler");
else
qWarning("Failed to register dock click handler");

2
src/gui/properties/trackerlistwidget.cpp

@ -373,6 +373,7 @@ void TrackerListWidget::loadTrackers() @@ -373,6 +373,7 @@ void TrackerListWidget::loadTrackers()
{
item = new QTreeWidgetItem();
item->setText(COL_URL, trackerURL);
item->setToolTip(COL_URL, trackerURL);
addTopLevelItem(item);
m_trackerItems[trackerURL] = item;
}
@ -400,6 +401,7 @@ void TrackerListWidget::loadTrackers() @@ -400,6 +401,7 @@ void TrackerListWidget::loadTrackers()
}
item->setText(COL_MSG, entry.message);
item->setToolTip(COL_MSG, entry.message);
item->setText(COL_PEERS, ((entry.numPeers > -1)
? QString::number(entry.numPeers)
: tr("N/A")));

8
src/webui/www/private/scripts/dynamicTable.js

@ -621,16 +621,16 @@ window.qBittorrent.DynamicTable = (function() { @@ -621,16 +621,16 @@ window.qBittorrent.DynamicTable = (function() {
let row;
if (!this.rows.has(rowId)) {
row = {};
row = {
'full_data': {},
'rowId': rowId
};
this.rows.set(rowId, row);
row['full_data'] = {};
row['rowId'] = rowId;
}
else
row = this.rows.get(rowId);
row['data'] = data;
for (const x in data)
row['full_data'][x] = data[x];
},

Loading…
Cancel
Save