new layout every compose
This commit is contained in:
parent
071505d3fe
commit
d75cf405f1
2 changed files with 24 additions and 5 deletions
|
|
@ -214,6 +214,7 @@ void MainWindow::compose() {
|
|||
uint64_t screenHeight = (uint64_t)std::abs(screenRes.height());
|
||||
log_debugcpp("Window Width: " + std::to_string(windowWidth));
|
||||
|
||||
this->createLayout(new QGridLayout());
|
||||
this->setAttribute(Qt::WA_DontShowOnScreen, true);
|
||||
this->show();
|
||||
this->widget->layout()->update();
|
||||
|
|
@ -398,7 +399,7 @@ ChannelWidget::ChannelWidget(uint32_t channelCount, EndpointHandler* eph, QWidge
|
|||
widgetLayout->getContentsMargins(&left, &top, &right, &bottom);
|
||||
widgetLayout->setContentsMargins(0, top, 0, bottom);
|
||||
|
||||
/*
|
||||
/*
|
||||
* Channel sliders setup
|
||||
*/
|
||||
//uint32_t epChannelCount = eph->getChannelCount();
|
||||
|
|
@ -824,6 +825,23 @@ HeaderWidget::HeaderWidget(QWidget *parent) : QWidget(parent) {
|
|||
this->setLayout(widgetLayout);
|
||||
}
|
||||
|
||||
void MainWindow::createLayout(QGridLayout *newLayout) {
|
||||
//int row = 0;
|
||||
//QGridLayout *newLayout = new QGridLayout();
|
||||
delete this->widgetLayout;
|
||||
widget->setLayout(newLayout);
|
||||
this->widgetLayout = newLayout;
|
||||
//this->reloadEndpointWidgets();
|
||||
uint64_t i = 0;
|
||||
for (EndpointWidget *epw : ews) {
|
||||
if (!epw) continue;
|
||||
log_debugcpp("EPWidget positioning");
|
||||
log_wdebugcpp(L"epw name: " + epw->getEndpointHandler()->getName());
|
||||
this->widgetLayout->addWidget(epw, i++, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
|
||||
//setWindowState(Qt::WindowFullScreen);
|
||||
//setCentralWidget(centralWidget);
|
||||
|
|
@ -861,7 +879,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
|
|||
ewsUpdateTimer->setInterval(ewsUpdateTimerFrequency);
|
||||
connect(ewsUpdateTimer, &QTimer::timeout, this, &MainWindow::reorderEndpointWidgetCollection);
|
||||
//widget->setMinimumSize(QSize(300,300));
|
||||
widget->setLayout(widgetLayout);
|
||||
//widget->setLayout(widgetLayout);
|
||||
/*
|
||||
* Scroll bar code
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ protected:
|
|||
void customEvent(QEvent* ev) override;
|
||||
QRect setSizePosition(QScreen* screen, int width, int height);
|
||||
QScreen* getCurrentScreen();
|
||||
void createLayout(QGridLayout *newLayout);
|
||||
|
||||
private slots:
|
||||
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue