Add popup font color options

This commit is contained in:
sienori 2019-02-07 03:02:06 +09:00
parent ce73c60e2f
commit 0fcace8986
3 changed files with 32 additions and 0 deletions

View file

@ -150,6 +150,12 @@
"fontSizeLabel": { "fontSizeLabel": {
"message": "Font size" "message": "Font size"
}, },
"resultFontColorLabel": {
"message": "Font color of translation result"
},
"candidateFontColorLabel": {
"message": "Font color of translation candidates"
},
"bgColorLabel": { "bgColorLabel": {
"message": "Background color" "message": "Background color"
}, },

View file

@ -296,6 +296,30 @@
</div> </div>
</li> </li>
<li class="optionContainer new">
<div class=optionText>
<p class=resultFontColorLabel>翻訳結果のフォントカラー</p>
</div>
<div class=optionForm>
<label>
<input id=resultFontColor class=saveByChange type=color value="#000000">
</label>
</div>
</li>
<li class="optionContainer new">
<div class=optionText>
<p class=candidateFontColorLabel>翻訳候補のフォントカラー</p>
</div>
<div class=optionForm>
<label>
<input id=candidateFontColor class=saveByChange type=color value="#737373">
</label>
</div>
</li>
<li class=optionContainer> <li class=optionContainer>
<div class=optionText> <div class=optionText>
<p class=bgColorLabel>背景色</p> <p class=bgColorLabel>背景色</p>

View file

@ -182,6 +182,8 @@ function panelPosition(e) {
panel.style.maxWidth = S.get().width + "px"; panel.style.maxWidth = S.get().width + "px";
panel.style.maxHeight = S.get().height + "px"; panel.style.maxHeight = S.get().height + "px";
panel.style.fontSize = S.get().fontSize + "px"; panel.style.fontSize = S.get().fontSize + "px";
panel.getElementsByClassName("result")[0].style.color = S.get().resultFontColor;
panel.getElementsByClassName("candidate")[0].style.color = S.get().candidateFontColor;
panel.style.backgroundColor = S.get().bgColor; panel.style.backgroundColor = S.get().bgColor;
} }