From 4317e7371e0acd39fe2ef76fc20a902f5cabdd42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sun, 16 Apr 2017 12:55:42 +0200 Subject: Add new tabs to the main window. --- plugingui/mainwindow.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'plugingui/mainwindow.cc') diff --git a/plugingui/mainwindow.cc b/plugingui/mainwindow.cc index cbc3265..b99e781 100644 --- a/plugingui/mainwindow.cc +++ b/plugingui/mainwindow.cc @@ -85,6 +85,8 @@ void MainWindow::repaintEvent(RepaintEvent* repaintEvent) Painter painter(*this); + auto bar_height = tabs.getBarHeight(); + // Grey background painter.drawImageStretched(0, 0, back, width(), height()); @@ -92,10 +94,15 @@ void MainWindow::repaintEvent(RepaintEvent* repaintEvent) painter.drawImage(width() - logo.width() - 16, height() - logo.height(), logo); + // Topbar above the sidebars + topbar.setSize(16, bar_height); + painter.drawImage(0, 0, topbar); + painter.drawImage(width() - 16, 0, topbar); + // Sidebars - sidebar.setSize(16, height()); - painter.drawImage(0, 0, sidebar); - painter.drawImage(width() - 16, 0, sidebar); + sidebar.setSize(16, height() - bar_height + 1); + painter.drawImage(0, bar_height-1, sidebar); + painter.drawImage(width() - 16, bar_height-1, sidebar); } void MainWindow::sizeChanged(std::size_t width, std::size_t height) -- cgit v1.2.3