mirror of
https://github.com/86Box/86Box.git
synced 2026-02-21 17:15:32 -07:00
Manager: Remove unused alternative design for next/prev screenshot buttons
This commit is contained in:
@@ -93,21 +93,12 @@ VMManagerDetails::VMManagerDetails(QWidget *parent)
|
||||
// Set the icons for the screenshot navigation buttons
|
||||
ui->screenshotNext->setIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowRight));
|
||||
ui->screenshotPrevious->setIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowLeft));
|
||||
ui->screenshotNextTB->setIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowRight));
|
||||
ui->screenshotPreviousTB->setIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowLeft));
|
||||
// Disabled by default
|
||||
ui->screenshotNext->setEnabled(false);
|
||||
ui->screenshotPrevious->setEnabled(false);
|
||||
ui->screenshotNextTB->setEnabled(false);
|
||||
ui->screenshotPreviousTB->setEnabled(false);
|
||||
// Connect their signals
|
||||
connect(ui->screenshotNext, &QPushButton::clicked, this, &VMManagerDetails::nextScreenshot);
|
||||
connect(ui->screenshotNextTB, &QToolButton::clicked, this, &VMManagerDetails::nextScreenshot);
|
||||
connect(ui->screenshotPreviousTB, &QToolButton::clicked, this, &VMManagerDetails::previousScreenshot);
|
||||
connect(ui->screenshotPrevious, &QPushButton::clicked, this, &VMManagerDetails::previousScreenshot);
|
||||
// These push buttons can be taken out if the tool buttons stay
|
||||
ui->screenshotNext->setVisible(false);
|
||||
ui->screenshotPrevious->setVisible(false);
|
||||
connect(ui->screenshotNext, &QToolButton::clicked, this, &VMManagerDetails::nextScreenshot);
|
||||
connect(ui->screenshotPrevious, &QToolButton::clicked, this, &VMManagerDetails::previousScreenshot);
|
||||
QString toolButtonStyleSheet;
|
||||
// Simple method to try and determine if light mode is enabled
|
||||
#ifdef Q_OS_WINDOWS
|
||||
@@ -207,8 +198,6 @@ VMManagerDetails::reset()
|
||||
|
||||
ui->screenshotNext->setEnabled(false);
|
||||
ui->screenshotPrevious->setEnabled(false);
|
||||
ui->screenshotNextTB->setEnabled(false);
|
||||
ui->screenshotPreviousTB->setEnabled(false);
|
||||
ui->screenshot->setPixmap(QString());
|
||||
ui->screenshot->setFixedSize(240, 160);
|
||||
ui->screenshot->setFrameStyle(QFrame::Box | QFrame::Sunken);
|
||||
@@ -384,8 +373,6 @@ VMManagerDetails::updateScreenshots(VMManagerSystem *passed_sysconfig)
|
||||
// Disable screenshot navigation buttons by default
|
||||
ui->screenshotNext->setEnabled(false);
|
||||
ui->screenshotPrevious->setEnabled(false);
|
||||
ui->screenshotNextTB->setEnabled(false);
|
||||
ui->screenshotPreviousTB->setEnabled(false);
|
||||
|
||||
// Different actions are taken depending on the existence and number of screenshots
|
||||
screenshots = passed_sysconfig->getScreenshots();
|
||||
@@ -395,8 +382,6 @@ VMManagerDetails::updateScreenshots(VMManagerSystem *passed_sysconfig)
|
||||
if (screenshots.size() > 1) {
|
||||
ui->screenshotNext->setEnabled(true);
|
||||
ui->screenshotPrevious->setEnabled(true);
|
||||
ui->screenshotNextTB->setEnabled(true);
|
||||
ui->screenshotPreviousTB->setEnabled(true);
|
||||
}
|
||||
#ifdef Q_OS_WINDOWS
|
||||
ui->screenshot->setStyleSheet("");
|
||||
@@ -409,8 +394,6 @@ VMManagerDetails::updateScreenshots(VMManagerSystem *passed_sysconfig)
|
||||
} else {
|
||||
ui->screenshotNext->setEnabled(false);
|
||||
ui->screenshotPrevious->setEnabled(false);
|
||||
ui->screenshotNextTB->setEnabled(false);
|
||||
ui->screenshotPreviousTB->setEnabled(false);
|
||||
ui->screenshot->setPixmap(QString());
|
||||
ui->screenshot->setFixedSize(240, 160);
|
||||
ui->screenshot->setFrameStyle(QFrame::Box | QFrame::Sunken);
|
||||
|
||||
@@ -146,22 +146,6 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="screenshotPrevious">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="ssNavTBHolder" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
@@ -178,14 +162,14 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QToolButton" name="screenshotPreviousTB">
|
||||
<widget class="QToolButton" name="screenshotPrevious">
|
||||
<property name="text">
|
||||
<string>…</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="screenshotNextTB">
|
||||
<widget class="QToolButton" name="screenshotNext">
|
||||
<property name="text">
|
||||
<string>…</string>
|
||||
</property>
|
||||
@@ -197,19 +181,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="screenshotNext">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
||||
Reference in New Issue
Block a user