Changeset View
Changeset View
Standalone View
Standalone View
src/QuickEditor/QuickEditor.cpp
Show First 20 Lines • Show All 522 Lines • ▼ Show 20 Line(s) | 522 | mBottomHelpBorderBox.setRect( | |||
---|---|---|---|---|---|
523 | mBottomHelpContentPos.x() - bottomHelpBoxPaddingX, | 523 | mBottomHelpContentPos.x() - bottomHelpBoxPaddingX, | ||
524 | mBottomHelpContentPos.y() - bottomHelpBoxPaddingY, | 524 | mBottomHelpContentPos.y() - bottomHelpBoxPaddingY, | ||
525 | contentWidth + bottomHelpBoxPaddingX * 2, | 525 | contentWidth + bottomHelpBoxPaddingX * 2, | ||
526 | contentHeight + bottomHelpBoxPaddingY * 2 - 1 | 526 | contentHeight + bottomHelpBoxPaddingY * 2 - 1 | ||
527 | ); | 527 | ); | ||
528 | } | 528 | } | ||
529 | 529 | | |||
530 | void QuickEditor::setBottomHelpText() { | 530 | void QuickEditor::setBottomHelpText() { | ||
531 | if (mReleaseToCapture) { | 531 | if (mReleaseToCapture && !mRememberRegion && !mSelection.size().isEmpty()) { | ||
532 | if(mRememberRegion && !mSelection.size().isEmpty()) { | | |||
533 | //Release to capture enabled and saved region available | | |||
534 | mBottomHelpText[0] = {QStaticText(i18nc("Mouse action", "Click and drag,")),{QStaticText(i18n(" "))}}; | | |||
535 | mBottomHelpText[1] = {QStaticText(i18nc("Keyboard/mouse action", "Enter, double-click:")), | | |||
536 | {QStaticText(i18n("Take screenshot"))}}; | | |||
537 | mBottomHelpText[2] = {QStaticText(i18nc("Keyboard action", "Shift:")), { | | |||
538 | QStaticText(i18nc("Shift key action first half", "Hold to toggle magnifier")), | | |||
539 | QStaticText(i18nc("Shift key action second half", "while dragging selection handles")) | | |||
540 | }}; | | |||
541 | mBottomHelpText[3] = {QStaticText(i18nc("Keyboard action", "Arrow keys:")), { | | |||
542 | QStaticText(i18nc("Shift key action first line", "Move selection rectangle")), | | |||
543 | QStaticText(i18nc("Shift key action second line", "Hold Alt to resize, Shift to fine‑tune")) | | |||
544 | }}; | | |||
545 | mBottomHelpText[4] = {QStaticText(i18nc("Mouse action", "Right-click:")), | | |||
546 | {QStaticText(i18n("Reset selection"))}}; | | |||
547 | mBottomHelpText[5] = {QStaticText(i18nc("Keyboard action", "Esc:")), {QStaticText(i18n("Cancel"))}}; | | |||
548 | | ||||
549 | } else { | | |||
550 | //Release to capture enabled and NO saved region available | 532 | //Release to capture enabled and NO saved region available | ||
551 | mbottomHelpLength = 4; | 533 | mbottomHelpLength = 3; | ||
552 | mBottomHelpText[0] = {QStaticText(i18nc("Keyboard/mouse action", "Release left-click, Enter:")), | 534 | mBottomHelpText[0] = { QStaticText(i18nc("Keyboard/mouse action", "Release left-click, Enter:")), { QStaticText(i18n("Take Screenshot")) } }; | ||
553 | {QStaticText(i18n("Take Screenshot"))}}; | 535 | mBottomHelpText[1] = { QStaticText(i18nc("Keyboard/mouse action", "Click and drag:")), { QStaticText(i18n("Create new selection rectangle (+ shift: magnifier)")) } }; | ||
davidre: Only mouse. | |||||
davidre: Small shift need to be "Shift" | |||||
Also this is not usinz the same style as in the other case with shift in a new line davidre: Also this is not usinz the same style as in the other case with shift in a new line | |||||
554 | mBottomHelpText[1] = {QStaticText(i18nc("Keyboard action", "Shift:")), { | 536 | mBottomHelpText[2] = { QStaticText(i18nc("Keyboard action", "Esc:")), { QStaticText(i18n("Cancel")) } }; | ||
555 | QStaticText(i18nc("Shift key action first half", "Hold to toggle magnifier"))}}; | | |||
556 | mBottomHelpText[2] = {QStaticText(i18nc("Mouse action", "Right-click:")), | | |||
557 | {QStaticText(i18n("Reset selection"))}}; | | |||
558 | mBottomHelpText[3] = {QStaticText(i18nc("Keyboard action", "Esc:")), {QStaticText(i18n("Cancel"))}}; | | |||
559 | } | | |||
560 | }else { | 537 | } else { | ||
You changed the condition here which is fine because it didn't work as advertised before. (It didn't take the picture after changing when you had release to capture and a remebered region was available after changing the size. I think you need to test for mSelection.size().isEmpty()instead of davidre: You changed the condition here which is fine because it didn't work as advertised before. (It… | |||||
561 | //Default text, Release to capture option disabled | 538 | //Default text, Release to capture option disabled | ||
562 | mbottomHelpLength = 5; | 539 | mBottomHelpText[0] = { QStaticText(i18nc("Keyboard/mouse action", "Enter, double-click:")), { QStaticText(i18n("Take screenshot")) } }; | ||
davidre: Same here and below. | |||||
563 | mBottomHelpText[0] = {QStaticText(i18nc("Keyboard/mouse action", "Enter, double-click:")), | 540 | mBottomHelpText[1] = { QStaticText(i18nc("Keyboard/mouse action", "Click outside and drag:")), { QStaticText(i18n("Create new selection rectangle (+ shift: magnifier)")) } }; | ||
davidre: I think Shift should be capitalized. | |||||
davidre: Add some context to the last string that makes clear that shift is the key | |||||
564 | {QStaticText(i18n("Take screenshot"))}}; | 541 | mBottomHelpText[2] = { QStaticText(i18nc("Keyboard/mouse action", "Click inside and drag:")), { QStaticText(i18n("Move selection rectangle (+ shift: magnifier)")) } }; | ||
davidre: No magnifier here from my testing. | |||||
davidre: Also here. | |||||
565 | mBottomHelpText[1] = {QStaticText(i18nc("Keyboard action", "Shift:")), { | 542 | mBottomHelpText[3] = { QStaticText(i18nc("Keyboard/mouse action", "Hold drag handles and drag:")), { QStaticText(i18n("Resize selection rectangle (+ shift: magnifier)")) } }; | ||
566 | QStaticText(i18nc("Shift key action first half", "Hold to toggle magnifier")), | 543 | mBottomHelpText[4] = { QStaticText(i18nc("Keyboard action", "Arrow keys:")), { QStaticText(i18n("Move selection rectangle (+ shift: fine-tune)")) } }; | ||
567 | QStaticText(i18nc("Shift key action second half", "while dragging selection handles")) | 544 | mBottomHelpText[5] = { QStaticText(i18nc("Keyboard action", "Arrow keys + alt:")), { QStaticText(i18n("Resize selection rectangle (+ shift: fine-tune)")) } }; | ||
568 | }}; | 545 | mBottomHelpText[6] = { QStaticText(i18nc("Mouse action", "Right-click:")), { QStaticText(i18n("Reset selection")) } }; | ||
569 | mBottomHelpText[2] = {QStaticText(i18nc("Keyboard action", "Arrow keys:")), { | 546 | mBottomHelpText[7] = { QStaticText(i18nc("Keyboard action", "Esc:")), { QStaticText(i18n("Cancel")) } }; | ||
570 | QStaticText(i18nc("Shift key action first line", "Move selection rectangle")), | | |||
571 | QStaticText(i18nc("Shift key action second line", "Hold Alt to resize, Shift to fine‑tune")) | | |||
572 | }}; | | |||
573 | mBottomHelpText[3] = {QStaticText(i18nc("Mouse action", "Right-click:")), | | |||
574 | {QStaticText(i18n("Reset selection"))}}; | | |||
575 | mBottomHelpText[4] = {QStaticText(i18nc("Keyboard action", "Esc:")), {QStaticText(i18n("Cancel"))}}; | | |||
576 | } | 547 | } | ||
577 | } | 548 | } | ||
578 | 549 | | |||
579 | void QuickEditor::drawBottomHelpText(QPainter &painter) | 550 | void QuickEditor::drawBottomHelpText(QPainter &painter) | ||
580 | { | 551 | { | ||
581 | if (mSelection.intersects(mBottomHelpBorderBox)) { | 552 | if (mSelection.intersects(mBottomHelpBorderBox)) { | ||
582 | return; | 553 | return; | ||
583 | } | 554 | } | ||
▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines |
Only mouse.