|
|
@ -412,7 +412,7 @@ void PropertiesWidget::saveSettings() |
|
|
|
sizes = hSplitter->sizes(); |
|
|
|
sizes = hSplitter->sizes(); |
|
|
|
else |
|
|
|
else |
|
|
|
sizes = m_slideSizes; |
|
|
|
sizes = m_slideSizes; |
|
|
|
qDebug("Sizes: %d", sizes.size()); |
|
|
|
|
|
|
|
if (sizes.size() == 2) |
|
|
|
if (sizes.size() == 2) |
|
|
|
pref->setPropSplitterSizes(QString::number(sizes.first()) + ',' + QString::number(sizes.last())); |
|
|
|
pref->setPropSplitterSizes(QString::number(sizes.first()) + ',' + QString::number(sizes.last())); |
|
|
|
pref->setPropFileListState(m_ui->filesList->header()->saveState()); |
|
|
|
pref->setPropFileListState(m_ui->filesList->header()->saveState()); |
|
|
@ -752,21 +752,31 @@ void PropertiesWidget::configure() |
|
|
|
// Speed widget
|
|
|
|
// Speed widget
|
|
|
|
if (Preferences::instance()->isSpeedWidgetEnabled()) |
|
|
|
if (Preferences::instance()->isSpeedWidgetEnabled()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!m_speedWidget || !qobject_cast<SpeedWidget *>(m_speedWidget)) |
|
|
|
if (!qobject_cast<SpeedWidget *>(m_speedWidget)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
m_ui->speedLayout->removeWidget(m_speedWidget); |
|
|
|
if (m_speedWidget) |
|
|
|
delete m_speedWidget; |
|
|
|
{ |
|
|
|
m_speedWidget = new SpeedWidget {this}; |
|
|
|
m_ui->speedLayout->removeWidget(m_speedWidget); |
|
|
|
|
|
|
|
delete m_speedWidget; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_speedWidget = new SpeedWidget(this); |
|
|
|
m_ui->speedLayout->addWidget(m_speedWidget); |
|
|
|
m_ui->speedLayout->addWidget(m_speedWidget); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!m_speedWidget || !qobject_cast<QLabel *>(m_speedWidget)) |
|
|
|
if (!qobject_cast<QLabel *>(m_speedWidget)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
m_ui->speedLayout->removeWidget(m_speedWidget); |
|
|
|
if (m_speedWidget) |
|
|
|
delete m_speedWidget; |
|
|
|
{ |
|
|
|
auto *label = new QLabel(tr("<center><b>Speed graphs are disabled</b><p>You may change this setting in Advanced Options </center>"), this); |
|
|
|
m_ui->speedLayout->removeWidget(m_speedWidget); |
|
|
|
|
|
|
|
delete m_speedWidget; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto displayText = QString::fromLatin1("<center><b>%1</b><p>%2</p></center>") |
|
|
|
|
|
|
|
.arg(tr("Speed graphs are disabled"), tr("You can enable it in Advanced Options")); |
|
|
|
|
|
|
|
auto *label = new QLabel(displayText, this); |
|
|
|
label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); |
|
|
|
label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); |
|
|
|
m_speedWidget = label; |
|
|
|
m_speedWidget = label; |
|
|
|
m_ui->speedLayout->addWidget(m_speedWidget); |
|
|
|
m_ui->speedLayout->addWidget(m_speedWidget); |
|
|
|