summaryrefslogtreecommitdiff
path: root/src/tabwindow
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-10-01 19:10:21 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:05 +0100
commitc73149a4f56b6ec4d4183ac99015d73df2c2e34e (patch)
treee11b51a93d8db6e783b29ea3fabe38ccb6a1aa0b /src/tabwindow
parentFix url suggestions (diff)
downloadrekonq-c73149a4f56b6ec4d4183ac99015d73df2c2e34e.tar.xz
Add sizeHint code from rekonq
oops... by accident (-a) added here also the easy fix for tabs: - shown "Loading..." string while loading - use IconManager to properly show tab icon on load finished
Diffstat (limited to 'src/tabwindow')
-rw-r--r--src/tabwindow/rekonqwindow.cpp10
-rw-r--r--src/tabwindow/rekonqwindow.h2
-rw-r--r--src/tabwindow/tabwindow.cpp8
3 files changed, 16 insertions, 4 deletions
diff --git a/src/tabwindow/rekonqwindow.cpp b/src/tabwindow/rekonqwindow.cpp
index eb511b18..8bc96d87 100644
--- a/src/tabwindow/rekonqwindow.cpp
+++ b/src/tabwindow/rekonqwindow.cpp
@@ -125,9 +125,6 @@ RekonqWindow::RekonqWindow(QWidget* parent)
ktwsm->dummyInit();
sWindowList->append(this);
- // a decent minimum size...
- setMinimumSize(100,40);
-
QString geometry;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs("kde");
if (args && args->isSet("geometry"))
@@ -158,6 +155,13 @@ RekonqWindow::~RekonqWindow()
}
+QSize RekonqWindow::sizeHint() const
+{
+ QRect desktopRect = QApplication::desktop()->screenGeometry();
+ QSize size = desktopRect.size() * 0.8;
+ return size;
+}
+
QList<RekonqWindow*> RekonqWindow::windowList()
{
return *sWindowList;
diff --git a/src/tabwindow/rekonqwindow.h b/src/tabwindow/rekonqwindow.h
index c7fe80d1..67f0fcfa 100644
--- a/src/tabwindow/rekonqwindow.h
+++ b/src/tabwindow/rekonqwindow.h
@@ -60,6 +60,8 @@ public:
virtual ~RekonqWindow();
+ QSize sizeHint() const;
+
/**
* List of members of RekonqWindow class.
*/
diff --git a/src/tabwindow/tabwindow.cpp b/src/tabwindow/tabwindow.cpp
index cd4ec8ce..36b2caec 100644
--- a/src/tabwindow/tabwindow.cpp
+++ b/src/tabwindow/tabwindow.cpp
@@ -36,6 +36,8 @@
#include "tabhistory.h"
+#include "iconmanager.h"
+
// KDE Includes
#include <KAction>
#include <KApplication>
@@ -305,6 +307,8 @@ void TabWindow::tabLoadStarted()
}
tabBar()->setTabButton(index, QTabBar::LeftSide, 0);
tabBar()->setTabButton(index, QTabBar::LeftSide, label);
+
+ tabBar()->setTabText(index, i18n("Loading..."));
}
}
@@ -328,7 +332,9 @@ void TabWindow::tabLoadFinished(bool ok)
delete movie;
label->setMovie(0);
- label->setPixmap(tab->icon().pixmap(16, 16));
+
+ KIcon ic = IconManager::self()->iconForUrl(tab->url());
+ label->setPixmap(ic.pixmap(16, 16));
}
}