Tooltip improvements
This commit is contained in:
parent
639a582804
commit
5c2700ca36
@ -439,6 +439,8 @@ body > * {
|
|||||||
justify-items: stretch;
|
justify-items: stretch;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow: 2px 2px 6px black;
|
box-shadow: 2px 2px 6px black;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tooltip-infos {
|
#tooltip-infos {
|
||||||
|
@ -609,8 +609,12 @@ export class DownloadTable extends VirtualTable {
|
|||||||
this.selection.clear();
|
this.selection.clear();
|
||||||
|
|
||||||
this.tooltip = null;
|
this.tooltip = null;
|
||||||
this.on("hover", async info => {
|
const tooltipWatcher = new PrefWatcher("tooltip", true);
|
||||||
if (!(await Prefs.get("tooltip"))) {
|
this.on("hover", info => {
|
||||||
|
if (!document.hasFocus()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!tooltipWatcher.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const item = this.downloads.filtered[info.rowid];
|
const item = this.downloads.filtered[info.rowid];
|
||||||
@ -804,6 +808,7 @@ export class DownloadTable extends VirtualTable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async openFile() {
|
async openFile() {
|
||||||
|
this.dismissTooltip();
|
||||||
const {focusRow} = this;
|
const {focusRow} = this;
|
||||||
if (focusRow < 0) {
|
if (focusRow < 0) {
|
||||||
return;
|
return;
|
||||||
@ -823,8 +828,8 @@ export class DownloadTable extends VirtualTable {
|
|||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
item.opening = false;
|
item.opening = false;
|
||||||
this.invalidateRow(focusRow);
|
this.invalidateRow(focusRow);
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user