diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 98ce7d99..f28450fe 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -67,18 +67,15 @@ MainWindow::MainWindow() : KXmlGuiWindow() - , m_view(0) - , m_bookmarksProvider(0) + , m_view( new MainView(this) ) + , m_bookmarksProvider( new BookmarksProvider(this) ) { - m_view = new MainView(this); - m_bookmarksProvider = new BookmarksProvider(this); - // accept dnd setAcceptDrops(true); // updating rekonq configuration slotUpdateConf(); - + // creating a centralWidget containing m_view and the hidden findbar QWidget *centralWidget = new QWidget; QVBoxLayout *layout = new QVBoxLayout; @@ -92,6 +89,13 @@ MainWindow::MainWindow() centralWidget->setLayout(layout); setCentralWidget(centralWidget); + // setting size policies + QRect desktopRect = QApplication::desktop()->screenGeometry(); + QSize size = desktopRect.size() * 0.8; + setMinimumSize( size ); + + setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); + // connect signals and slots connect(m_view, SIGNAL( loadUrlPage(const KUrl &) ), this, SLOT( loadUrl(const KUrl &) ) ); connect(m_view, SIGNAL( setCurrentTitle(const QString &)), this, SLOT( slotUpdateWindowTitle(const QString &) ) ); @@ -139,7 +143,7 @@ MainWindow::MainWindow() m_bookmarksProvider->provideBmToolbar( bmToolbar ); // setting up toolbars to NOT have context menu enabled - setContextMenuPolicy( Qt::ActionsContextMenu ); + setContextMenuPolicy( Qt::DefaultContextMenu ); // search bar m_searchBar = new SearchBar( this ); @@ -296,7 +300,6 @@ void MainWindow::setupHistoryMenu() } -// TODO FIXME void MainWindow::slotUpdateConf() { // ============== General ================== |