wip: fixed multi monitor
This commit is contained in:
parent
4f637b4397
commit
170d52067b
1 changed files with 12 additions and 8 deletions
|
|
@ -91,13 +91,9 @@ void MainWindow::compose() {
|
||||||
screenRes.getCoords(&srx1, &sry1, &srx2, &sry2);
|
screenRes.getCoords(&srx1, &sry1, &srx2, &sry2);
|
||||||
log_debugcpp("(for Percentage) Screen Res: " + std::to_string(srx1) + " " + std::to_string(srx2)+" " + std::to_string(sry1) + " " + std::to_string(sry2));
|
log_debugcpp("(for Percentage) Screen Res: " + std::to_string(srx1) + " " + std::to_string(srx2)+" " + std::to_string(sry1) + " " + std::to_string(sry2));
|
||||||
|
|
||||||
uint64_t windowWidth = (uint64_t)std::abs(srx2) * this->widthRatio;
|
uint64_t windowWidth = (uint64_t)std::abs(screenRes.width()) * this->widthRatio;
|
||||||
uint64_t screenHeight = (uint64_t)std::abs(sry2);
|
uint64_t screenHeight = (uint64_t)std::abs(screenRes.height());
|
||||||
log_debugcpp("Window Width: " + std::to_string(windowWidth));
|
log_debugcpp("Window Width: " + std::to_string(windowWidth));
|
||||||
for (auto *epw : ews) {
|
|
||||||
if (!epw) continue;
|
|
||||||
epw->setSize(windowWidth, screenHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
this->setAttribute(Qt::WA_DontShowOnScreen, true);
|
this->setAttribute(Qt::WA_DontShowOnScreen, true);
|
||||||
this->show();
|
this->show();
|
||||||
|
|
@ -105,6 +101,12 @@ void MainWindow::compose() {
|
||||||
this->hide();
|
this->hide();
|
||||||
this->setAttribute(Qt::WA_DontShowOnScreen, false);
|
this->setAttribute(Qt::WA_DontShowOnScreen, false);
|
||||||
|
|
||||||
|
for (auto *epw : ews) {
|
||||||
|
if (!epw) continue;
|
||||||
|
epw->setSize(windowWidth, screenHeight);
|
||||||
|
log_debugcpp("epw loop");
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculating window height
|
* Calculating window height
|
||||||
*/
|
*/
|
||||||
|
|
@ -567,8 +569,10 @@ void EndpointWidget::setSize(uint64_t width, uint64_t height) {
|
||||||
/* og 1080p 120% testing values */
|
/* og 1080p 120% testing values */
|
||||||
this->mainLabel->setMaximumWidth((int)width * 0.35 /* 1080p 120%*/);
|
this->mainLabel->setMaximumWidth((int)width * 0.35 /* 1080p 120%*/);
|
||||||
this->mainLabel->setMinimumWidth((int)width * 0.35 /* 1080p 120%*/);
|
this->mainLabel->setMinimumWidth((int)width * 0.35 /* 1080p 120%*/);
|
||||||
|
if (cw) {
|
||||||
this->cw->setMinimumSize(QSize(1, height * 0.06));
|
this->cw->setMinimumSize(QSize(1, height * 0.06));
|
||||||
this->cw->setMaximumSize(QSize(QWIDGETSIZE_MAX, height * 0.06));
|
this->cw->setMaximumSize(QSize(QWIDGETSIZE_MAX, height * 0.06));
|
||||||
|
}
|
||||||
for (auto sw : sessionWidgets){
|
for (auto sw : sessionWidgets){
|
||||||
if (sw) sw->setSize(width, height);
|
if (sw) sw->setSize(width, height);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue