diff options
-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); |