summaryrefslogtreecommitdiff
path: root/plugingui/mainwindow.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-04-17 13:12:53 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2017-04-17 13:12:53 +0200
commitaa094a1cc6efdeeb72e8b14701f0314e92b696e7 (patch)
tree11688a58eb24a36dd473a1a1fd8807f1f10fe7cc /plugingui/mainwindow.cc
parentce92bea49b5842105c667a613d0043fa0eba2b8f (diff)
Draw version label in MainWindow instead of MainTab
Diffstat (limited to 'plugingui/mainwindow.cc')
-rw-r--r--plugingui/mainwindow.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugingui/mainwindow.cc b/plugingui/mainwindow.cc
index d183037..58e73b3 100644
--- a/plugingui/mainwindow.cc
+++ b/plugingui/mainwindow.cc
@@ -27,6 +27,7 @@
#include "mainwindow.h"
#include <config.h>
+#include <version.h>
#include "painter.h"
@@ -93,6 +94,13 @@ void MainWindow::repaintEvent(RepaintEvent* repaintEvent)
// DrumGizmo logo
painter.drawImage(width() - logo.width() - 16,
height() - logo.height(), logo);
+
+ // DrumGizmo version
+ std::string version_string("v." + std::string(VERSION));
+ auto version_x = width() - font.textWidth(version_string) - sidebar.width() - 5;
+ auto version_y = height() - 5;
+ painter.setColour(Colour(0.18));
+ painter.drawText(version_x, version_y, font, version_string);
// Topbar above the sidebars
topbar.setSize(16, bar_height);