[vlc-commits] [Git][videolan/vlc][master] qml: fix needing to wait animation to finish before typing in `SearchBox`

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Jul 30 16:57:37 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
8218a43a by Fatih Uzunoglu at 2026-07-30T16:25:58+00:00
qml: fix needing to wait animation to finish before typing in `SearchBox`

Amends 9a6d8daa069.

- - - - -


1 changed file:

- modules/gui/qt/widgets/qml/SearchBox.qml


Changes:

=====================================
modules/gui/qt/widgets/qml/SearchBox.qml
=====================================
@@ -38,6 +38,7 @@ FocusScope {
 
     function expandAndFocus() {
         expandedState.state = "expanded"
+        textField.forceActiveFocus(Qt.ShortcutFocusReason)
     }
 
     StateGroup {
@@ -81,10 +82,10 @@ FocusScope {
             reversible: true
 
             onRunningChanged: {
-                // By forcing focus at the end of the transition, we avoid showing the caret
-                // momentarily outside the text field before the text field is fully expanded
-                if (!running && expandedState.state === "expanded")
-                    textField.forceActiveFocus(Qt.ShortcutFocusReason)
+                if (running)
+                    textField.clip = true
+                else
+                    textField.clip = false
             }
 
             NumberAnimation { property: "height"; easing.type: Easing.InOutSine; duration: VLCStyle.duration_long; }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8218a43afda7cd68f2e8821843a6d91f1eb752a8

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8218a43afda7cd68f2e8821843a6d91f1eb752a8
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list