* Fix black screen on Wayland when setting resizable options
* Fix incorrect fixed size at startup when status bar is disabled * Fix incorrect fixed size when it is set from Specify Dimensions
This commit is contained in:
@@ -316,7 +316,7 @@ void MainWindow::showEvent(QShowEvent *event) {
|
|||||||
setGeometry(window_x, window_y, window_w, window_h + menuBar()->height() + (hide_status_bar ? 0 : statusBar()->height()));
|
setGeometry(window_x, window_y, window_w, window_h + menuBar()->height() + (hide_status_bar ? 0 : statusBar()->height()));
|
||||||
}
|
}
|
||||||
if (vid_resize == 2) {
|
if (vid_resize == 2) {
|
||||||
setFixedSize(fixed_size_x, fixed_size_y + this->menuBar()->height() + this->statusBar()->height());
|
setFixedSize(fixed_size_x, fixed_size_y + menuBar()->height() + (hide_status_bar ? 0 : statusBar()->height()));
|
||||||
scrnsz_x = fixed_size_x;
|
scrnsz_x = fixed_size_x;
|
||||||
scrnsz_y = fixed_size_y;
|
scrnsz_y = fixed_size_y;
|
||||||
}
|
}
|
||||||
@@ -913,10 +913,14 @@ void MainWindow::on_actionFullscreen_triggered() {
|
|||||||
if (video_fullscreen > 0) {
|
if (video_fullscreen > 0) {
|
||||||
showNormal();
|
showNormal();
|
||||||
ui->menubar->show();
|
ui->menubar->show();
|
||||||
ui->statusbar->show();
|
if (!hide_status_bar) ui->statusbar->show();
|
||||||
video_fullscreen = 0;
|
video_fullscreen = 0;
|
||||||
setGeometry(geometry());
|
if (vid_resize != 1) {
|
||||||
|
if (vid_resize == 2) setFixedSize(fixed_size_x, fixed_size_y + menuBar()->height() + (!hide_status_bar ? statusBar()->height() : 0));
|
||||||
|
emit resizeContents(scrnsz_x, scrnsz_y);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
|
||||||
ui->menubar->hide();
|
ui->menubar->hide();
|
||||||
ui->statusbar->hide();
|
ui->statusbar->hide();
|
||||||
showFullScreen();
|
showFullScreen();
|
||||||
@@ -1064,6 +1068,7 @@ void MainWindow::on_actionResizable_window_triggered(bool checked) {
|
|||||||
setWindowFlag(Qt::MSWindowsFixedSizeDialogHint);
|
setWindowFlag(Qt::MSWindowsFixedSizeDialogHint);
|
||||||
}
|
}
|
||||||
show();
|
show();
|
||||||
|
ui->stackedWidget->switchRenderer((RendererStack::Renderer)vid_api);
|
||||||
|
|
||||||
ui->menuWindow_scale_factor->setEnabled(! checked);
|
ui->menuWindow_scale_factor->setEnabled(! checked);
|
||||||
emit resizeContents(scrnsz_x, scrnsz_y);
|
emit resizeContents(scrnsz_x, scrnsz_y);
|
||||||
|
@@ -45,14 +45,17 @@ void SpecifyDimensions::on_SpecifyDimensions_accepted()
|
|||||||
window_remember = 0;
|
window_remember = 0;
|
||||||
fixed_size_x = ui->spinBoxWidth->value();
|
fixed_size_x = ui->spinBoxWidth->value();
|
||||||
fixed_size_y = ui->spinBoxHeight->value();
|
fixed_size_y = ui->spinBoxHeight->value();
|
||||||
main_window->setFixedSize(ui->spinBoxWidth->value(), ui->spinBoxHeight->value() + (hide_status_bar ? main_window->statusBar()->height() : 0) + main_window->menuBar()->height());
|
main_window->setFixedSize(ui->spinBoxWidth->value(), ui->spinBoxHeight->value() + (!hide_status_bar ? main_window->statusBar()->height() : 0) + main_window->menuBar()->height());
|
||||||
emit main_window->updateMenuResizeOptions();
|
emit main_window->updateMenuResizeOptions();
|
||||||
main_window->show();
|
main_window->show();
|
||||||
|
main_window->ui->stackedWidget->switchRenderer((RendererStack::Renderer)vid_api);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (vid_resize != 1) main_window->ui->actionResizable_window->trigger();
|
main_window->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
|
||||||
|
main_window->ui->actionResizable_window->setChecked(false);
|
||||||
vid_resize = 0;
|
vid_resize = 0;
|
||||||
|
main_window->ui->actionResizable_window->trigger();
|
||||||
window_remember = 1;
|
window_remember = 1;
|
||||||
window_w = ui->spinBoxWidth->value();
|
window_w = ui->spinBoxWidth->value();
|
||||||
window_h = ui->spinBoxHeight->value();
|
window_h = ui->spinBoxHeight->value();
|
||||||
|
Reference in New Issue
Block a user