summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2023-01-10 15:26:39 +0100
committerSimon Rettberg2023-01-10 15:26:39 +0100
commit24c4053b237b3ed968cf37f64ed6b85b6ba4ba92 (patch)
treeb7f41682e3746e677fdecb84fe20944d9978dd2d
parentCMake: Use proper build config config (diff)
downloadbeamergui-2.0.tar.gz
beamergui-2.0.tar.xz
beamergui-2.0.zip
Show proper current resolution in clone mode2.0
-rw-r--r--src/widget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 491735a..b0e2372 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -336,7 +336,7 @@ void Widget::initControls(bool jumpToTab)
// Determine preferred resolution for cloning: If no screen is detected as projector,
// use the smallest prefered resolution across all screens
// Otherwise, use the prefered resolution of the first projector we encounter
- QSize preferredClone;
+ QSize preferredClone, currentClone;
for (const auto &screen : screenList) {
if (!screen.preferredResolution.isEmpty()) {
if (screen.isProjector // Projector always overrides
@@ -344,6 +344,7 @@ void Widget::initControls(bool jumpToTab)
|| screen.preferredResolution.width() < preferredClone.width() // For normal screens,
|| screen.preferredResolution.height() < preferredClone.height()) { // smallest wins
preferredClone = screen.preferredResolution;
+ currentClone = screen.currentResolution;
}
if (screen.isProjector)
break;
@@ -352,7 +353,7 @@ void Widget::initControls(bool jumpToTab)
if (screenList.empty()) {
fillCombo(_ui->cboCloneResolution, modes, QSize(), preferredClone);
} else {
- fillCombo(_ui->cboCloneResolution, modes, screenList[0].currentResolution, preferredClone);
+ fillCombo(_ui->cboCloneResolution, modes, currentClone, preferredClone);
}
// Dual
_ui->dualContainer->takeAt(0);