🐞 fix(UI模块): 根据设计规范修改标题栏

平板模式放大标题栏高度以及按钮大小,图标大小不变

179544 【窗管】【多端协同】应用PC和平板模式下的三联按钮大小一样,预期是:平板模式比PC模式稍大一些,类似终端样式
This commit is contained in:
huheng@kylinos.cn 2023-07-05 10:54:59 +08:00
parent 3c058e8cf6
commit 5251c87368
1 changed files with 13 additions and 2 deletions

View File

@ -6,10 +6,11 @@
#include <QDBusConnection>
#include <usermanual.h>
const int DEFAULT_HEIGHT = 40;
const int TABLET_HEIGHT = 52;
const int DEFAULT_HEIGHT = 48;
const int TABLET_HEIGHT = 64;
const int ICON_SIZE = 16;
const int BTN_SIZE = 36;
const int TABLET_BTN_SIZE = 48;
Titlebar::Titlebar(QWidget *parent) : QWidget(parent)
{
@ -99,10 +100,20 @@ void Titlebar::changeMode(PublicAttributes::Model model)
m_isMaximize = false;
}
if (model == PublicAttributes::Model::Table) {
setFixedHeight(TABLET_HEIGHT);
m_titleIcon->setIconSize(QSize(32, 32));
m_isMaximize = true;
m_maxBtn->hide();
m_menuBtn->setFixedSize(TABLET_BTN_SIZE, TABLET_BTN_SIZE);
m_minBtn->setFixedSize(TABLET_BTN_SIZE, TABLET_BTN_SIZE);
m_closeBtn->setFixedSize(TABLET_BTN_SIZE, TABLET_BTN_SIZE);
} else {
setFixedHeight(DEFAULT_HEIGHT);
m_titleIcon->setIconSize(QSize(24, 24));
m_maxBtn->show();
m_menuBtn->setFixedSize(BTN_SIZE, BTN_SIZE);
m_minBtn->setFixedSize(BTN_SIZE, BTN_SIZE);
m_closeBtn->setFixedSize(BTN_SIZE, BTN_SIZE);
}
}