Changeset View
Changeset View
Standalone View
Standalone View
src/QuickEditor/QuickEditor.cpp
Show First 20 Lines • Show All 546 Lines • ▼ Show 20 Line(s) | 546 | mBottomHelpBorderBox.setRect( | |||
---|---|---|---|---|---|
547 | mBottomHelpContentPos.x() - bottomHelpBoxPaddingX, | 547 | mBottomHelpContentPos.x() - bottomHelpBoxPaddingX, | ||
548 | mBottomHelpContentPos.y() - bottomHelpBoxPaddingY, | 548 | mBottomHelpContentPos.y() - bottomHelpBoxPaddingY, | ||
549 | contentWidth + bottomHelpBoxPaddingX * 2, | 549 | contentWidth + bottomHelpBoxPaddingX * 2, | ||
550 | contentHeight + bottomHelpBoxPaddingY * 2 - 1 | 550 | contentHeight + bottomHelpBoxPaddingY * 2 - 1 | ||
551 | ); | 551 | ); | ||
552 | } | 552 | } | ||
553 | 553 | | |||
554 | void QuickEditor::setBottomHelpText() { | 554 | void QuickEditor::setBottomHelpText() { | ||
555 | if (mReleaseToCapture) { | 555 | if (mReleaseToCapture && mSelection.size().isEmpty()) { | ||
556 | if(mRememberRegion && !mSelection.size().isEmpty()) { | | |||
557 | //Release to capture enabled and saved region available | | |||
558 | mBottomHelpText[0] = {QStaticText(i18nc("Mouse action", "Click and drag,")),{QStaticText(i18n(" "))}}; | | |||
559 | mBottomHelpText[1] = {QStaticText(i18nc("Keyboard/mouse action", "Enter, double-click:")), | | |||
560 | {QStaticText(i18n("Take screenshot"))}}; | | |||
561 | mBottomHelpText[2] = {QStaticText(i18nc("Keyboard action", "Shift:")), { | | |||
562 | QStaticText(i18nc("Shift key action first half", "Hold to toggle magnifier")), | | |||
563 | QStaticText(i18nc("Shift key action second half", "while dragging selection handles")) | | |||
564 | }}; | | |||
565 | mBottomHelpText[3] = {QStaticText(i18nc("Keyboard action", "Arrow keys:")), { | | |||
566 | QStaticText(i18nc("Shift key action first line", "Move selection rectangle")), | | |||
567 | QStaticText(i18nc("Shift key action second line", "Hold Alt to resize, Shift to fine‑tune")) | | |||
568 | }}; | | |||
569 | mBottomHelpText[4] = {QStaticText(i18nc("Mouse action", "Right-click:")), | | |||
570 | {QStaticText(i18n("Reset selection"))}}; | | |||
571 | mBottomHelpText[5] = {QStaticText(i18nc("Keyboard action", "Esc:")), {QStaticText(i18n("Cancel"))}}; | | |||
572 | | ||||
573 | } else { | | |||
574 | //Release to capture enabled and NO saved region available | 556 | //Release to capture enabled and NO saved region available | ||
575 | mbottomHelpLength = 4; | 557 | mbottomHelpLength = 3; | ||
576 | mBottomHelpText[0] = {QStaticText(i18nc("Keyboard/mouse action", "Release left-click, Enter:")), | 558 | mBottomHelpText[0] = { QStaticText(i18n("Take Screenshot:")), { QStaticText(i18nc("Mouse action", "Release left-click")), QStaticText(i18nc("Keyboard action", "Enter")) } }; | ||
577 | {QStaticText(i18n("Take Screenshot"))}}; | 559 | mBottomHelpText[1] = { QStaticText(i18n("Create new selection rectangle:")), { QStaticText(i18nc("Mouse action", "Drag outside selection rectangle")), QStaticText(i18nc("Keyboard action", "+ 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 | |||||
578 | mBottomHelpText[1] = {QStaticText(i18nc("Keyboard action", "Shift:")), { | 560 | mBottomHelpText[2] = { QStaticText(i18n("Cancel:")), { QStaticText(i18nc("Keyboard action", "Escape")) } }; | ||
579 | QStaticText(i18nc("Shift key action first half", "Hold to toggle magnifier"))}}; | | |||
580 | mBottomHelpText[2] = {QStaticText(i18nc("Mouse action", "Right-click:")), | | |||
581 | {QStaticText(i18n("Reset selection"))}}; | | |||
582 | mBottomHelpText[3] = {QStaticText(i18nc("Keyboard action", "Esc:")), {QStaticText(i18n("Cancel"))}}; | | |||
583 | } | | |||
584 | }else { | 561 | } 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… | |||||
585 | //Default text, Release to capture option disabled | 562 | //Default text, Release to capture option disabled | ||
586 | mbottomHelpLength = 5; | 563 | mBottomHelpText[0] = { QStaticText(i18n("Take Screenshot:")), { QStaticText(i18nc("Mouse action", "Double-click")), QStaticText(i18nc("Keyboard action", "Enter")) } }; | ||
587 | mBottomHelpText[0] = {QStaticText(i18nc("Keyboard/mouse action", "Enter, double-click:")), | 564 | mBottomHelpText[1] = { QStaticText(i18n("Create new selection rectangle:")), { QStaticText(i18nc("Mouse action", "Drag outside selection rectangle")), QStaticText(i18nc("Keyboard action", "+ 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 | |||||
588 | {QStaticText(i18n("Take screenshot"))}}; | 565 | mBottomHelpText[2] = { QStaticText(i18n("Move selection rectangle:")), { QStaticText(i18nc("Mouse action", "Drag inside selection rectangle")), QStaticText(i18nc("Keyboard action", "Arrow keys")), QStaticText(i18nc("Keyboard action", "+ Shift: Move in 1 pixel steps"))} }; | ||
davidre: No magnifier here from my testing. | |||||
davidre: Also here. | |||||
589 | mBottomHelpText[1] = {QStaticText(i18nc("Keyboard action", "Shift:")), { | 566 | mBottomHelpText[3] = { QStaticText(i18n("Resize selection rectangle:")), { QStaticText(i18nc("Mouse action", "Drag handles")), QStaticText(i18nc("Keyboard action", "Arrow keys + Alt")), QStaticText(i18nc("Keyboard action", "+ Shift: Resize in 1 pixel steps"))} }; | ||
590 | QStaticText(i18nc("Shift key action first half", "Hold to toggle magnifier")), | 567 | mBottomHelpText[4] = { QStaticText(i18n("Reset selection:")), { QStaticText(i18nc("Mouse action", "Right-click")) } }; | ||
591 | QStaticText(i18nc("Shift key action second half", "while dragging selection handles")) | 568 | mBottomHelpText[5] = { QStaticText(i18n("Cancel:")), { QStaticText(i18nc("Keyboard action", "Escape")) } }; | ||
davidre: Same here and below. | |||||
592 | }}; | | |||
593 | mBottomHelpText[2] = {QStaticText(i18nc("Keyboard action", "Arrow keys:")), { | | |||
594 | QStaticText(i18nc("Shift key action first line", "Move selection rectangle")), | | |||
595 | QStaticText(i18nc("Shift key action second line", "Hold Alt to resize, Shift to fine‑tune")) | | |||
596 | }}; | | |||
597 | mBottomHelpText[3] = {QStaticText(i18nc("Mouse action", "Right-click:")), | | |||
598 | {QStaticText(i18n("Reset selection"))}}; | | |||
599 | mBottomHelpText[4] = {QStaticText(i18nc("Keyboard action", "Esc:")), {QStaticText(i18n("Cancel"))}}; | | |||
600 | } | 569 | } | ||
601 | } | 570 | } | ||
602 | 571 | | |||
603 | void QuickEditor::drawBottomHelpText(QPainter &painter) | 572 | void QuickEditor::drawBottomHelpText(QPainter &painter) | ||
604 | { | 573 | { | ||
605 | if (mSelection.intersects(mBottomHelpBorderBox)) { | 574 | if (mSelection.intersects(mBottomHelpBorderBox)) { | ||
606 | return; | 575 | return; | ||
607 | } | 576 | } | ||
▲ Show 20 Lines • Show All 289 Lines • Show Last 20 Lines |
Only mouse.