mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-03 16:02:26 +00:00
Fixed Orientation with docking issues and cleaning boxlayout code
This commit is contained in:
parent
2d24265e32
commit
d8b7bc020a
@ -186,52 +186,29 @@ void MainWindow::AddUiWidgets() {
|
|||||||
// add toolbar widgets
|
// add toolbar widgets
|
||||||
QApplication::setStyle("Fusion");
|
QApplication::setStyle("Fusion");
|
||||||
ui->toolBar->clear();
|
ui->toolBar->clear();
|
||||||
|
|
||||||
QWidget* toolbarContainer = new QWidget(this);
|
|
||||||
QHBoxLayout* mainLayout = new QHBoxLayout(toolbarContainer);
|
|
||||||
mainLayout->setSpacing(2);
|
|
||||||
bool showLabels = ui->toggleLabelsAct->isChecked();
|
bool showLabels = ui->toggleLabelsAct->isChecked();
|
||||||
|
ui->toolBar->addWidget(
|
||||||
QWidget* buttonGroup = new QWidget(this);
|
|
||||||
QHBoxLayout* buttonLayout = new QHBoxLayout(buttonGroup);
|
|
||||||
buttonLayout->setSpacing(2);
|
|
||||||
|
|
||||||
buttonLayout->addWidget(
|
|
||||||
createButtonWithLabel(ui->refreshButton, tr("Refresh List"), showLabels));
|
createButtonWithLabel(ui->refreshButton, tr("Refresh List"), showLabels));
|
||||||
|
ui->toolBar->addWidget(createButtonWithLabel(ui->playButton, tr("Play"), showLabels));
|
||||||
buttonLayout->addWidget(createButtonWithLabel(ui->playButton, tr("Play"), showLabels));
|
ui->toolBar->addWidget(createButtonWithLabel(ui->pauseButton, tr("Pause"), showLabels));
|
||||||
|
ui->toolBar->addWidget(createButtonWithLabel(ui->stopButton, tr("Stop"), showLabels));
|
||||||
buttonLayout->addWidget(createButtonWithLabel(ui->pauseButton, tr("Pause"), showLabels));
|
ui->toolBar->addWidget(createButtonWithLabel(ui->restartButton, tr("Restart"), showLabels));
|
||||||
|
ui->toolBar->addWidget(createButtonWithLabel(ui->settingsButton, tr("Settings"), showLabels));
|
||||||
buttonLayout->addWidget(createButtonWithLabel(ui->stopButton, tr("Stop"), showLabels));
|
ui->toolBar->addWidget(
|
||||||
|
|
||||||
buttonLayout->addWidget(createButtonWithLabel(ui->restartButton, tr("Restart"), showLabels));
|
|
||||||
|
|
||||||
buttonLayout->addWidget(createButtonWithLabel(ui->settingsButton, tr("Settings"), showLabels));
|
|
||||||
|
|
||||||
buttonLayout->addWidget(
|
|
||||||
createButtonWithLabel(ui->fullscreenButton, tr("Full Screen"), showLabels));
|
createButtonWithLabel(ui->fullscreenButton, tr("Full Screen"), showLabels));
|
||||||
|
ui->toolBar->addWidget(
|
||||||
buttonLayout->addWidget(
|
|
||||||
createButtonWithLabel(ui->controllerButton, tr("Controllers"), showLabels));
|
createButtonWithLabel(ui->controllerButton, tr("Controllers"), showLabels));
|
||||||
|
ui->toolBar->addWidget(createButtonWithLabel(ui->keyboardButton, tr("Keyboard"), showLabels));
|
||||||
|
|
||||||
buttonLayout->addWidget(createButtonWithLabel(ui->keyboardButton, tr("Keyboard"), showLabels));
|
ui->toolBar->addWidget(ui->sizeSliderContainer);
|
||||||
|
ui->toolBar->addWidget(ui->mw_searchbar);
|
||||||
|
|
||||||
if (showLabels) {
|
if (showLabels) {
|
||||||
QLabel* pauseButtonLabel = ui->pauseButton->parentWidget()->findChild<QLabel*>();
|
QLabel* pauseButtonLabel = ui->pauseButton->parentWidget()->findChild<QLabel*>();
|
||||||
if (pauseButtonLabel)
|
if (pauseButtonLabel) {
|
||||||
pauseButtonLabel->setVisible(false);
|
pauseButtonLabel->setVisible(false);
|
||||||
}
|
}
|
||||||
QWidget* searchSliderContainer = new QWidget(this);
|
}
|
||||||
QHBoxLayout* searchSliderLayout = new QHBoxLayout(searchSliderContainer);
|
|
||||||
searchSliderLayout->addWidget(ui->sizeSliderContainer);
|
|
||||||
searchSliderLayout->addWidget(ui->mw_searchbar);
|
|
||||||
searchSliderContainer->setLayout(searchSliderLayout);
|
|
||||||
|
|
||||||
buttonLayout->addWidget(searchSliderContainer);
|
|
||||||
mainLayout->addWidget(buttonGroup);
|
|
||||||
ui->toolBar->addWidget(toolbarContainer);
|
|
||||||
|
|
||||||
ui->playButton->setVisible(true);
|
ui->playButton->setVisible(true);
|
||||||
ui->pauseButton->setVisible(false);
|
ui->pauseButton->setVisible(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user