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;
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() {
if($('#fonts').hasClass('hide')) {
postMessage(['sendSinmpleIpc', 'fonts'], '*')
$('#fonts').removeClass('hide')
} else {
$('#fonts').addClass('hide')
}
}
function fontList(arg) {
$('#fonts').removeClass('hide')
@ -517,6 +522,7 @@ function fontList(arg) {
}
}
function insertFont(name) {
$('#fonts').addClass('hide')
$('#font').val(name)
}
function copyColor(from, to) {

View File

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