Skip to content

Commit bcb4041

Browse files
allow numpad numers to resize and fix text artifacting on large resize (flameshot-org#2386)
1 parent 5e35f1e commit bcb4041

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/widgets/capture/capturewidget.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,8 @@ void CaptureWidget::keyPressEvent(QKeyEvent* e)
821821
// If the key is a digit, change the tool size
822822
bool ok;
823823
int digit = e->text().toInt(&ok);
824-
if (ok && e->modifiers() == Qt::NoModifier) { // digit received
824+
if (ok && ((e->modifiers() == Qt::NoModifier) ||
825+
e->modifiers() == Qt::KeypadModifier)) { // digit received
825826
m_toolSizeByKeyboard = 10 * m_toolSizeByKeyboard + digit;
826827
setToolSize(m_toolSizeByKeyboard);
827828
if (m_context.toolSize != m_toolSizeByKeyboard) {
@@ -1242,6 +1243,8 @@ void CaptureWidget::onToolSizeChanged(int t)
12421243
drawToolsData();
12431244
updateTool(toolItem);
12441245
}
1246+
// Force a repaint to prevent artifacting
1247+
this->repaint();
12451248
}
12461249

12471250
void CaptureWidget::onToolSizeSettled(int size)

0 commit comments

Comments
 (0)