diff --git a/Release b/Release
index b0aec664..56a27e93 100644
--- a/Release
+++ b/Release
@@ -1 +1 @@
-20250122
+20250124
diff --git a/images/keymap_volutar.png b/images/keymap_volutar.png
new file mode 100644
index 00000000..6b94677c
Binary files /dev/null and b/images/keymap_volutar.png differ
diff --git a/src/version.h b/src/version.h
index 83f91853..11994a62 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define VERSION 0.6.20250122
+#define VERSION 0.6.20250124
diff --git a/src/vkeyboard.cpp b/src/vkeyboard.cpp
index 1e5daf97..6b8e5be9 100644
--- a/src/vkeyboard.cpp
+++ b/src/vkeyboard.cpp
@@ -17,7 +17,7 @@ keyWindow::keyWindow(QWidget* p):QDialog(p) {
kb = NULL;
xent.key = ENDKEY;
memset(xent.zxKey, 0, 8);
- QPixmap pxm(":/images/keymap.png");
+ QPixmap pxm(":/images/keymap_volutar.png");
setModal(false);
setWindowModality(Qt::NonModal);
setFixedSize(pxm.size());
@@ -46,25 +46,30 @@ void keyWindow::rall(Keyboard* k) {
void keyWindow::paintEvent(QPaintEvent*) {
QPainter pnt;
- int wid = width() / 10 + 1;
+// int wid = width() / 10 + 1;
+// int hig = (height() - 10) / 4;
+ int wid = (width() - 6) / 10 + 1;
int hig = (height() - 10) / 4;
unsigned char val;
int row, pos;
pnt.begin(this);
- pnt.fillRect(QRectF(0,0,1,1), qRgba(0,0,0,0));
- for(int i = 0; i < 8; i++) {
- pos = (i & 4) ? 0 : 9;
- row = (i & 4) ? (i & 3) : (~i & 3);
- val = ~kb->map[i] & 0x1f;
- while(val) {
- if (val & 1) {
- pnt.fillRect(pos * wid, 10 + row * hig, wid, hig, qRgb(0, 200, 255));
+ pnt.fillRect(0, 0, width(), height(), qRgba(0,0,0,0));
+ if (kb) {
+ for(int i = 0; i < 8; i++) {
+ pos = (i & 4) ? 0 : 9;
+ row = (i & 4) ? (i & 3) : (~i & 3);
+ val = ~kb->map[i] & 0x1f;
+ while(val) {
+ if (val & 1) {
+ //pnt.fillRect(pos * wid, 10 + row * hig, wid, hig, qRgb(0, 200, 255));
+ pnt.fillRect(3 + pos * wid, 10 + row * hig, wid, hig, qRgb(0, 200, 255));
+ }
+ val >>= 1;
+ pos += (i & 4) ? 1 : -1;
}
- val >>= 1;
- pos += (i & 4) ? 1 : -1;
}
}
- pnt.drawPixmap(0, 0, QPixmap(":/images/keymap.png"));
+ pnt.drawPixmap(0, 0, QPixmap(":/images/keymap_volutar.png"));
pnt.end();
}
@@ -72,8 +77,12 @@ void keyWindow::mousePressEvent(QMouseEvent* ev) {
if (!kb) return;
int row;
int col;
- row = ev->xEventY * 4 / height();
- col = ev->xEventX * 10 / width();
+ row = (ev->xEventY - 10) * 4 / (height() - 10);
+ if (row < 0) row = 0;
+ if (row > 3) row = 3;
+ col = (ev->xEventX - 3) * 10 / (width() - 3);
+ if (col < 0) col = 0;
+ if (col > 9) col = 9;
xent.zxKey[0] = kwMap[row][col];
xent.zxKey[1] = 0;
switch(ev->button()) {
diff --git a/xpeccy.qrc b/xpeccy.qrc
index e75deac0..b5a2ea5f 100755
--- a/xpeccy.qrc
+++ b/xpeccy.qrc
@@ -86,5 +86,6 @@
images/filter.png
images/font.png
images/target.png
+ images/keymap_volutar.png