font select

This commit is contained in:
cutls 2021-04-18 18:47:30 +09:00
parent 7db8989cd8
commit 5de0ede4e1
3 changed files with 18 additions and 5 deletions

View File

@ -720,3 +720,12 @@ button {
position: relative; position: relative;
top: -4px; top: -4px;
} }
#fonts {
overflow-y: scroll;
width: 22rem;
height: 40rem;
position: absolute;
background-color: var(--bg);
z-index: 2;
padding: 5px;
}

View File

@ -507,7 +507,12 @@ function savefolder() {
} }
function font() { function font() {
postMessage(['sendSinmpleIpc', 'fonts'], '*') if($('#fonts').hasClass('hide')) {
postMessage(['sendSinmpleIpc', 'fonts'], '*')
$('#fonts').removeClass('hide')
} else {
$('#fonts').addClass('hide')
}
} }
function fontList(arg) { function fontList(arg) {
$('#fonts').removeClass('hide') $('#fonts').removeClass('hide')
@ -517,6 +522,7 @@ function fontList(arg) {
} }
} }
function insertFont(name) { function insertFont(name) {
$('#fonts').addClass('hide')
$('#font').val(name) $('#font').val(name)
} }
function copyColor(from, to) { function copyColor(from, to) {

View File

@ -103,12 +103,10 @@
</div> </div>
<h5>@@font@@</h5> <h5>@@font@@</h5>
@@fontwarn@@<br> @@fontwarn@@<br>
<button class="btn waves-effect" style="width:7.7rem;" onclick="font()">@@select@@</button><br> <button class="btn waves-effect orange darken-2" style="width:7.7rem;" onclick="font()">@@select@@</button>
<div id="fonts" class="hide" style="overflow-y:scroll; width:22rem; height:40rem;"></div>
<br>
<input type="text" style="width:11.5rem" id="font"> <input type="text" style="width:11.5rem" id="font">
<button class="btn waves-effect" style="width:7.7rem;" onclick="settings()">@@set@@</button> <button class="btn waves-effect" style="width:7.7rem;" onclick="settings()">@@set@@</button>
<br> <div id="fonts" class="hide"></div>
<h5>@@savefolder@@</h5> <h5>@@savefolder@@</h5>
@@savefolderwarn@@<br> @@savefolderwarn@@<br>
<button class="btn waves-effect" style="width:7.7rem;" onclick="savefolder()">@@change@@</button> <button class="btn waves-effect" style="width:7.7rem;" onclick="savefolder()">@@change@@</button>