소스 검색

Ladybird/Qt: Find the previous search match when the shift key is held

Timothy Flynn 1 년 전
부모
커밋
a73ac6aa3f
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      Ladybird/Qt/FindInPageWidget.cpp

+ 4 - 1
Ladybird/Qt/FindInPageWidget.cpp

@@ -77,7 +77,10 @@ void FindInPageWidget::keyPressEvent(QKeyEvent* event)
         setVisible(false);
         setVisible(false);
         break;
         break;
     case Qt::Key_Return:
     case Qt::Key_Return:
-        m_next_button->click();
+        if (event->modifiers().testFlag(Qt::ShiftModifier))
+            m_previous_button->click();
+        else
+            m_next_button->click();
         break;
         break;
     default:
     default:
         event->ignore();
         event->ignore();