mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Set the foreground color as well as the background color for the reference mode popup. Makes it legibile even when the user specifies a different color theme for the viewer.
This commit is contained in:
parent
4d6eaedfb4
commit
32b00774da
@ -11,7 +11,7 @@ var reference_last_highlighted_para = null;
|
|||||||
function show_reference_panel(ref) {
|
function show_reference_panel(ref) {
|
||||||
panel = $("#calibre_reference_panel");
|
panel = $("#calibre_reference_panel");
|
||||||
if (panel.length < 1) {
|
if (panel.length < 1) {
|
||||||
$(document.body).append('<div id="calibre_reference_panel" style="top:20px; left:20px; padding-left:30px; padding-right:30px; font:monospace normal;text-align:center; z-index:10000; background: beige; border:red ridge 2px; position:absolute;"><h5>Paragraph</h5><p style="text-indent:0pt">None</p></div>')
|
$(document.body).append('<div id="calibre_reference_panel" style="top:20px; left:20px; padding-left:30px; padding-right:30px; font:monospace normal;text-align:center; z-index:10000; background: beige; border:red ridge 2px; position:absolute; color: black"><h5>Paragraph</h5><p style="text-indent:0pt">None</p></div>');
|
||||||
panel = $("#calibre_reference_panel");
|
panel = $("#calibre_reference_panel");
|
||||||
}
|
}
|
||||||
$("> p", panel).text(ref);
|
$("> p", panel).text(ref);
|
||||||
@ -47,7 +47,7 @@ function leave_reference_mode() {
|
|||||||
$("p").unbind("mouseenter mouseleave", toggle_reference);
|
$("p").unbind("mouseenter mouseleave", toggle_reference);
|
||||||
panel = $("#calibre_reference_panel");
|
panel = $("#calibre_reference_panel");
|
||||||
if (panel.length > 0) panel.hide();
|
if (panel.length > 0) panel.hide();
|
||||||
if (reference_last_highlighted_para != null)
|
if (reference_last_highlighted_para !== null)
|
||||||
reference_last_highlighted_para.css({backgroundColor:reference_old_bgcol});
|
reference_last_highlighted_para.css({backgroundColor:reference_old_bgcol});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ function goto_reference(ref) {
|
|||||||
window.paged_display.scroll_to_xpos(xpos, true, true, 1000);
|
window.paged_display.scroll_to_xpos(xpos, true, true, 1000);
|
||||||
} else
|
} else
|
||||||
$.scrollTo(dest, 1000,
|
$.scrollTo(dest, 1000,
|
||||||
{onAfter:function(){window.py_bridge.animated_scroll_done()}});
|
{onAfter:function(){window.py_bridge.animated_scroll_done();}});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user