qt_demoe/ui/core_base/appdata.cpp

21 lines
600 B
C++
Raw Normal View History

2021-11-17 07:33:19 +00:00
#include "appdata.h"
#include "quihelper.h"
QString AppData::TitleFlag = "(QQ: 517216493 WX: feiyangqingyun)";
int AppData::RowHeight = 25;
int AppData::RightWidth = 180;
2022-04-05 12:54:45 +00:00
int AppData::FormWidth = 1200;
int AppData::FormHeight = 750;
2021-11-17 07:33:19 +00:00
void AppData::checkRatio()
{
//根据分辨率设定宽高
int width = QUIHelper::deskWidth();
2022-04-05 12:54:45 +00:00
if (width >= 1440) {
2021-11-17 07:33:19 +00:00
RowHeight = RowHeight < 25 ? 25 : RowHeight;
RightWidth = RightWidth < 220 ? 220 : RightWidth;
2022-04-05 12:54:45 +00:00
FormWidth = FormWidth < 1200 ? 1200 : FormWidth;
FormHeight = FormHeight < 800 ? 800 : FormHeight;
2021-11-17 07:33:19 +00:00
}
}