kcm/decorations: Fix thumbnail border size on theme change

Correctly update the thumbnails' border sizes when the theme
changes and `Theme's Default` is selected,
as different themes may have different border defaults.

Before 9cf52340e, this was implicitly done on QML side.
Do it explicitly now on C++ side.
This commit is contained in:
Ismael Asensio 2020-11-13 22:57:30 +01:00 committed by Nate Graham
parent 88f1883e90
commit 47efd17763

View file

@ -72,6 +72,12 @@ KCMKWinDecoration::KCMKWinDecoration(QObject *parent, const QVariantList &argume
connect(this, &KCMKWinDecoration::borderSizeChanged, this, &KCMKWinDecoration::borderIndexChanged);
connect(this, &KCMKWinDecoration::themeChanged, this, &KCMKWinDecoration::borderIndexChanged);
connect(this, &KCMKWinDecoration::themeChanged, this, [=](){
if (m_data->settings()->borderSizeAuto()) {
setBorderSize(recommendedBorderSize());
}
});
connect(m_leftButtonsModel, &QAbstractItemModel::rowsInserted, this, &KCMKWinDecoration::onLeftButtonsChanged);
connect(m_leftButtonsModel, &QAbstractItemModel::rowsMoved, this, &KCMKWinDecoration::onLeftButtonsChanged);
connect(m_leftButtonsModel, &QAbstractItemModel::rowsRemoved, this, &KCMKWinDecoration::onLeftButtonsChanged);