|
|
@ -26,6 +26,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
// KDE
|
|
|
|
// KDE
|
|
|
|
#include <KIconDialog>
|
|
|
|
#include <KIconDialog>
|
|
|
|
|
|
|
|
#include <kmessagebox.h>
|
|
|
|
|
|
|
|
#include <qabstractbutton.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace Latte {
|
|
|
|
namespace Latte {
|
|
|
|
namespace Settings {
|
|
|
|
namespace Settings {
|
|
|
@ -73,11 +75,15 @@ void DetailsHandler::init()
|
|
|
|
|
|
|
|
|
|
|
|
m_ui->patternClearBtn->setFixedHeight(m_ui->backgroundBtn->height()+2);
|
|
|
|
m_ui->patternClearBtn->setFixedHeight(m_ui->backgroundBtn->height()+2);
|
|
|
|
|
|
|
|
|
|
|
|
connect(m_backButtonsGroup, static_cast<void(QButtonGroup::*)(int, bool)>(&QButtonGroup::buttonToggled),
|
|
|
|
connect(m_backButtonsGroup, &QButtonGroup::buttonToggled,
|
|
|
|
[ = ](int id, bool checked) {
|
|
|
|
[ this ](QAbstractButton *id, bool checked) {
|
|
|
|
|
|
|
|
|
|
|
|
if (checked) {
|
|
|
|
if (checked) {
|
|
|
|
setBackgroundStyle(static_cast<Latte::Layout::BackgroundStyle>(id));
|
|
|
|
// FIXME:
|
|
|
|
|
|
|
|
// I've no idea wtf was going on here. This code was likely incorrect to begin with.
|
|
|
|
|
|
|
|
Latte::Layout::BackgroundStyle style = id
|
|
|
|
|
|
|
|
? Latte::Layout::PatternBackgroundStyle
|
|
|
|
|
|
|
|
: Latte::Layout::ColorBackgroundStyle;
|
|
|
|
|
|
|
|
setBackgroundStyle(static_cast<Latte::Layout::BackgroundStyle>(style));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -264,11 +270,11 @@ void DetailsHandler::onCurrentLayoutIndexChanged(int row)
|
|
|
|
if (hasChangedData()) { //new layout was chosen but there are changes
|
|
|
|
if (hasChangedData()) { //new layout was chosen but there are changes
|
|
|
|
KMessageBox::ButtonCode result = saveChangesConfirmation();
|
|
|
|
KMessageBox::ButtonCode result = saveChangesConfirmation();
|
|
|
|
|
|
|
|
|
|
|
|
if (result == KMessageBox::Yes) {
|
|
|
|
if (result == KMessageBox::PrimaryAction) {
|
|
|
|
switchtonewlayout = true;
|
|
|
|
switchtonewlayout = true;
|
|
|
|
m_lastConfirmedLayoutIndex = row;
|
|
|
|
m_lastConfirmedLayoutIndex = row;
|
|
|
|
save();
|
|
|
|
save();
|
|
|
|
} else if (result == KMessageBox::No) {
|
|
|
|
} else if (result == KMessageBox::SecondaryAction) {
|
|
|
|
switchtonewlayout = true;
|
|
|
|
switchtonewlayout = true;
|
|
|
|
m_lastConfirmedLayoutIndex = row;
|
|
|
|
m_lastConfirmedLayoutIndex = row;
|
|
|
|
} else if (result == KMessageBox::Cancel) {
|
|
|
|
} else if (result == KMessageBox::Cancel) {
|
|
|
|