summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authorKlemen Košir <klemen.kosir@kream.io>2018-10-02 23:27:59 +0900
committerKlemen Košir <klemen.kosir@kream.io>2018-10-02 23:27:59 +0900
commit99a231a7738c712090a3ca3a088e3a1b22af5fea (patch)
tree332c335dd845d53db49a3740ed548d615445776c /ext/bg/js
parent39cf302eefe1b3bc19e4a91c222872b322426354 (diff)
Add horizontal popup offset
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/options.js3
-rw-r--r--ext/bg/js/settings.js6
2 files changed, 6 insertions, 3 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 373a1a6b..b5e1a27d 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -192,7 +192,8 @@ function optionsSetDefaults(options) {
showAdvanced: false,
popupWidth: 400,
popupHeight: 250,
- popupOffset: 10,
+ popupHorizontalOffset: 0,
+ popupVerticalOffset: 10,
showGuide: true,
compactTags: false,
compactGlossaries: false,
diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js
index 7bc6a651..b5c733e2 100644
--- a/ext/bg/js/settings.js
+++ b/ext/bg/js/settings.js
@@ -33,7 +33,8 @@ async function formRead() {
optionsNew.general.maxResults = parseInt($('#max-displayed-results').val(), 10);
optionsNew.general.popupWidth = parseInt($('#popup-width').val(), 10);
optionsNew.general.popupHeight = parseInt($('#popup-height').val(), 10);
- optionsNew.general.popupOffset = parseInt($('#popup-offset').val(), 10);
+ optionsNew.general.popupHorizontalOffset = parseInt($('#popup-horizontal-offset').val(), 0);
+ optionsNew.general.popupVerticalOffset = parseInt($('#popup-vertical-offset').val(), 10);
optionsNew.scanning.middleMouse = $('#middle-mouse-button-scan').prop('checked');
optionsNew.scanning.selectText = $('#select-matched-text').prop('checked');
@@ -163,7 +164,8 @@ async function onReady() {
$('#max-displayed-results').val(options.general.maxResults);
$('#popup-width').val(options.general.popupWidth);
$('#popup-height').val(options.general.popupHeight);
- $('#popup-offset').val(options.general.popupOffset);
+ $('#popup-horizontal-offset').val(options.general.popupHorizontalOffset);
+ $('#popup-vertical-offset').val(options.general.popupVerticalOffset);
$('#middle-mouse-button-scan').prop('checked', options.scanning.middleMouse);
$('#select-matched-text').prop('checked', options.scanning.selectText);