diff --git a/src/QuickEditor/QuickEditor.h b/src/QuickEditor/QuickEditor.h --- a/src/QuickEditor/QuickEditor.h +++ b/src/QuickEditor/QuickEditor.h @@ -89,7 +89,7 @@ static const int selectionBoxPaddingY; static const int selectionBoxMarginY; - static const int bottomHelpMaxLength = 6; + static const int bottomHelpMaxLength = 8; static bool bottomHelpTextPrepared; static const int bottomHelpBoxPaddingX; static const int bottomHelpBoxPaddingY; diff --git a/src/QuickEditor/QuickEditor.cpp b/src/QuickEditor/QuickEditor.cpp --- a/src/QuickEditor/QuickEditor.cpp +++ b/src/QuickEditor/QuickEditor.cpp @@ -288,7 +288,7 @@ void QuickEditor::mousePressEvent(QMouseEvent* event) { if (event->button() & Qt::LeftButton) { - /* NOTE Workaround for Bug 407843 + /* NOTE Workaround for Bug 407843 * If we show the selection Widget when a right click menu is open we lose focus on X. * When the user clicks we get the mouse back. We can only grab the keyboard if we already * have mouse focus. So just grab it undconditionally here. @@ -528,51 +528,22 @@ } void QuickEditor::setBottomHelpText() { - if (mReleaseToCapture) { - if(mRememberRegion && !mSelection.size().isEmpty()) { - //Release to capture enabled and saved region available - mBottomHelpText[0] = {QStaticText(i18nc("Mouse action", "Click and drag,")),{QStaticText(i18n(" "))}}; - mBottomHelpText[1] = {QStaticText(i18nc("Keyboard/mouse action", "Enter, double-click:")), - {QStaticText(i18n("Take screenshot"))}}; - mBottomHelpText[2] = {QStaticText(i18nc("Keyboard action", "Shift:")), { - QStaticText(i18nc("Shift key action first half", "Hold to toggle magnifier")), - QStaticText(i18nc("Shift key action second half", "while dragging selection handles")) - }}; - mBottomHelpText[3] = {QStaticText(i18nc("Keyboard action", "Arrow keys:")), { - QStaticText(i18nc("Shift key action first line", "Move selection rectangle")), - QStaticText(i18nc("Shift key action second line", "Hold Alt to resize, Shift to fine‑tune")) - }}; - mBottomHelpText[4] = {QStaticText(i18nc("Mouse action", "Right-click:")), - {QStaticText(i18n("Reset selection"))}}; - mBottomHelpText[5] = {QStaticText(i18nc("Keyboard action", "Esc:")), {QStaticText(i18n("Cancel"))}}; - - } else { - //Release to capture enabled and NO saved region available - mbottomHelpLength = 4; - mBottomHelpText[0] = {QStaticText(i18nc("Keyboard/mouse action", "Release left-click, Enter:")), - {QStaticText(i18n("Take Screenshot"))}}; - mBottomHelpText[1] = {QStaticText(i18nc("Keyboard action", "Shift:")), { - QStaticText(i18nc("Shift key action first half", "Hold to toggle magnifier"))}}; - mBottomHelpText[2] = {QStaticText(i18nc("Mouse action", "Right-click:")), - {QStaticText(i18n("Reset selection"))}}; - mBottomHelpText[3] = {QStaticText(i18nc("Keyboard action", "Esc:")), {QStaticText(i18n("Cancel"))}}; - } - }else { + if (mReleaseToCapture && !mRememberRegion && !mSelection.size().isEmpty()) { + //Release to capture enabled and NO saved region available + mbottomHelpLength = 3; + mBottomHelpText[0] = { QStaticText(i18nc("Keyboard/mouse action", "Release left-click, Enter:")), { QStaticText(i18n("Take Screenshot")) } }; + mBottomHelpText[1] = { QStaticText(i18nc("Keyboard/mouse action", "Click and drag:")), { QStaticText(i18n("Create new selection rectangle (+ shift: magnifier)")) } }; + mBottomHelpText[2] = { QStaticText(i18nc("Keyboard action", "Esc:")), { QStaticText(i18n("Cancel")) } }; + } else { //Default text, Release to capture option disabled - mbottomHelpLength = 5; - mBottomHelpText[0] = {QStaticText(i18nc("Keyboard/mouse action", "Enter, double-click:")), - {QStaticText(i18n("Take screenshot"))}}; - mBottomHelpText[1] = {QStaticText(i18nc("Keyboard action", "Shift:")), { - QStaticText(i18nc("Shift key action first half", "Hold to toggle magnifier")), - QStaticText(i18nc("Shift key action second half", "while dragging selection handles")) - }}; - mBottomHelpText[2] = {QStaticText(i18nc("Keyboard action", "Arrow keys:")), { - QStaticText(i18nc("Shift key action first line", "Move selection rectangle")), - QStaticText(i18nc("Shift key action second line", "Hold Alt to resize, Shift to fine‑tune")) - }}; - mBottomHelpText[3] = {QStaticText(i18nc("Mouse action", "Right-click:")), - {QStaticText(i18n("Reset selection"))}}; - mBottomHelpText[4] = {QStaticText(i18nc("Keyboard action", "Esc:")), {QStaticText(i18n("Cancel"))}}; + mBottomHelpText[0] = { QStaticText(i18nc("Keyboard/mouse action", "Enter, double-click:")), { QStaticText(i18n("Take screenshot")) } }; + mBottomHelpText[1] = { QStaticText(i18nc("Keyboard/mouse action", "Click outside and drag:")), { QStaticText(i18n("Create new selection rectangle (+ shift: magnifier)")) } }; + mBottomHelpText[2] = { QStaticText(i18nc("Keyboard/mouse action", "Click inside and drag:")), { QStaticText(i18n("Move selection rectangle (+ shift: magnifier)")) } }; + mBottomHelpText[3] = { QStaticText(i18nc("Keyboard/mouse action", "Hold drag handles and drag:")), { QStaticText(i18n("Resize selection rectangle (+ shift: magnifier)")) } }; + mBottomHelpText[4] = { QStaticText(i18nc("Keyboard action", "Arrow keys:")), { QStaticText(i18n("Move selection rectangle (+ shift: fine-tune)")) } }; + mBottomHelpText[5] = { QStaticText(i18nc("Keyboard action", "Arrow keys + alt:")), { QStaticText(i18n("Resize selection rectangle (+ shift: fine-tune)")) } }; + mBottomHelpText[6] = { QStaticText(i18nc("Mouse action", "Right-click:")), { QStaticText(i18n("Reset selection")) } }; + mBottomHelpText[7] = { QStaticText(i18nc("Keyboard action", "Esc:")), { QStaticText(i18n("Cancel")) } }; } }