Use FlowLayout for texture viewer toolbars, do layout at runtime

This commit is contained in:
baldurk
2015-07-10 16:20:08 +02:00
parent 85e26b2e90
commit b0a168ef47
2 changed files with 759 additions and 706 deletions
+22 -2
View File
@@ -1,6 +1,8 @@
#include "TextureViewer.h"
#include "ui_TextureViewer.h"
#include "FlowLayout.h"
#include "Code/Core.h"
#if defined(__linux__)
@@ -21,8 +23,6 @@ m_Core(core)
ui->framerender->SetOutput(NULL);
m_Output = NULL;
ui->verticalLayout->removeWidget(ui->framerender);
ui->dockarea->addToolWindow(ui->framerender, ToolWindowManager::EmptySpace);
ui->dockarea->setToolWindowProperties(ui->framerender, ToolWindowManager::DisallowUserDocking |
ToolWindowManager::HideCloseButton |
@@ -56,6 +56,26 @@ m_Core(core)
ui->dockarea->setRubberBandLineWidth(50);
ui->framerender->setWindowTitle(tr("OM RenderTarget 0 - GBuffer Colour"));
QVBoxLayout *vertical = new QVBoxLayout(this);
vertical->setSpacing(3);
vertical->setContentsMargins(0, 0, 0, 0);
FlowLayout *flow1 = new FlowLayout(this);
FlowLayout *flow2 = new FlowLayout(this);
flow1->addWidget(ui->channelsToolbar);
flow1->addWidget(ui->subresourceToolbar);
flow1->addWidget(ui->actionToolbar);
flow2->addWidget(ui->zoomToolbar);
flow2->addWidget(ui->overlayToolbar);
flow2->addWidget(ui->rangeToolbar);
vertical->addItem(flow1);
vertical->addItem(flow2);
vertical->addWidget(ui->dockarea);
}
TextureViewer::~TextureViewer()