55 , DecorationSettingsPrivate(parent)
56 , m_alphaChannelSupported(true)
57 , m_onAllDesktopsAvailable(true)
58 , m_closeOnDoubleClick(false)
59 , m_leftButtons(new
ButtonsModel(QList<DecorationButtonType>({DecorationButtonType::Menu,
60 DecorationButtonType::ApplicationMenu,
61 DecorationButtonType::OnAllDesktops}),
63 , m_rightButtons(
new ButtonsModel(QList<DecorationButtonType>({DecorationButtonType::ContextHelp,
64 DecorationButtonType::Minimize,
65 DecorationButtonType::Maximize,
66 DecorationButtonType::Close}),
68 , m_availableButtons(
new ButtonsModel(QList<DecorationButtonType>({DecorationButtonType::Menu,
69 DecorationButtonType::ApplicationMenu,
70 DecorationButtonType::OnAllDesktops,
71 DecorationButtonType::Minimize,
72 DecorationButtonType::Maximize,
73 DecorationButtonType::Close,
74 DecorationButtonType::ContextHelp,
75 DecorationButtonType::Shade,
76 DecorationButtonType::KeepBelow,
77 DecorationButtonType::KeepAbove}),
79 , m_borderSizes(
new BorderSizesModel(
this))
80 , m_borderSize(
int(BorderSize::Normal))
81 , m_font(QFontDatabase::systemFont(QFontDatabase::TitleFont))
87 auto updateLeft = [
this, parent]() {
88 Q_EMIT parent->decorationButtonsLeftChanged(decorationButtonsLeft());
90 auto updateRight = [
this, parent]() {
91 Q_EMIT parent->decorationButtonsRightChanged(decorationButtonsRight());
93 connect(m_leftButtons, &QAbstractItemModel::rowsRemoved,
this, updateLeft);
94 connect(m_leftButtons, &QAbstractItemModel::rowsMoved,
this, updateLeft);
95 connect(m_leftButtons, &QAbstractItemModel::rowsInserted,
this, updateLeft);
96 connect(m_rightButtons, &QAbstractItemModel::rowsRemoved,
this, updateRight);
97 connect(m_rightButtons, &QAbstractItemModel::rowsMoved,
this, updateRight);
98 connect(m_rightButtons, &QAbstractItemModel::rowsInserted,
this, updateRight);