🦄 refactor(UI模块): 修改当前模式flag
This commit is contained in:
parent
f2825dd8e7
commit
46fb83ee74
|
@ -11,6 +11,10 @@ enum DeviceType {
|
|||
Pc = 0,
|
||||
Android,
|
||||
};
|
||||
enum Model {
|
||||
Table, // 平板模式
|
||||
Pc, // PC模式
|
||||
};
|
||||
|
||||
} // namespace PublicAttributes
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue