]> cloud.milkyroute.net Git - dolphin.git/commitdiff
move the position of the filename below the preview
authorPeter Penz <peter.penz19@gmail.com>
Fri, 6 Nov 2009 20:06:00 +0000 (20:06 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Fri, 6 Nov 2009 20:06:00 +0000 (20:06 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1045798

src/panels/information/informationpanelcontent.cpp
src/panels/information/informationpanelcontent.h

index 40d5c9cbc98f28926d11a60569b7f2c816ec5232..31c27d7189268456b31418a05ed7ed97bef4dabc 100644 (file)
@@ -58,10 +58,9 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) :
     m_item(),
     m_pendingPreview(false),
     m_outdatedPreviewTimer(0),
-    m_nameLabel(0),
     m_preview(0),
-    m_previewSeparator(0),
     m_phononWidget(0),
+    m_nameLabel(0),
     m_metaDataWidget(0),
     m_metaDataArea(0)
 {
@@ -79,15 +78,6 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) :
     QVBoxLayout* layout = new QVBoxLayout;
     layout->setSpacing(KDialog::spacingHint());
 
-    // name
-    m_nameLabel = new QLabel(parent);
-    QFont font = m_nameLabel->font();
-    font.setBold(true);
-    m_nameLabel->setFont(font);
-    m_nameLabel->setAlignment(Qt::AlignHCenter);
-    m_nameLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
-    m_nameLabel->setMaximumWidth(KIconLoader::SizeEnormous);
-
     // preview
     const int minPreviewWidth = KIconLoader::SizeEnormous + KIconLoader::SizeMedium;
 
@@ -102,11 +92,16 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) :
     connect(m_phononWidget, SIGNAL(playingStopped()),
             this, SLOT(slotPlayingStopped()));
 
-    m_previewSeparator = new KSeparator(parent);
+    // name
+    m_nameLabel = new QLabel(parent);
+    QFont font = m_nameLabel->font();
+    font.setBold(true);
+    m_nameLabel->setFont(font);
+    m_nameLabel->setAlignment(Qt::AlignHCenter);
+    m_nameLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
 
     const bool showPreview = InformationPanelSettings::showPreview();
     m_preview->setVisible(showPreview);
-    m_previewSeparator->setVisible(showPreview);
 
     m_metaDataWidget = new KMetaDataWidget(parent);
     m_metaDataWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
@@ -135,11 +130,10 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) :
     palette.setColor(viewport->backgroundRole(), QColor(Qt::transparent));
     viewport->setPalette(palette);
 
-    layout->addWidget(m_nameLabel);
-    layout->addWidget(new KSeparator(this));
     layout->addWidget(m_preview);
     layout->addWidget(m_phononWidget);
-    layout->addWidget(m_previewSeparator);
+    layout->addWidget(m_nameLabel);
+    layout->addWidget(new KSeparator());
     layout->addWidget(m_metaDataArea);
     parent->setLayout(layout);
 }
@@ -290,7 +284,6 @@ void InformationPanelContent::configureSettings()
     const bool isChecked = action->isChecked();
     if (action == previewAction) {
         m_preview->setVisible(isChecked);
-        m_previewSeparator->setVisible(isChecked);
         InformationPanelSettings::setShowPreview(isChecked);
     } else if (action == configureAction) {
         QPointer<KMetaDataConfigurationDialog> dialog = new KMetaDataConfigurationDialog(m_metaDataWidget, this, Qt::Dialog);
index 9c17b9397a2b967ef607fc47d2bca13cf974d84c..6c08e50d2e91ad1c42b68cb9ad05ced0ff3c53d8 100644 (file)
@@ -115,11 +115,10 @@ private:
 
     bool m_pendingPreview;
     QTimer* m_outdatedPreviewTimer;
-    QLabel* m_nameLabel;
 
     PixmapViewer* m_preview;
-    KSeparator* m_previewSeparator;
     PhononWidget* m_phononWidget;
+    QLabel* m_nameLabel;
     KMetaDataWidget* m_metaDataWidget;
     QScrollArea* m_metaDataArea;
 };