summaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
authorAlex Yatskov <FooSoft@users.noreply.github.com>2019-05-19 17:43:31 -0700
committerGitHub <noreply@github.com>2019-05-19 17:43:31 -0700
commit84b990cd804185c24629de0ce9694aa3dbc03c29 (patch)
tree6915bb4df3a7b1838c1f06aee8c0e94931edfd4c /ext/bg
parent61d1168d94a7467be6e98afc375d7583c0f23cb5 (diff)
parent99a231a7738c712090a3ca3a088e3a1b22af5fea (diff)
Merge pull request #140 from KarboniteKream/horizontal-offset
Add horizontal popup offset
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/js/options.js3
-rw-r--r--ext/bg/js/settings.js6
-rw-r--r--ext/bg/settings.html7
3 files changed, 11 insertions, 5 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index f1e02e18..bad56db6 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -193,7 +193,8 @@ function optionsSetDefaults(options) {
popupDisplayMode: 'default',
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 49bf264d..60a1886b 100644
--- a/ext/bg/js/settings.js
+++ b/ext/bg/js/settings.js
@@ -34,7 +34,8 @@ async function formRead() {
optionsNew.general.popupDisplayMode = $('#popup-display-mode').val();
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.touchInputEnabled = $('#touch-input-enabled').prop('checked');
@@ -166,7 +167,8 @@ async function onReady() {
$('#popup-display-mode').val(options.general.popupDisplayMode);
$('#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);
$('#touch-input-enabled').prop('checked', options.scanning.touchInputEnabled);
diff --git a/ext/bg/settings.html b/ext/bg/settings.html
index d41d442b..1b4e5c84 100644
--- a/ext/bg/settings.html
+++ b/ext/bg/settings.html
@@ -117,8 +117,11 @@
</div>
<div class="form-group options-advanced">
- <label for="popup-offset">Popup offset (in pixels)</label>
- <input type="number" min="0" id="popup-offset" class="form-control">
+ <label>Popup offset (horizontal, vertical; in pixels)</label>
+ <div class="row">
+ <div class="col-xs-6"><input type="number" min="0" id="popup-horizontal-offset" class="form-control"></div>
+ <div class="col-xs-6"><input type="number" min="0" id="popup-vertical-offset" class="form-control"></div>
+ </div>
</div>
</div>