summaryrefslogtreecommitdiff
path: root/src/previewimage.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-19 15:59:10 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-19 15:59:10 +0200
commite5e8916773a45a6d4f35fcb5cf6dec594e6726c4 (patch)
tree463085cd530fe3c9e68e15c809ff6407609fa564 /src/previewimage.cpp
parentPorting recently closed tabs to use HistoryItem. (diff)
downloadrekonq-e5e8916773a45a6d4f35fcb5cf6dec594e6726c4.tar.xz
Fixing thumbs position
Diffstat (limited to 'src/previewimage.cpp')
-rw-r--r--src/previewimage.cpp32
1 files changed, 12 insertions, 20 deletions
diff --git a/src/previewimage.cpp b/src/previewimage.cpp
index b51631af..0712b5a0 100644
--- a/src/previewimage.cpp
+++ b/src/previewimage.cpp
@@ -63,21 +63,25 @@ PreviewImage::PreviewImage(const QUrl &url, const QString &title, int index, boo
, m_imageLabel(new QLabel)
, m_textLabel(new QLabel)
{
+ setMinimumSize(300,200);
+
+ m_imageLabel->setAlignment(Qt::AlignCenter);
+ m_textLabel->setAlignment(Qt::AlignCenter);
+
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(m_imageLabel);
mainLayout->addWidget(m_textLabel);
setLayout(mainLayout);
loadUrlPreview(url);
-// setAlignment(Qt::AlignCenter);
}
PreviewImage::~PreviewImage()
{
delete ws;
- delete m_imageLabel;
delete m_textLabel;
+ delete m_imageLabel;
}
@@ -129,6 +133,11 @@ void PreviewImage::snapFinished()
m_imageLabel->setPixmap(m_pixmap);
m_textLabel->setText(m_title);
+ kDebug() << "m_pixmap: " << m_pixmap.size();
+ kDebug() << "text label: " << m_textLabel->size();
+ kDebug() << "iamge label: " << m_imageLabel->size();
+ kDebug() << "widget: " << size();
+
m_pixmap.save(m_savePath);
if(m_index > -1)
@@ -189,24 +198,7 @@ void PreviewImage::mousePressEvent(QMouseEvent *event)
{
if(event->button() == Qt::LeftButton)
{
- // if(m_isFavorite)
- // {
- Application::instance()->loadUrl(m_url);
-
- //TODO: what is that ? :
- /* }
- else
- {
- MainView *mv = Application::instance()->mainWindow()->mainView();
- int actualIndex = mv->currentIndex();
-
- kDebug() << "Actual index: " << actualIndex;
- kDebug() << "m_index: " << m_index;
-
- mv->slotCloseTab(actualIndex);
- mv->setCurrentIndex(m_index);
- }
- */
+ Application::instance()->loadUrl(m_url);
return;
};
QWidget::mousePressEvent(event);