diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-06-02 19:23:30 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-06-02 19:23:30 +0200 |
commit | 6add9bedab227a2a5bde2c5fb0dd4a5c1bedc679 (patch) | |
tree | 043d932dce6f5881c874d81ab6f33ff31ead2faa | |
parent | Fixing (again) merge conflicts.. (diff) | |
download | rekonq-6add9bedab227a2a5bde2c5fb0dd4a5c1bedc679.tar.xz |
History Dialog UI fixes
-rw-r--r-- | src/historydialog.cpp | 12 | ||||
-rw-r--r-- | src/historydialog.h | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/historydialog.cpp b/src/historydialog.cpp index f4aea3bb..7b0d6bc0 100644 --- a/src/historydialog.cpp +++ b/src/historydialog.cpp @@ -35,6 +35,7 @@ #include <QtGui/QWidget> #include <QtGui/QClipboard> +#include <QtGui/QDesktopWidget> HistoryDialog::HistoryDialog(QWidget *parent, HistoryManager *setHistory) @@ -52,6 +53,8 @@ HistoryDialog::HistoryDialog(QWidget *parent, HistoryManager *setHistory) m_historyWidg->setupUi(widget); setMainWidget(widget); + m_historyWidg->search->setClearButtonShown(true); + m_historyWidg->tree->setUniformRowHeights(true); m_historyWidg->tree->setSelectionBehavior(QAbstractItemView::SelectRows); m_historyWidg->tree->setTextElideMode(Qt::ElideMiddle); @@ -69,7 +72,7 @@ HistoryDialog::HistoryDialog(QWidget *parent, HistoryManager *setHistory) m_historyWidg->tree->setAlternatingRowColors(true); QFontMetrics fm(font()); - int header = fm.width(QLatin1Char('m')) * 30; + int header = fm.width(QLatin1Char('m')) * 25; m_historyWidg->tree->header()->resizeSection(0, header); m_historyWidg->tree->header()->setStretchLastSection(true); @@ -117,3 +120,10 @@ void HistoryDialog::copy() QClipboard *clipboard = QApplication::clipboard(); clipboard->setText(url); } + +QSize HistoryDialog::sizeHint() const +{ + QRect desktopRect = Application::desktop()->screenGeometry(); + QSize size = desktopRect.size() * 0.7; + return size; +} diff --git a/src/historydialog.h b/src/historydialog.h index 1f592cdd..6436eda3 100644 --- a/src/historydialog.h +++ b/src/historydialog.h @@ -43,6 +43,7 @@ signals: public: explicit HistoryDialog(QWidget *parent = 0, HistoryManager *history = 0); + QSize sizeHint() const; private slots: void customContextMenuRequested(const QPoint &pos); |