summaryrefslogtreecommitdiff
path: root/src/historydialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/historydialog.cpp')
-rw-r--r--src/historydialog.cpp12
1 files changed, 11 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;
+}