[system/dolphin] src/panels/information: informationpanel: watch the panel once there is something to adjust
Méven Car <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 769669488fba96df2cac6351065b66d6bb4e7db0 by Méven Car.
Committed on 07/08/2026 at 13:54.
Pushed by meven into branch 'master'.
informationpanel: watch the panel once there is something to adjust
The content began watching the panel before it had made the widgets it adjusts to
the width of the panel, so a panel resized while its content was being built took
the process down. A polish of anything else was taken for a polish of the panel
as well, where a resize of it was not.
M +5 -3 src/panels/information/informationpanelcontent.cpp
https://invent.kde.org/system/dolphin/-/commit/769669488fba96df2cac6351065b66d6bb4e7db0
diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp
index fb6051262e..cf49e714d0 100644
--- a/src/panels/information/informationpanelcontent.cpp
+++ b/src/panels/information/informationpanelcontent.cpp
@@ -49,8 +49,6 @@ InformationPanelContent::InformationPanelContent(QWidget *parent)
, m_metaDataArea(nullptr)
, m_isVideo(false)
{
- parent->installEventFilter(this);
-
// Initialize timer for disabling an outdated preview with a small
// delay. This prevents flickering if the new preview can be generated
// within a very small timeframe.
@@ -143,6 +141,8 @@ InformationPanelContent::InformationPanelContent(QWidget *parent)
layout->addWidget(m_configureButtons);
grabGesture(Qt::TapAndHoldGesture);
+
+ parent->installEventFilter(this);
}
InformationPanelContent::~InformationPanelContent()
@@ -315,7 +315,9 @@ bool InformationPanelContent::eventFilter(QObject *obj, QEvent *event)
}
case QEvent::Polish:
- adjustWidgetSizes(parentWidget()->width());
+ if (obj == parent()) {
+ adjustWidgetSizes(parentWidget()->width());
+ }
break;
case QEvent::FontChange: