File tree Expand file tree Collapse file tree
quickshell/Modules/Settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -353,19 +353,40 @@ Item {
353353 desktopApps = [];
354354 }
355355
356- DankFlickable {
357- anchors .fill : parent
358- clip: true
359- contentHeight: mainColumn .height + Theme .spacingXL
360- contentWidth: width
361-
362- AppBrowserPopup {
356+ Loader {
357+ id: popupLoader
358+ active: false
359+ sourceComponent: AppBrowserPopup {
363360 id: appBrowserPopup
364361 appsModel: root .desktopApps
365362 parentModal: root .parentModal
366363 onAppSelected : appId => root .newEntryDesktopId = appId
367364 }
368365
366+ function recreatePopup () {
367+ log .debug (" Recreating popup" );
368+ popupLoader .active = false ;
369+ popupLoader .active = true ;
370+ }
371+
372+ function showPopup () {
373+ if (! popupLoader .item ) {
374+ popupLoader .active = true ;
375+ }
376+ popupLoader .item .show ();
377+ if (! popupLoader .item .visible ) {
378+ recreatePopup ();
379+ popupLoader .item .show ();
380+ }
381+ }
382+ }
383+
384+ DankFlickable {
385+ anchors .fill : parent
386+ clip: true
387+ contentHeight: mainColumn .height + Theme .spacingXL
388+ contentWidth: width
389+
369390 Column {
370391 id: mainColumn
371392 topPadding: 4
@@ -486,7 +507,7 @@ Item {
486507 id: browseButton
487508 text: I18n .tr (" Browse" )
488509 iconName: " search"
489- onClicked: appBrowserPopup . show ()
510+ onClicked: popupLoader . showPopup ()
490511 }
491512 }
492513
You can’t perform that action at this time.
0 commit comments