]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/information/informationpanelcontent.cpp
Ported Dolphin from KDialog to QDialog and save/restoreDialogSize to KWindowConfig...
[dolphin.git] / src / panels / information / informationpanelcontent.cpp
index e85813d4468ff931810b3ebfcdfe57d8e5ab6d90..d87f47b454018c71a7b41aef1dc71f2af2a7d336 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "informationpanelcontent.h"
 
-#include <KDialog>
 #include <KFileItem>
 #include <KIO/JobUiDelegate>
 #include <KIO/PreviewJob>
@@ -56,6 +55,7 @@
 #include <QTimer>
 #include <QVBoxLayout>
 #include <QFontDatabase>
+#include <QStyle>
 
 #include "dolphin_informationpanelsettings.h"
 #include "filemetadataconfigurationdialog.h"
@@ -86,7 +86,6 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) :
             this, &InformationPanelContent::markOutdatedPreview);
 
     QVBoxLayout* layout = new QVBoxLayout(this);
-    layout->setSpacing(KDialog::spacingHint());
 
     // preview
     const int minPreviewWidth = KIconLoader::SizeEnormous + KIconLoader::SizeMedium;
@@ -423,7 +422,7 @@ void InformationPanelContent::adjustWidgetSizes(int width)
     // so that the width of the information panel gets increased.
     // To prevent this, the maximum width is adjusted to
     // the current width of the panel.
-    const int maxWidth = width - KDialog::spacingHint() * 4;
+    const int maxWidth = width - style()->layoutSpacing(QSizePolicy::DefaultType, QSizePolicy::DefaultType, Qt::Horizontal) * 4;
     m_nameLabel->setMaximumWidth(maxWidth);
 
     // The metadata widget also contains a text widget which may return