🦄 refactor(UI模块): 修改当前模式flag

This commit is contained in:
huheng@kylinos.cn 2022-11-22 09:38:14 +08:00
parent f2825dd8e7
commit 46fb83ee74
3 changed files with 7 additions and 3 deletions

View File

@ -11,6 +11,10 @@ enum DeviceType {
Pc = 0,
Android,
};
enum Model {
Table, // 平板模式
Pc, // PC模式
};
} // namespace PublicAttributes

View File

@ -88,9 +88,9 @@ void Titlebar::initUI()
setLayout(layout);
}
void Titlebar::changeMode(bool isTable)
void Titlebar::changeMode(PublicAttributes::Model model)
{
if (isTable) {
if (model == PublicAttributes::Model::Table) {
m_maxBtn->hide();
} else {
m_maxBtn->show();

View File

@ -22,7 +22,7 @@ class Titlebar : public QWidget
public:
Titlebar(QWidget *parent = nullptr);
~Titlebar();
void changeMode(bool isTable);
void changeMode(PublicAttributes::Model model);
void setMaxBtnMode(bool isMax);
void initHelp(); // 设置帮助Action
void setTheme(PublicAttributes::Theme theme);