将空格上的文字换成图片

This commit is contained in:
zhaokexin 2023-02-09 10:26:46 +08:00 committed by hanteng
parent 9091b53368
commit 3b487e4696
4 changed files with 15 additions and 4 deletions

10
img/space.svg Normal file
View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_4865_191511)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M20 10V13H4V10C4 9.45 3.55 9 3 9C2.45 9 2 9.45 2 10V14C2 14.55 2.45 15 3 15H21C21.55 15 22 14.55 22 14V10C22 9.45 21.55 9 21 9C20.45 9 20 9.45 20 10Z" fill="#1D1D1D"/>
</g>
<defs>
<clipPath id="clip0_4865_191511">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 470 B

View File

@ -40,5 +40,6 @@
<file>img/upfloat.svg</file>
<file>img/downfloat.svg</file>
<file>qml/DragBar.qml</file>
<file>img/space.svg</file>
</qresource>
</RCC>

View File

@ -35,7 +35,7 @@ function getKeyCode(keyName){
"right": 0xff53,
"down": 0xff54,
"del": 0xff9f,
"┗━┛": 0x0020, //space
"space": 0x0020,
"f1": 0xffbe,
"f2": 0xffbf,
"f3": 0xffc0,

View File

@ -1,5 +1,5 @@
CharKey{
label: "┗━┛"
shiftedText: "┗━┛"
ActionKey {
width: virtualKeyboard.spaceKeyWidth
label: "space"
actionKeyImgPath: "qrc:/img/space.svg"
}