Skip to content

Commit

Permalink
Revert "feat: hide compact mode"
Browse files Browse the repository at this point in the history
This reverts commit fd30c4f.
  • Loading branch information
mhduiy committed Oct 9, 2024
1 parent 40b5435 commit 118d225
Showing 1 changed file with 22 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,28 @@ PersonalizationDesktopModule::PersonalizationDesktopModule(PersonalizationModel
&PersonalizationDesktopModule::initMiniEffect);
group->appendChild(itemMinimizeEffect);

auto compactDisplayModule = new WidgetModule<SwitchWidget>(
"compactDisplay",
tr("Compact Display"),
[this](SwitchWidget *switchButton) {
connect(m_model,
&PersonalizationModel::compactDisplayChanged,
switchButton,
[=](const bool status) {
switchButton->setChecked(status);
});
connect(switchButton,
&SwitchWidget::checkedChanged,
this,
[this](const bool status){
m_work->setCompactDisplay(status);
});

switchButton->setTitle(tr("Compact Display"));
switchButton->addBackground();
switchButton->setChecked(m_model->getCompactDisplay());
});
appendChild(compactDisplayModule);
compactDisplayModule->setVisible(false);

appendChild(new WidgetModule<SwitchWidget>(
"compactDisplay",
tr("Compact Display"),
[this](SwitchWidget *switchButton) {
connect(m_model,
&PersonalizationModel::compactDisplayChanged,
switchButton,
[=](const bool status) {
switchButton->setChecked(status);
});
connect(switchButton,
&SwitchWidget::checkedChanged,
this,
[this](const bool status){
m_work->setCompactDisplay(status);
});

switchButton->setTitle(tr("Compact Display"));
switchButton->addBackground();
switchButton->setChecked(m_model->getCompactDisplay());
}));

auto compactDisplayTipModule = new WidgetModule<DTipLabel>(
"compactDisplayTip",
Expand All @@ -83,7 +82,6 @@ PersonalizationDesktopModule::PersonalizationDesktopModule(PersonalizationModel
label->setText(tr("If enabled, more content is displayed in the window."));
});
appendChild(compactDisplayTipModule);
compactDisplayTipModule->setVisible(false);

HorizontalModule *hor = new HorizontalModule(QString(), QString());
appendChild(hor);
Expand Down

0 comments on commit 118d225

Please sign in to comment.