规范样式文件变量命名
This commit is contained in:
parent
c7a716aeac
commit
6d2a88a045
20
main.cpp
20
main.cpp
|
@ -81,17 +81,17 @@ int main(int argc, char *argv[])
|
||||||
if (Style::m_panelPosition == 0) {
|
if (Style::m_panelPosition == 0) {
|
||||||
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
kdk::WindowManager::setGeometry(w.windowHandle(),QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY +
|
kdk::WindowManager::setGeometry(w.windowHandle(),QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY +
|
||||||
Style::m_availableScreenHeight - Style::minh - 3, Style::minw, Style::minh));
|
Style::m_availableScreenHeight - Style::m_minh - 3, Style::m_minw, Style::m_minh));
|
||||||
} else {
|
} else {
|
||||||
w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + Style::m_availableScreenHeight - Style::minh - 3,
|
w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + Style::m_availableScreenHeight - Style::m_minh - 3,
|
||||||
Style::minw, Style::minh));
|
Style::m_minw, Style::m_minh));
|
||||||
}
|
}
|
||||||
} else if (Style::m_panelPosition == 1) {
|
} else if (Style::m_panelPosition == 1) {
|
||||||
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
kdk::WindowManager::setGeometry(w.windowHandle(),QRect(Style::m_primaryScreenX + 4,
|
kdk::WindowManager::setGeometry(w.windowHandle(),QRect(Style::m_primaryScreenX + 4,
|
||||||
Style::m_primaryScreenY + 4, Style::minw, Style::minh));
|
Style::m_primaryScreenY + 4, Style::m_minw, Style::m_minh));
|
||||||
} else {
|
} else {
|
||||||
w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + 4, Style::minw, Style::minh));
|
w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + 4, Style::m_minw, Style::m_minh));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (Style::m_panelPosition == 2) {
|
} else if (Style::m_panelPosition == 2) {
|
||||||
|
@ -99,17 +99,17 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
kdk::WindowManager::setGeometry(w.windowHandle(), QRect(Style::m_primaryScreenX + 4,
|
kdk::WindowManager::setGeometry(w.windowHandle(), QRect(Style::m_primaryScreenX + 4,
|
||||||
Style::m_primaryScreenY + 4, Style::minw, Style::minh));
|
Style::m_primaryScreenY + 4, Style::m_minw, Style::m_minh));
|
||||||
} else {
|
} else {
|
||||||
w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + 4, Style::minw, Style::minh));
|
w.setGeometry(QRect(Style::m_primaryScreenX + 4, Style::m_primaryScreenY + 4, Style::m_minw, Style::m_minh));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
kdk::WindowManager::setGeometry(w.windowHandle(), QRect(Style::m_primaryScreenX + Style::m_availableScreenWidth -
|
kdk::WindowManager::setGeometry(w.windowHandle(), QRect(Style::m_primaryScreenX + Style::m_availableScreenWidth -
|
||||||
Style::minw - 4, Style::m_primaryScreenY + 4, Style::minw, Style::minh));
|
Style::m_minw - 4, Style::m_primaryScreenY + 4, Style::m_minw, Style::m_minh));
|
||||||
} else {
|
} else {
|
||||||
w.setGeometry(QRect(Style::m_primaryScreenX + Style::m_availableScreenWidth - Style::minw - 4, Style::m_primaryScreenY + 4,
|
w.setGeometry(QRect(Style::m_primaryScreenX + Style::m_availableScreenWidth - Style::m_minw - 4, Style::m_primaryScreenY + 4,
|
||||||
Style::minw, Style::minh));
|
Style::m_minw, Style::m_minh));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,15 +39,15 @@ int PageManager::getPageNum(const int &appNum)
|
||||||
{
|
{
|
||||||
int pageNum = 0;
|
int pageNum = 0;
|
||||||
|
|
||||||
if (appNum / (Style::appColumnFirst * Style::appLineFirst) == 0) {
|
if (appNum / (Style::m_appColumnFirst * Style::m_appLineFirst) == 0) {
|
||||||
pageNum = 1;
|
pageNum = 1;
|
||||||
} else {
|
} else {
|
||||||
int appNumOtherPage = appNum - (Style::appColumnFirst * Style::appLineFirst);
|
int appNumOtherPage = appNum - (Style::m_appColumnFirst * Style::m_appLineFirst);
|
||||||
|
|
||||||
if (appNumOtherPage % (Style::appColumn * Style::appLine) == 0) {
|
if (appNumOtherPage % (Style::m_appColumn * Style::m_appLine) == 0) {
|
||||||
pageNum = appNumOtherPage / (Style::appColumn * Style::appLine) + 1;
|
pageNum = appNumOtherPage / (Style::m_appColumn * Style::m_appLine) + 1;
|
||||||
} else {
|
} else {
|
||||||
pageNum = appNumOtherPage / (Style::appColumn * Style::appLine) + 2;
|
pageNum = appNumOtherPage / (Style::m_appColumn * Style::m_appLine) + 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ QVector<QStringList> PageManager::sortAppInPage(const QVector<QString> &appVecto
|
||||||
int pageSize = getPageNum(m_data.size());
|
int pageSize = getPageNum(m_data.size());
|
||||||
onePageData.clear();
|
onePageData.clear();
|
||||||
|
|
||||||
for (int j = 0; j < Style::appColumnFirst * Style::appLineFirst; j++) {
|
for (int j = 0; j < Style::m_appColumnFirst * Style::m_appLineFirst; j++) {
|
||||||
if (m_data.size() > 0) {
|
if (m_data.size() > 0) {
|
||||||
onePageData.append(m_data.at(0));
|
onePageData.append(m_data.at(0));
|
||||||
m_data.pop_front();
|
m_data.pop_front();
|
||||||
|
@ -81,7 +81,7 @@ QVector<QStringList> PageManager::sortAppInPage(const QVector<QString> &appVecto
|
||||||
for (int i = 0; i < pageSize - 1; i++) {
|
for (int i = 0; i < pageSize - 1; i++) {
|
||||||
onePageData.clear();
|
onePageData.clear();
|
||||||
|
|
||||||
for (int j = 0; j < Style::appColumn * Style::appLine; j++) {
|
for (int j = 0; j < Style::m_appColumn * Style::m_appLine; j++) {
|
||||||
if (m_data.size() > 0) {
|
if (m_data.size() > 0) {
|
||||||
onePageData.append(m_data.at(0));
|
onePageData.append(m_data.at(0));
|
||||||
m_data.pop_front();
|
m_data.pop_front();
|
||||||
|
|
|
@ -167,9 +167,9 @@ void LetterClassifyButton::leaveEvent(QEvent *e)
|
||||||
|
|
||||||
if (m_fullscreen) {
|
if (m_fullscreen) {
|
||||||
QFont font;
|
QFont font;
|
||||||
font.setPixelSize(Style::LeftLetterFontSize);
|
font.setPixelSize(Style::m_leftLetterFontSize);
|
||||||
this->setFont(font);
|
this->setFont(font);
|
||||||
this->setFixedSize(Style::LeftLetterBtnHeight, Style::LeftLetterBtnHeight);
|
this->setFixedSize(Style::m_leftLetterBtnHeight, Style::m_leftLetterBtnHeight);
|
||||||
tooltip->close();
|
tooltip->close();
|
||||||
delete tooltip;
|
delete tooltip;
|
||||||
tooltip = nullptr;
|
tooltip = nullptr;
|
||||||
|
@ -195,9 +195,9 @@ void LetterClassifyButton::focusInEvent(QEvent *e)
|
||||||
|
|
||||||
if (m_fullscreen) {
|
if (m_fullscreen) {
|
||||||
QFont font;
|
QFont font;
|
||||||
font.setPixelSize(Style::LeftLetterFontSize * 3);
|
font.setPixelSize(Style::m_leftLetterFontSize * 3);
|
||||||
this->setFont(font);
|
this->setFont(font);
|
||||||
this->setFixedSize(Style::LeftLetterBtnHeight * 2, Style::LeftLetterBtnHeight * 2);
|
this->setFixedSize(Style::m_leftLetterBtnHeight * 2, Style::m_leftLetterBtnHeight * 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ void FullListView::keyPressEvent(QKeyEvent *e)
|
||||||
case Qt::Key_Left: {
|
case Qt::Key_Left: {
|
||||||
this->clearFocus();
|
this->clearFocus();
|
||||||
|
|
||||||
if (mapToGlobal(center.topRight()).y() < Style::QueryLineEditHeight + Style::m_applistGridSizeWidth) {
|
if (mapToGlobal(center.topRight()).y() < Style::m_queryLineEditHeight + Style::m_applistGridSizeWidth) {
|
||||||
Q_EMIT sendSetslidebar(-Style::m_applistGridSizeWidth);
|
Q_EMIT sendSetslidebar(-Style::m_applistGridSizeWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ void FullListView::keyPressEvent(QKeyEvent *e)
|
||||||
|
|
||||||
case Qt::Key_Up: {
|
case Qt::Key_Up: {
|
||||||
if (module == 0) {
|
if (module == 0) {
|
||||||
if (mapToGlobal(center.topRight()).y() < (Style::QueryLineEditHeight + Style::m_applistGridSizeWidth)) {
|
if (mapToGlobal(center.topRight()).y() < (Style::m_queryLineEditHeight + Style::m_applistGridSizeWidth)) {
|
||||||
Q_EMIT sendSetslidebar(-Style::m_applistGridSizeWidth);
|
Q_EMIT sendSetslidebar(-Style::m_applistGridSizeWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -312,15 +312,15 @@ void TabletListView::mousePressEvent(QMouseEvent *event)
|
||||||
//左键
|
//左键
|
||||||
myDebug() << "左键点击,当前点坐标" << event->pos();
|
myDebug() << "左键点击,当前点坐标" << event->pos();
|
||||||
|
|
||||||
if (((this->indexAt(event->pos()).isValid()) && (m_pageNum == FIRSTPAGE) && (((pressedpos.x() % Style::TabletItemSizeWidthFirst) >= Style::FirstPageSpace) &&
|
if (((this->indexAt(event->pos()).isValid()) && (m_pageNum == FIRSTPAGE) && (((pressedpos.x() % Style::m_tabletItemSizeWidthFirst) >= Style::m_firstPageSpace) &&
|
||||||
((pressedpos.x() % Style::TabletItemSizeWidthFirst) <= (Style::FirstPageSpace + Style::AppListIconSize)) &&
|
((pressedpos.x() % Style::m_tabletItemSizeWidthFirst) <= (Style::m_firstPageSpace + Style::m_appListIconSize)) &&
|
||||||
((pressedpos.y() % Style::AppListItemSizeHeight) >= Style::m_appTopSpace) &&
|
((pressedpos.y() % Style::m_appListItemSizeHeight) >= Style::m_appTopSpace) &&
|
||||||
((pressedpos.y() % Style::AppListItemSizeHeight) <= (Style::m_appTopSpace + Style::AppListIconSize)))) ||
|
((pressedpos.y() % Style::m_appListItemSizeHeight) <= (Style::m_appTopSpace + Style::m_appListIconSize)))) ||
|
||||||
((this->indexAt(event->pos()).isValid()) && (m_pageNum == OTHERPAGE) &&
|
((this->indexAt(event->pos()).isValid()) && (m_pageNum == OTHERPAGE) &&
|
||||||
(pressedpos.x() % Style::TabletItemSizeWidthOther >= Style::OtherPageSpace &&
|
(pressedpos.x() % Style::m_tabletItemSizeWidthOther >= Style::m_otherPageSpace &&
|
||||||
pressedpos.x() % Style::TabletItemSizeWidthOther <= Style::OtherPageSpace + Style::AppListIconSize &&
|
pressedpos.x() % Style::m_tabletItemSizeWidthOther <= Style::m_otherPageSpace + Style::m_appListIconSize &&
|
||||||
pressedpos.y() % Style::AppListItemSizeHeight >= Style::m_appTopSpace &&
|
pressedpos.y() % Style::m_appListItemSizeHeight >= Style::m_appTopSpace &&
|
||||||
pressedpos.y() % Style::AppListItemSizeHeight <= Style::m_appTopSpace + Style::AppListIconSize))) {
|
pressedpos.y() % Style::m_appListItemSizeHeight <= Style::m_appTopSpace + Style::m_appListIconSize))) {
|
||||||
pressApp = listmodel->data(this->indexAt(pressedpos), Qt::DisplayRole);
|
pressApp = listmodel->data(this->indexAt(pressedpos), Qt::DisplayRole);
|
||||||
iconClick = true;
|
iconClick = true;
|
||||||
startPos = event->pos();
|
startPos = event->pos();
|
||||||
|
@ -337,15 +337,15 @@ void TabletListView::mousePressEvent(QMouseEvent *event)
|
||||||
//右键
|
//右键
|
||||||
myDebug() << "右键点击,当前点坐标" << event->pos();
|
myDebug() << "右键点击,当前点坐标" << event->pos();
|
||||||
|
|
||||||
if (((this->indexAt(event->pos()).isValid()) && (m_pageNum == FIRSTPAGE) && ((pressedpos.x()) % Style::TabletItemSizeWidthFirst >= Style::FirstPageSpace &&
|
if (((this->indexAt(event->pos()).isValid()) && (m_pageNum == FIRSTPAGE) && ((pressedpos.x()) % Style::m_tabletItemSizeWidthFirst >= Style::m_firstPageSpace &&
|
||||||
(pressedpos.x()) % Style::TabletItemSizeWidthFirst <= Style::FirstPageSpace + Style::AppListIconSize &&
|
(pressedpos.x()) % Style::m_tabletItemSizeWidthFirst <= Style::m_firstPageSpace + Style::m_appListIconSize &&
|
||||||
pressedpos.y() % Style::AppListItemSizeHeight >= Style::m_appTopSpace &&
|
pressedpos.y() % Style::m_appListItemSizeHeight >= Style::m_appTopSpace &&
|
||||||
pressedpos.y() % Style::AppListItemSizeHeight <= Style::m_appTopSpace + Style::AppListIconSize)) ||
|
pressedpos.y() % Style::m_appListItemSizeHeight <= Style::m_appTopSpace + Style::m_appListIconSize)) ||
|
||||||
((this->indexAt(event->pos()).isValid()) && (m_pageNum == OTHERPAGE) &&
|
((this->indexAt(event->pos()).isValid()) && (m_pageNum == OTHERPAGE) &&
|
||||||
(pressedpos.x() % Style::TabletItemSizeWidthOther >= Style::OtherPageSpace &&
|
(pressedpos.x() % Style::m_tabletItemSizeWidthOther >= Style::m_otherPageSpace &&
|
||||||
pressedpos.x() % Style::TabletItemSizeWidthOther <= Style::OtherPageSpace + Style::AppListIconSize &&
|
pressedpos.x() % Style::m_tabletItemSizeWidthOther <= Style::m_otherPageSpace + Style::m_appListIconSize &&
|
||||||
pressedpos.y() % Style::AppListItemSizeHeight >= Style::m_appTopSpace &&
|
pressedpos.y() % Style::m_appListItemSizeHeight >= Style::m_appTopSpace &&
|
||||||
pressedpos.y() % Style::AppListItemSizeHeight <= Style::m_appTopSpace + Style::AppListIconSize))) {
|
pressedpos.y() % Style::m_appListItemSizeHeight <= Style::m_appTopSpace + Style::m_appListIconSize))) {
|
||||||
pressApp = listmodel->data(this->indexAt(pressedpos), Qt::DisplayRole);
|
pressApp = listmodel->data(this->indexAt(pressedpos), Qt::DisplayRole);
|
||||||
right_iconClick = true;
|
right_iconClick = true;
|
||||||
right_pressedpos = pressedpos;
|
right_pressedpos = pressedpos;
|
||||||
|
@ -409,17 +409,17 @@ void TabletListView::dragMoveEvent(QDragMoveEvent *event)
|
||||||
m_time->start(500);
|
m_time->start(500);
|
||||||
|
|
||||||
if (m_pageNum == OTHERPAGE) {
|
if (m_pageNum == OTHERPAGE) {
|
||||||
if (event->pos().x() >= (Style::OtherPageViewWidth - (Style::OtherPageSpace / 2)) || event->pos().x() <= (Style::OtherPageSpace / 2)) {
|
if (event->pos().x() >= (Style::m_otherPageViewWidth - (Style::m_otherPageSpace / 2)) || event->pos().x() <= (Style::m_otherPageSpace / 2)) {
|
||||||
if (event->pos().x() <= (Style::OtherPageSpace / 2)) {
|
if (event->pos().x() <= (Style::m_otherPageSpace / 2)) {
|
||||||
Q_EMIT pagenumchanged(false);
|
Q_EMIT pagenumchanged(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event->pos().x() >= (Style::OtherPageViewWidth - (Style::OtherPageSpace / 2))) {
|
if (event->pos().x() >= (Style::m_otherPageViewWidth - (Style::m_otherPageSpace / 2))) {
|
||||||
Q_EMIT pagenumchanged(true);
|
Q_EMIT pagenumchanged(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (event->pos().x() >= (Style::FirsPageViewWidth - (Style::FirstPageSpace / 2))) {
|
if (event->pos().x() >= (Style::m_firsPageViewWidth - (Style::m_firstPageSpace / 2))) {
|
||||||
Q_EMIT pagenumchanged(true);
|
Q_EMIT pagenumchanged(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -507,9 +507,9 @@ void TabletListView::insertApplication(QPoint pressedpos, QPoint releasepos)
|
||||||
QString desktopfn2 = fileInfo2.fileName();
|
QString desktopfn2 = fileInfo2.fileName();
|
||||||
|
|
||||||
if (m_pageNum == FIRSTPAGE) {
|
if (m_pageNum == FIRSTPAGE) {
|
||||||
releasepos.setX(releasepos.x() + Style::OtherPageSpace);
|
releasepos.setX(releasepos.x() + Style::m_otherPageSpace);
|
||||||
} else {
|
} else {
|
||||||
releasepos.setX(releasepos.x() + Style::FirstPageSpace);
|
releasepos.setX(releasepos.x() + Style::m_firstPageSpace);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant var3 = listmodel->data(this->indexAt(releasepos), Qt::DisplayRole);//释放位置右侧有应用
|
QVariant var3 = listmodel->data(this->indexAt(releasepos), Qt::DisplayRole);//释放位置右侧有应用
|
||||||
|
@ -518,9 +518,9 @@ void TabletListView::insertApplication(QPoint pressedpos, QPoint releasepos)
|
||||||
QString desktopfn3 = fileInfo3.fileName();
|
QString desktopfn3 = fileInfo3.fileName();
|
||||||
|
|
||||||
if (m_pageNum == FIRSTPAGE) {
|
if (m_pageNum == FIRSTPAGE) {
|
||||||
releasepos.setX(releasepos.x() - (Style::OtherPageSpace * 2));
|
releasepos.setX(releasepos.x() - (Style::m_otherPageSpace * 2));
|
||||||
} else {
|
} else {
|
||||||
releasepos.setX(releasepos.x() - (Style::FirstPageSpace * 2));
|
releasepos.setX(releasepos.x() - (Style::m_firstPageSpace * 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant var4 = listmodel->data(this->indexAt(releasepos), Qt::DisplayRole);//右侧没有左侧有
|
QVariant var4 = listmodel->data(this->indexAt(releasepos), Qt::DisplayRole);//右侧没有左侧有
|
||||||
|
@ -624,22 +624,22 @@ void TabletListView::insertApplication(QPoint pressedpos, QPoint releasepos)
|
||||||
QFileInfo fileInfo2(pressDesktopfp);
|
QFileInfo fileInfo2(pressDesktopfp);
|
||||||
QString desktopfn2 = fileInfo2.fileName();
|
QString desktopfn2 = fileInfo2.fileName();
|
||||||
|
|
||||||
if (((this->indexAt(releasepos).isValid()) && (m_pageNum == FIRSTPAGE) && ((releasepos.x()) % Style::TabletItemSizeWidthFirst >= Style::FirstPageSpace &&
|
if (((this->indexAt(releasepos).isValid()) && (m_pageNum == FIRSTPAGE) && ((releasepos.x()) % Style::m_tabletItemSizeWidthFirst >= Style::m_firstPageSpace &&
|
||||||
(releasepos.x()) % Style::TabletItemSizeWidthFirst <= Style::FirstPageSpace + Style::AppListIconSize &&
|
(releasepos.x()) % Style::m_tabletItemSizeWidthFirst <= Style::m_firstPageSpace + Style::m_appListIconSize &&
|
||||||
releasepos.y() % Style::AppListItemSizeHeight >= Style::m_appTopSpace &&
|
releasepos.y() % Style::m_appListItemSizeHeight >= Style::m_appTopSpace &&
|
||||||
releasepos.y() % Style::AppListItemSizeHeight <= Style::m_appTopSpace + Style::AppListIconSize)) ||
|
releasepos.y() % Style::m_appListItemSizeHeight <= Style::m_appTopSpace + Style::m_appListIconSize)) ||
|
||||||
((this->indexAt(releasepos).isValid()) && (m_pageNum == OTHERPAGE) &&
|
((this->indexAt(releasepos).isValid()) && (m_pageNum == OTHERPAGE) &&
|
||||||
(releasepos.x() % Style::TabletItemSizeWidthOther >= Style::OtherPageSpace &&
|
(releasepos.x() % Style::m_tabletItemSizeWidthOther >= Style::m_otherPageSpace &&
|
||||||
releasepos.x() % Style::TabletItemSizeWidthOther <= Style::OtherPageSpace + Style::AppListIconSize &&
|
releasepos.x() % Style::m_tabletItemSizeWidthOther <= Style::m_otherPageSpace + Style::m_appListIconSize &&
|
||||||
releasepos.y() % Style::AppListItemSizeHeight >= Style::m_appTopSpace &&
|
releasepos.y() % Style::m_appListItemSizeHeight >= Style::m_appTopSpace &&
|
||||||
releasepos.y() % Style::AppListItemSizeHeight <= Style::m_appTopSpace + Style::AppListIconSize))) {
|
releasepos.y() % Style::m_appListItemSizeHeight <= Style::m_appTopSpace + Style::m_appListIconSize))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_pageNum == FIRSTPAGE) {
|
if (m_pageNum == FIRSTPAGE) {
|
||||||
releasepos.setX(releasepos.x() + Style::FirstPageSpace);
|
releasepos.setX(releasepos.x() + Style::m_firstPageSpace);
|
||||||
} else {
|
} else {
|
||||||
releasepos.setX(releasepos.x() + Style::OtherPageSpace);
|
releasepos.setX(releasepos.x() + Style::m_otherPageSpace);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant var3 = listmodel->data(this->indexAt(releasepos), Qt::DisplayRole);//释放位置右侧有应用
|
QVariant var3 = listmodel->data(this->indexAt(releasepos), Qt::DisplayRole);//释放位置右侧有应用
|
||||||
|
@ -648,9 +648,9 @@ void TabletListView::insertApplication(QPoint pressedpos, QPoint releasepos)
|
||||||
QString desktopfn3 = fileInfo3.fileName();
|
QString desktopfn3 = fileInfo3.fileName();
|
||||||
|
|
||||||
if (m_pageNum == FIRSTPAGE) {
|
if (m_pageNum == FIRSTPAGE) {
|
||||||
releasepos.setX(releasepos.x() - Style::FirstPageSpace * 2);
|
releasepos.setX(releasepos.x() - Style::m_firstPageSpace * 2);
|
||||||
} else {
|
} else {
|
||||||
releasepos.setX(releasepos.x() - Style::OtherPageSpace * 2);
|
releasepos.setX(releasepos.x() - Style::m_otherPageSpace * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant var4 = listmodel->data(this->indexAt(releasepos), Qt::DisplayRole);//右侧没有左侧有
|
QVariant var4 = listmodel->data(this->indexAt(releasepos), Qt::DisplayRole);//右侧没有左侧有
|
||||||
|
|
|
@ -121,10 +121,10 @@ void FullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
||||||
QString appname = m_ukuiMenuInterface->getAppName(desktopfp);
|
QString appname = m_ukuiMenuInterface->getAppName(desktopfp);
|
||||||
QRect iconRect;
|
QRect iconRect;
|
||||||
QRect textRect;
|
QRect textRect;
|
||||||
iconRect = QRect(rect.x() + (rect.width() - Style::AppListIconSize) / 2,
|
iconRect = QRect(rect.x() + (rect.width() - Style::m_appListIconSize) / 2,
|
||||||
rect.y() + Style::m_appTopSpace,
|
rect.y() + Style::m_appTopSpace,
|
||||||
Style::AppListIconSize,
|
Style::m_appListIconSize,
|
||||||
Style::AppListIconSize);
|
Style::m_appListIconSize);
|
||||||
icon.paint(painter, iconRect);
|
icon.paint(painter, iconRect);
|
||||||
painter->restore();
|
painter->restore();
|
||||||
painter->save();
|
painter->save();
|
||||||
|
@ -143,7 +143,7 @@ void FullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
||||||
|
|
||||||
painter->restore();
|
painter->restore();
|
||||||
textRect = QRect(rect.x() + 5,
|
textRect = QRect(rect.x() + 5,
|
||||||
iconRect.bottom() + Style::AppSpaceBetweenIconText,
|
iconRect.bottom() + Style::m_appSpaceBetweenIconText,
|
||||||
rect.width() - 10,
|
rect.width() - 10,
|
||||||
Style::m_appTextRectHeight);
|
Style::m_appTextRectHeight);
|
||||||
painter->save();
|
painter->save();
|
||||||
|
@ -156,7 +156,7 @@ void FullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
||||||
is_recentapp = true;
|
is_recentapp = true;
|
||||||
appnameElidedText = fm.elidedText(appname, Qt::ElideRight, rect.width() - 23, Qt::TextShowMnemonic);
|
appnameElidedText = fm.elidedText(appname, Qt::ElideRight, rect.width() - 23, Qt::TextShowMnemonic);
|
||||||
textRect = QRect(rect.x() + 18,
|
textRect = QRect(rect.x() + 18,
|
||||||
iconRect.bottom() + Style::AppSpaceBetweenIconText,
|
iconRect.bottom() + Style::m_appSpaceBetweenIconText,
|
||||||
rect.width() - 23,
|
rect.width() - 23,
|
||||||
Style::m_appTextRectHeight);
|
Style::m_appTextRectHeight);
|
||||||
painter->setPen(QPen(Qt::NoPen));
|
painter->setPen(QPen(Qt::NoPen));
|
||||||
|
@ -220,5 +220,5 @@ void FullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
||||||
|
|
||||||
QSize FullItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
QSize FullItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
return QSize(Style::AppListItemSizeWidth, Style::AppListItemSizeWidth);
|
return QSize(Style::m_appListItemSizeWidth, Style::m_appListItemSizeWidth);
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,9 +160,9 @@ void RightItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opt
|
||||||
is_recentapp = true;
|
is_recentapp = true;
|
||||||
appnameElidedText = fm.elidedText(appname, Qt::ElideRight, rect.width() - 23, Qt::TextShowMnemonic);
|
appnameElidedText = fm.elidedText(appname, Qt::ElideRight, rect.width() - 23, Qt::TextShowMnemonic);
|
||||||
textRect = QRect(rect.x() + 18,
|
textRect = QRect(rect.x() + 18,
|
||||||
iconRect.bottom() + Style::AppSpaceBetweenIconText,
|
iconRect.bottom() + Style::m_appSpaceBetweenIconText,
|
||||||
rect.width() - 23,
|
rect.width() - 23,
|
||||||
rect.height() - iconRect.height() - Style::AppSpaceBetweenIconText);
|
rect.height() - iconRect.height() - Style::m_appSpaceBetweenIconText);
|
||||||
painter->setPen(QPen(Qt::NoPen));
|
painter->setPen(QPen(Qt::NoPen));
|
||||||
painter->setBrush(QColor("#4d94ff"));
|
painter->setBrush(QColor("#4d94ff"));
|
||||||
int x = 0;
|
int x = 0;
|
||||||
|
|
|
@ -112,14 +112,14 @@ void TabletFullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bigIcon = index.data(Qt::UserRole + 2).toBool();
|
bool bigIcon = index.data(Qt::UserRole + 2).toBool();
|
||||||
int iconTopSpace = (rect.height() - Style::AppListIconSize) / 2;
|
int iconTopSpace = (rect.height() - Style::m_appListIconSize) / 2;
|
||||||
int iconLeftSpace = (rect.width() - Style::AppListIconSize) / 2;
|
int iconLeftSpace = (rect.width() - Style::m_appListIconSize) / 2;
|
||||||
|
|
||||||
if (bigIcon) {
|
if (bigIcon) {
|
||||||
iconRect = QRect(rect.x() + iconLeftSpace - 6,
|
iconRect = QRect(rect.x() + iconLeftSpace - 6,
|
||||||
rect.y() + iconTopSpace - 6,
|
rect.y() + iconTopSpace - 6,
|
||||||
Style::AppListIconSize + 12,
|
Style::m_appListIconSize + 12,
|
||||||
Style::AppListIconSize + 12);
|
Style::m_appListIconSize + 12);
|
||||||
textRect = QRect(rect.x(),
|
textRect = QRect(rect.x(),
|
||||||
rect.bottom() - iconTopSpace,
|
rect.bottom() - iconTopSpace,
|
||||||
rect.width(),
|
rect.width(),
|
||||||
|
@ -127,8 +127,8 @@ void TabletFullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
||||||
} else {
|
} else {
|
||||||
iconRect = QRect(rect.x() + iconLeftSpace,
|
iconRect = QRect(rect.x() + iconLeftSpace,
|
||||||
rect.y() + iconTopSpace,
|
rect.y() + iconTopSpace,
|
||||||
Style::AppListIconSize,
|
Style::m_appListIconSize,
|
||||||
Style::AppListIconSize);
|
Style::m_appListIconSize);
|
||||||
textRect = QRect(rect.x(),
|
textRect = QRect(rect.x(),
|
||||||
rect.bottom() - iconTopSpace,
|
rect.bottom() - iconTopSpace,
|
||||||
rect.width(),
|
rect.width(),
|
||||||
|
@ -165,10 +165,10 @@ void TabletFullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
|
|
||||||
if (bigIcon) {
|
if (bigIcon) {
|
||||||
pixmap = icon.pixmap((Style::AppListBigIconSize, Style::AppListBigIconSize), QIcon::Disabled, QIcon::Off); //wgx
|
pixmap = icon.pixmap((Style::m_appListBigIconSize, Style::m_appListBigIconSize), QIcon::Disabled, QIcon::Off); //wgx
|
||||||
pixmap = pixmap.scaled(Style::AppListBigIconSize, Style::AppListBigIconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
pixmap = pixmap.scaled(Style::m_appListBigIconSize, Style::m_appListBigIconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||||
} else {
|
} else {
|
||||||
pixmap = icon.pixmap((Style::AppListIconSize, Style::AppListIconSize), QIcon::Disabled, QIcon::Off); //wgx
|
pixmap = icon.pixmap((Style::m_appListIconSize, Style::m_appListIconSize), QIcon::Disabled, QIcon::Off); //wgx
|
||||||
}
|
}
|
||||||
|
|
||||||
icon = QIcon(pixmap);
|
icon = QIcon(pixmap);
|
||||||
|
@ -176,10 +176,10 @@ void TabletFullItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
||||||
QPixmap mPixmap;
|
QPixmap mPixmap;
|
||||||
|
|
||||||
if (bigIcon) {
|
if (bigIcon) {
|
||||||
mPixmap = icon.pixmap((Style::AppListBigIconSize, Style::AppListBigIconSize)); //wgx
|
mPixmap = icon.pixmap((Style::m_appListBigIconSize, Style::m_appListBigIconSize)); //wgx
|
||||||
mPixmap = mPixmap.scaled(Style::AppListBigIconSize, Style::AppListBigIconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
mPixmap = mPixmap.scaled(Style::m_appListBigIconSize, Style::m_appListBigIconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||||
} else {
|
} else {
|
||||||
mPixmap = icon.pixmap((Style::AppListIconSize, Style::AppListIconSize)); //wgx
|
mPixmap = icon.pixmap((Style::m_appListIconSize, Style::m_appListIconSize)); //wgx
|
||||||
}
|
}
|
||||||
|
|
||||||
icon = QIcon(mPixmap);
|
icon = QIcon(mPixmap);
|
||||||
|
@ -209,6 +209,6 @@ QSize TabletFullItemDelegate::sizeHint(const QStyleOptionViewItem &option, const
|
||||||
// {
|
// {
|
||||||
// return QSize(0,0);
|
// return QSize(0,0);
|
||||||
// }
|
// }
|
||||||
return QSize(Style::TabletItemSizeWidthFirst, Style::AppListItemSizeHeight);
|
return QSize(Style::m_tabletItemSizeWidthFirst, Style::m_appListItemSizeHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -301,7 +301,7 @@ void FullFunctionWidget::resizeScrollAreaControls()
|
||||||
void FullFunctionWidget::initIconListWidget()
|
void FullFunctionWidget::initIconListWidget()
|
||||||
{
|
{
|
||||||
m_iconListWidLayout = new QVBoxLayout(m_iconListWid);
|
m_iconListWidLayout = new QVBoxLayout(m_iconListWid);
|
||||||
m_iconListWidLayout->setSpacing(Style::LeftSpaceBetweenItem);
|
m_iconListWidLayout->setSpacing(Style::m_leftSpaceBetweenItem);
|
||||||
m_iconListWidLayout->setContentsMargins(45, 0, 0, 0);
|
m_iconListWidLayout->setContentsMargins(45, 0, 0, 0);
|
||||||
m_topSpacerItem = new QSpacerItem(20, 40, QSizePolicy::Fixed, QSizePolicy::Expanding);
|
m_topSpacerItem = new QSpacerItem(20, 40, QSizePolicy::Fixed, QSizePolicy::Expanding);
|
||||||
m_bottomSpacerItem = new QSpacerItem(20, 40, QSizePolicy::Fixed, QSizePolicy::Expanding);
|
m_bottomSpacerItem = new QSpacerItem(20, 40, QSizePolicy::Fixed, QSizePolicy::Expanding);
|
||||||
|
@ -329,9 +329,9 @@ void FullFunctionWidget::initIconListScrollArea()
|
||||||
|
|
||||||
for (int i = 0; i < m_classificationList.size(); i++) {
|
for (int i = 0; i < m_classificationList.size(); i++) {
|
||||||
FunctionClassifyButton *iconbtn = new FunctionClassifyButton(
|
FunctionClassifyButton *iconbtn = new FunctionClassifyButton(
|
||||||
Style::LeftBtnWidth,
|
Style::m_leftBtnWidth,
|
||||||
Style::LeftBtnHeight,
|
Style::m_leftBtnHeight,
|
||||||
Style::LeftIconSize,
|
Style::m_leftIconSize,
|
||||||
m_classificationList.at(i),
|
m_classificationList.at(i),
|
||||||
true,
|
true,
|
||||||
true);
|
true);
|
||||||
|
@ -451,9 +451,9 @@ void FullFunctionWidget::enterAnimation()
|
||||||
m_animation->setDuration(200);//动画总时间
|
m_animation->setDuration(200);//动画总时间
|
||||||
m_animation->setStartValue(QRect(0, 0,
|
m_animation->setStartValue(QRect(0, 0,
|
||||||
0, m_iconListWid->height()));
|
0, m_iconListWid->height()));
|
||||||
m_animation->setEndValue(QRect(Style::LeftMargin,
|
m_animation->setEndValue(QRect(Style::m_leftMargin,
|
||||||
0,
|
0,
|
||||||
Style::LeftBtnWidth,
|
Style::m_leftBtnWidth,
|
||||||
m_iconListWid->height()));
|
m_iconListWid->height()));
|
||||||
m_animation->setEasingCurve(QEasingCurve::InQuart);
|
m_animation->setEasingCurve(QEasingCurve::InQuart);
|
||||||
m_animation->start();
|
m_animation->start();
|
||||||
|
@ -463,9 +463,9 @@ void FullFunctionWidget::enterAnimation()
|
||||||
void FullFunctionWidget::setFunctionBtnGeometry()
|
void FullFunctionWidget::setFunctionBtnGeometry()
|
||||||
{
|
{
|
||||||
// int height=m_classificationList.size()*Style::LeftBtnHeight+(m_classificationList.size()-1)*Style::LeftSpaceBetweenItem;
|
// int height=m_classificationList.size()*Style::LeftBtnHeight+(m_classificationList.size()-1)*Style::LeftSpaceBetweenItem;
|
||||||
m_iconListScrollAreaWid->setGeometry(QRect(Style::LeftMargin,
|
m_iconListScrollAreaWid->setGeometry(QRect(Style::m_leftMargin,
|
||||||
0,
|
0,
|
||||||
Style::LeftBtnWidth,
|
Style::m_leftBtnWidth,
|
||||||
m_iconListWid->height()));
|
m_iconListWid->height()));
|
||||||
m_iconListScrollAreaWid->show();
|
m_iconListScrollAreaWid->show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -342,7 +342,7 @@ void FullLetterWidget::initLetterListScrollArea()
|
||||||
LetterClassifyButton *letterbtn = new LetterClassifyButton(m_letterListWid,
|
LetterClassifyButton *letterbtn = new LetterClassifyButton(m_letterListWid,
|
||||||
true,
|
true,
|
||||||
m_letterList.at(i));
|
m_letterList.at(i));
|
||||||
letterbtn->setFixedSize(Style::LeftLetterBtnHeight, Style::LeftLetterBtnHeight);
|
letterbtn->setFixedSize(Style::m_leftLetterBtnHeight, Style::m_leftLetterBtnHeight);
|
||||||
m_buttonList.append(letterbtn);
|
m_buttonList.append(letterbtn);
|
||||||
m_letterListWidLayout->addWidget(letterbtn);
|
m_letterListWidLayout->addWidget(letterbtn);
|
||||||
m_letterListWidLayout->setAlignment(letterbtn, Qt::AlignLeft);
|
m_letterListWidLayout->setAlignment(letterbtn, Qt::AlignLeft);
|
||||||
|
@ -459,12 +459,12 @@ void FullLetterWidget::valueChangedSlot(int value)
|
||||||
void FullLetterWidget::enterAnimation()
|
void FullLetterWidget::enterAnimation()
|
||||||
{
|
{
|
||||||
m_animation->setDuration(200);//动画总时间
|
m_animation->setDuration(200);//动画总时间
|
||||||
m_animation->setStartValue(QRect(0, (m_letterListWid->height() - (m_letterList.size() + 1)*Style::LeftLetterBtnHeight) / 2,
|
m_animation->setStartValue(QRect(0, (m_letterListWid->height() - (m_letterList.size() + 1)*Style::m_leftLetterBtnHeight) / 2,
|
||||||
0, (m_letterList.size() + 1)*Style::LeftLetterBtnHeight));
|
0, (m_letterList.size() + 1)*Style::m_leftLetterBtnHeight));
|
||||||
m_animation->setEndValue(QRect(Style::LeftMargin,
|
m_animation->setEndValue(QRect(Style::m_leftMargin,
|
||||||
(m_letterListWid->height() - (m_letterList.size() + 1)*Style::LeftLetterBtnHeight) / 2,
|
(m_letterListWid->height() - (m_letterList.size() + 1)*Style::m_leftLetterBtnHeight) / 2,
|
||||||
Style::LeftLetterBtnHeight * 2,
|
Style::m_leftLetterBtnHeight * 2,
|
||||||
(m_letterList.size() + 1)*Style::LeftLetterBtnHeight));
|
(m_letterList.size() + 1)*Style::m_leftLetterBtnHeight));
|
||||||
m_animation->setEasingCurve(QEasingCurve::InQuart);
|
m_animation->setEasingCurve(QEasingCurve::InQuart);
|
||||||
m_animation->start();
|
m_animation->start();
|
||||||
// m_letterListScrollArea->show();
|
// m_letterListScrollArea->show();
|
||||||
|
|
|
@ -55,9 +55,9 @@ void FunctionButtonWidget::initUi()
|
||||||
|
|
||||||
for (int row = 0; row < 6; row++)
|
for (int row = 0; row < 6; row++)
|
||||||
for (int col = 0; col < 2; col++) {
|
for (int col = 0; col < 2; col++) {
|
||||||
FunctionClassifyButton *iconbtn = new FunctionClassifyButton(Style::LeftBtnWidth,
|
FunctionClassifyButton *iconbtn = new FunctionClassifyButton(Style::m_leftBtnWidth,
|
||||||
Style::LeftBtnHeight,
|
Style::m_leftBtnHeight,
|
||||||
Style::LeftIconSize,
|
Style::m_leftIconSize,
|
||||||
m_categoryList.at(row * 2 + col),
|
m_categoryList.at(row * 2 + col),
|
||||||
false,
|
false,
|
||||||
false);
|
false);
|
||||||
|
|
|
@ -337,7 +337,7 @@ bool FullMainWindow::eventFilter(QObject *watched, QEvent *event)
|
||||||
m_queryText->setParent(nullptr);
|
m_queryText->setParent(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_queryWid->setGeometry(6, 2, m_queryIcon->width() + 5, Style::QueryLineEditHeight);
|
m_queryWid->setGeometry(6, 2, m_queryIcon->width() + 5, Style::m_queryLineEditHeight);
|
||||||
m_queryWid->layout()->setAlignment(Qt::AlignVCenter);
|
m_queryWid->layout()->setAlignment(Qt::AlignVCenter);
|
||||||
m_lineEdit->setTextMargins(26, 0, 0, 0);
|
m_lineEdit->setTextMargins(26, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
Style::initWidStyle();
|
Style::initWidStyle();
|
||||||
openDataBase("MainThreadDataBase");
|
openDataBase("MainThreadDataBase");
|
||||||
initDatabase();
|
initDatabase();
|
||||||
this->resize(Style::minw, Style::minh);
|
this->resize(Style::m_minw, Style::m_minh);
|
||||||
this->setAutoFillBackground(false);
|
this->setAutoFillBackground(false);
|
||||||
m_centralwidget = new QWidget(this);
|
m_centralwidget = new QWidget(this);
|
||||||
m_centerLayout = new QHBoxLayout(m_centralwidget);
|
m_centerLayout = new QHBoxLayout(m_centralwidget);
|
||||||
|
@ -319,7 +319,7 @@ void MainWindow::initSearchUi()
|
||||||
m_selectMenuButton->setAcceptDrops(true);
|
m_selectMenuButton->setAcceptDrops(true);
|
||||||
m_selectMenuButton->setFocusPolicy(Qt::StrongFocus);
|
m_selectMenuButton->setFocusPolicy(Qt::StrongFocus);
|
||||||
m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true)
|
m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true)
|
||||||
.pixmap(QSize(Style::miniIconSize, Style::miniIconSize)));
|
.pixmap(QSize(Style::m_miniIconSize, Style::m_miniIconSize)));
|
||||||
//搜索框展开页
|
//搜索框展开页
|
||||||
m_minSearchPage = new QWidget();
|
m_minSearchPage = new QWidget();
|
||||||
m_leftTopSearchHorizontalLayout = new QHBoxLayout(m_minSearchPage);
|
m_leftTopSearchHorizontalLayout = new QHBoxLayout(m_minSearchPage);
|
||||||
|
@ -346,32 +346,32 @@ void MainWindow::initLeftWidget()
|
||||||
{
|
{
|
||||||
//左侧列表区
|
//左侧列表区
|
||||||
m_leftStackedWidget = new QStackedWidget(m_viewWidget);
|
m_leftStackedWidget = new QStackedWidget(m_viewWidget);
|
||||||
m_leftStackedWidget->setFixedSize(QSize(300, Style::leftPageHeight));
|
m_leftStackedWidget->setFixedSize(QSize(300, Style::m_leftPageHeight));
|
||||||
m_minAllPage = new QWidget();
|
m_minAllPage = new QWidget();
|
||||||
m_minAllPage->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight));
|
m_minAllPage->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight));
|
||||||
m_minAllListView = new ListView(m_minAllPage);
|
m_minAllListView = new ListView(m_minAllPage);
|
||||||
m_minAllListView->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight));
|
m_minAllListView->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight));
|
||||||
m_minAllListView->setFrameShape(QFrame::NoFrame);
|
m_minAllListView->setFrameShape(QFrame::NoFrame);
|
||||||
m_leftStackedWidget->addWidget(m_minAllPage);
|
m_leftStackedWidget->addWidget(m_minAllPage);
|
||||||
m_minAllListView->installEventFilter(this);
|
m_minAllListView->installEventFilter(this);
|
||||||
m_minLetterPage = new QWidget();
|
m_minLetterPage = new QWidget();
|
||||||
m_minLetterPage->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight));
|
m_minLetterPage->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight));
|
||||||
m_minLetterListView = new ListView(m_minLetterPage);
|
m_minLetterListView = new ListView(m_minLetterPage);
|
||||||
m_minLetterListView->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight));
|
m_minLetterListView->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight));
|
||||||
m_minLetterListView->setFrameShape(QFrame::NoFrame);
|
m_minLetterListView->setFrameShape(QFrame::NoFrame);
|
||||||
m_leftStackedWidget->addWidget(m_minLetterPage);
|
m_leftStackedWidget->addWidget(m_minLetterPage);
|
||||||
m_minLetterListView->installEventFilter(this);
|
m_minLetterListView->installEventFilter(this);
|
||||||
m_minFuncPage = new QWidget();
|
m_minFuncPage = new QWidget();
|
||||||
m_minFuncPage->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight));
|
m_minFuncPage->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight));
|
||||||
m_minFuncListView = new ListView(m_minFuncPage);
|
m_minFuncListView = new ListView(m_minFuncPage);
|
||||||
m_minFuncListView->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight));
|
m_minFuncListView->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight));
|
||||||
m_minFuncListView->setFrameShape(QFrame::NoFrame);
|
m_minFuncListView->setFrameShape(QFrame::NoFrame);
|
||||||
m_leftStackedWidget->addWidget(m_minFuncPage);
|
m_leftStackedWidget->addWidget(m_minFuncPage);
|
||||||
m_minFuncListView->installEventFilter(this);
|
m_minFuncListView->installEventFilter(this);
|
||||||
m_minSearchResultPage = new QWidget();
|
m_minSearchResultPage = new QWidget();
|
||||||
m_minSearchResultPage->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight));
|
m_minSearchResultPage->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight));
|
||||||
m_minSearchResultListView = new ListView(m_minSearchResultPage);
|
m_minSearchResultListView = new ListView(m_minSearchResultPage);
|
||||||
m_minSearchResultListView->setFixedSize(QSize(Style::leftPageWidth, Style::leftPageHeight));
|
m_minSearchResultListView->setFixedSize(QSize(Style::m_leftPageWidth, Style::m_leftPageHeight));
|
||||||
m_minSearchResultListView->installEventFilter(this);
|
m_minSearchResultListView->installEventFilter(this);
|
||||||
m_leftStackedWidget->addWidget(m_minSearchResultPage);
|
m_leftStackedWidget->addWidget(m_minSearchResultPage);
|
||||||
}
|
}
|
||||||
|
@ -446,9 +446,9 @@ void MainWindow::initRecentWidget()
|
||||||
//最近视图
|
//最近视图
|
||||||
m_recentListView = new ListView(m_recentPage);
|
m_recentListView = new ListView(m_recentPage);
|
||||||
m_recentListView->installEventFilter(this);
|
m_recentListView->installEventFilter(this);
|
||||||
m_recentListView->setFixedSize(QSize(Style::rightViewWidth, Style::rightViewHeight));
|
m_recentListView->setFixedSize(QSize(Style::m_rightViewWidth, Style::m_rightViewHeight));
|
||||||
m_recentTextlabel = new QLabel(m_recentPage);
|
m_recentTextlabel = new QLabel(m_recentPage);
|
||||||
m_recentTextlabel->setFixedSize(QSize(Style::rightViewWidth, Style::rightViewHeight));
|
m_recentTextlabel->setFixedSize(QSize(Style::m_rightViewWidth, Style::m_rightViewHeight));
|
||||||
m_recentTextlabel->setAlignment(Qt::AlignCenter);
|
m_recentTextlabel->setAlignment(Qt::AlignCenter);
|
||||||
m_recentTextlabel->setText(QApplication::translate("MainWindow", "No recent files"));
|
m_recentTextlabel->setText(QApplication::translate("MainWindow", "No recent files"));
|
||||||
|
|
||||||
|
@ -847,10 +847,10 @@ void MainWindow::primaryScreenChangeSlot()
|
||||||
|
|
||||||
void MainWindow::appClassificationBtnClickedSlot()
|
void MainWindow::appClassificationBtnClickedSlot()
|
||||||
{
|
{
|
||||||
m_leaveAnimation->setStartValue(QRect(0, 0, Style::leftPageWidth, Style::leftPageHeight));
|
m_leaveAnimation->setStartValue(QRect(0, 0, Style::m_leftPageWidth, Style::m_leftPageHeight));
|
||||||
m_leaveAnimation->setEndValue(QRect(0, 0, 0, 0));
|
m_leaveAnimation->setEndValue(QRect(0, 0, 0, 0));
|
||||||
m_enterAnimation->setStartValue(QRect(-40, -40, Style::leftPageWidth + 80, Style::leftPageHeight + 80));
|
m_enterAnimation->setStartValue(QRect(-40, -40, Style::m_leftPageWidth + 80, Style::m_leftPageHeight + 80));
|
||||||
m_enterAnimation->setEndValue(QRect(10, 0, Style::leftPageWidth - 20, Style::leftPageHeight - 60));
|
m_enterAnimation->setEndValue(QRect(10, 0, Style::m_leftPageWidth - 20, Style::m_leftPageHeight - 60));
|
||||||
m_leaveAnimation->setDuration(10);
|
m_leaveAnimation->setDuration(10);
|
||||||
m_enterAnimation->setDuration(100);
|
m_enterAnimation->setDuration(100);
|
||||||
|
|
||||||
|
@ -948,7 +948,7 @@ bool MainWindow::eventFilter(QObject *target, QEvent *event)
|
||||||
|
|
||||||
if (target == m_selectMenuButton) {
|
if (target == m_selectMenuButton) {
|
||||||
m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true)
|
m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true)
|
||||||
.pixmap(QSize(Style::miniIconSize, Style::miniIconSize)));
|
.pixmap(QSize(Style::m_miniIconSize, Style::m_miniIconSize)));
|
||||||
selectIconAnimation(true);
|
selectIconAnimation(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1152,7 +1152,7 @@ void MainWindow::searchAppSlot(QString arg)
|
||||||
}
|
}
|
||||||
void MainWindow::on_selectMenuButton_triggered(QAction *arg1)
|
void MainWindow::on_selectMenuButton_triggered(QAction *arg1)
|
||||||
{
|
{
|
||||||
m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true).pixmap(QSize(Style::miniIconSize, Style::miniIconSize)));
|
m_selectMenuButton->setIcon(getCurIcon(":/data/img/mainviewwidget/downarrow.svg", true).pixmap(QSize(Style::m_miniIconSize, Style::m_miniIconSize)));
|
||||||
selectIconAnimation(false);
|
selectIconAnimation(false);
|
||||||
|
|
||||||
if (arg1 == m_allAction) {
|
if (arg1 == m_allAction) {
|
||||||
|
@ -1277,7 +1277,7 @@ void MainWindow::on_minMaxChangeButton_clicked()
|
||||||
m_maxAnimation->setDuration(1);
|
m_maxAnimation->setDuration(1);
|
||||||
} else {
|
} else {
|
||||||
m_animationPage->show();
|
m_animationPage->show();
|
||||||
m_animationPage->setGeometry(this->x(), this->y(), Style::minw, Style::minh);
|
m_animationPage->setGeometry(this->x(), this->y(), Style::m_minw, Style::m_minh);
|
||||||
m_animationPage->raise();
|
m_animationPage->raise();
|
||||||
m_animationPage->repaint();
|
m_animationPage->repaint();
|
||||||
m_maxAnimation->setDuration(260);
|
m_maxAnimation->setDuration(260);
|
||||||
|
@ -1288,7 +1288,7 @@ void MainWindow::on_minMaxChangeButton_clicked()
|
||||||
loop.exec();
|
loop.exec();
|
||||||
m_maxAnimation->setEasingCurve(QEasingCurve::OutExpo);
|
m_maxAnimation->setEasingCurve(QEasingCurve::OutExpo);
|
||||||
// m_maxAnimation->setStartValue(QRect(Style::m_primaryScreenX, Style::m_primaryScreenY + Style::m_availableScreenHeight - Style::minh, Style::minw, Style::minh));
|
// m_maxAnimation->setStartValue(QRect(Style::m_primaryScreenX, Style::m_primaryScreenY + Style::m_availableScreenHeight - Style::minh, Style::minw, Style::minh));
|
||||||
m_maxAnimation->setStartValue(QRect(this->x(), this->y(), Style::minw, Style::minh));
|
m_maxAnimation->setStartValue(QRect(this->x(), this->y(), Style::m_minw, Style::m_minh));
|
||||||
m_maxAnimation->setEndValue(QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
m_maxAnimation->setEndValue(QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
||||||
|
|
||||||
m_maxAnimation->start(QAbstractAnimation::DeleteWhenStopped);
|
m_maxAnimation->start(QAbstractAnimation::DeleteWhenStopped);
|
||||||
|
@ -1341,27 +1341,27 @@ void MainWindow::setMinWindowPos()
|
||||||
|
|
||||||
if (position == 0) {
|
if (position == 0) {
|
||||||
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + height - Style::minh - 3, Style::minw, Style::minh));
|
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + height - Style::m_minh - 3, Style::m_minw, Style::m_minh));
|
||||||
} else {
|
} else {
|
||||||
this->setGeometry(QRect(x + 4, y + height - Style::minh - 3, Style::minw, Style::minh));
|
this->setGeometry(QRect(x + 4, y + height - Style::m_minh - 3, Style::m_minw, Style::m_minh));
|
||||||
}
|
}
|
||||||
} else if (position == 1) {
|
} else if (position == 1) {
|
||||||
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + 4, Style::minw, Style::minh));
|
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + 4, Style::m_minw, Style::m_minh));
|
||||||
} else {
|
} else {
|
||||||
this->setGeometry(QRect(x + 4, y + 4, Style::minw, Style::minh));
|
this->setGeometry(QRect(x + 4, y + 4, Style::m_minw, Style::m_minh));
|
||||||
}
|
}
|
||||||
} else if (position == 2) {
|
} else if (position == 2) {
|
||||||
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + 4, Style::minw, Style::minh));
|
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + 4, y + 4, Style::m_minw, Style::m_minh));
|
||||||
} else {
|
} else {
|
||||||
this->setGeometry(QRect(x + 4, y + 4, Style::minw, Style::minh));
|
this->setGeometry(QRect(x + 4, y + 4, Style::m_minw, Style::m_minh));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
if (g_platform.startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) {
|
||||||
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + width - Style::minw - 4, y + 4, Style::minw, Style::minh));
|
kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x + width - Style::m_minw - 4, y + 4, Style::m_minw, Style::m_minh));
|
||||||
} else {
|
} else {
|
||||||
this->setGeometry(QRect(x + width - Style::minw - 4, y + 4, Style::minw, Style::minh));
|
this->setGeometry(QRect(x + width - Style::m_minw - 4, y + 4, Style::m_minw, Style::m_minh));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1376,7 +1376,7 @@ void MainWindow::setMaxWindowPos()
|
||||||
void MainWindow::repaintWidget()
|
void MainWindow::repaintWidget()
|
||||||
{
|
{
|
||||||
Style::initWidStyle();
|
Style::initWidStyle();
|
||||||
this->setMinimumSize(Style::minw, Style::minh);
|
this->setMinimumSize(Style::m_minw, Style::m_minh);
|
||||||
int x = Style::m_primaryScreenX;
|
int x = Style::m_primaryScreenX;
|
||||||
int y = Style::m_primaryScreenY;
|
int y = Style::m_primaryScreenY;
|
||||||
int width = Style::m_availableScreenWidth;
|
int width = Style::m_availableScreenWidth;
|
||||||
|
@ -1411,7 +1411,7 @@ void MainWindow::showNormalWindowSlot()
|
||||||
m_isFullScreen = false;
|
m_isFullScreen = false;
|
||||||
m_minAnimation->setEasingCurve(QEasingCurve::OutExpo);
|
m_minAnimation->setEasingCurve(QEasingCurve::OutExpo);
|
||||||
m_minAnimation->setStartValue(QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
m_minAnimation->setStartValue(QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
||||||
m_minAnimation->setEndValue(QRect(this->x(), this->y(), Style::minw, Style::minh));
|
m_minAnimation->setEndValue(QRect(this->x(), this->y(), Style::m_minw, Style::m_minh));
|
||||||
|
|
||||||
m_minAnimation->start(QAbstractAnimation::DeleteWhenStopped);
|
m_minAnimation->start(QAbstractAnimation::DeleteWhenStopped);
|
||||||
m_fullWindow->hide();
|
m_fullWindow->hide();
|
||||||
|
|
|
@ -69,12 +69,12 @@ void TabletWindow::initSize()
|
||||||
{
|
{
|
||||||
Style::initWidStyle();
|
Style::initWidStyle();
|
||||||
this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
this->setFixedSize(Style::ScreenWidth, Style::ScreenHeight);
|
this->setFixedSize(Style::m_screenWidth, Style::m_screenHeight);
|
||||||
m_leftWidget->setFixedSize(Style::m_leftWidWidth, Style::CenterWindHeight);
|
m_leftWidget->setFixedSize(Style::m_leftWidWidth, Style::m_centerWindHeight);
|
||||||
m_leftWidget->layout()->setContentsMargins(Style::TimeWidgetLeft, Style::TimeWidgetTop, 0, 0);
|
m_leftWidget->layout()->setContentsMargins(Style::m_timeWidgetLeft, Style::m_timeWidgetTop, 0, 0);
|
||||||
m_scrollAreaWid->setFixedHeight(Style::CenterWindHeight);
|
m_scrollAreaWid->setFixedHeight(Style::m_centerWindHeight);
|
||||||
m_scrollArea->setFixedSize(Style::ScreenWidth, Style::CenterWindHeight);
|
m_scrollArea->setFixedSize(Style::m_screenWidth, Style::m_centerWindHeight);
|
||||||
m_buttonWidget->setFixedSize(Style::OtherPageViewWidth, 30);
|
m_buttonWidget->setFixedSize(Style::m_otherPageViewWidth, 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabletWindow::initUi()
|
void TabletWindow::initUi()
|
||||||
|
@ -557,15 +557,15 @@ void TabletWindow::insertAppList(QStringList desktopfplist)
|
||||||
m_firstPageLayout->setContentsMargins(0, 0, 0, 0);
|
m_firstPageLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
m_firstPageWidget->setLayout(m_firstPageLayout);
|
m_firstPageWidget->setLayout(m_firstPageLayout);
|
||||||
m_firstPageLayout->addWidget(m_leftWidget);
|
m_firstPageLayout->addWidget(m_leftWidget);
|
||||||
listview->setFixedSize(Style::FirsPageViewWidth, Style::CenterWindHeight);
|
listview->setFixedSize(Style::m_firsPageViewWidth, Style::m_centerWindHeight);
|
||||||
m_firstPageLayout->addWidget(listview);
|
m_firstPageLayout->addWidget(listview);
|
||||||
m_scrollAreaWidLayout->addWidget(m_firstPageWidget);
|
m_scrollAreaWidLayout->addWidget(m_firstPageWidget);
|
||||||
listview->setGridSize(QSize(Style::TabletItemSizeWidthFirst, Style::AppListItemSizeHeight));
|
listview->setGridSize(QSize(Style::m_tabletItemSizeWidthFirst, Style::m_appListItemSizeHeight));
|
||||||
m_isFirstPage = false;
|
m_isFirstPage = false;
|
||||||
} else {
|
} else {
|
||||||
listview = new TabletListView(this, 1);
|
listview = new TabletListView(this, 1);
|
||||||
listview->setFixedSize(Style::OtherPageViewWidth, Style::CenterWindHeight);
|
listview->setFixedSize(Style::m_otherPageViewWidth, Style::m_centerWindHeight);
|
||||||
listview->setGridSize(QSize(Style::TabletItemSizeWidthOther, Style::AppListItemSizeHeight));
|
listview->setGridSize(QSize(Style::m_tabletItemSizeWidthOther, Style::m_appListItemSizeHeight));
|
||||||
m_scrollAreaWidLayout->addWidget(listview);
|
m_scrollAreaWidLayout->addWidget(listview);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -936,7 +936,7 @@ void TabletWindow::buttonClicked(QAbstractButton *button)
|
||||||
if (!(m_scrollAnimation->state() == QPropertyAnimation::Running)) {
|
if (!(m_scrollAnimation->state() == QPropertyAnimation::Running)) {
|
||||||
int idd = m_buttonGroup->id(button);
|
int idd = m_buttonGroup->id(button);
|
||||||
int preNum = m_curPageNum;
|
int preNum = m_curPageNum;
|
||||||
Style::nowpagenum = idd;
|
Style::m_nowpagenum = idd;
|
||||||
|
|
||||||
// QDBusReply<bool> res = usrInterface->call("get_current_tabletmode");
|
// QDBusReply<bool> res = usrInterface->call("get_current_tabletmode");
|
||||||
for (int page = 1; page <= m_pagemanager->getAppPageVector().size(); page++) {
|
for (int page = 1; page <= m_pagemanager->getAppPageVector().size(); page++) {
|
||||||
|
|
|
@ -31,11 +31,11 @@ int Style::m_primaryScreenX = 0;
|
||||||
int Style::m_primaryScreenY = 0;
|
int Style::m_primaryScreenY = 0;
|
||||||
int Style::m_panelPosition = 0;
|
int Style::m_panelPosition = 0;
|
||||||
//默认窗口
|
//默认窗口
|
||||||
int Style::minw = 0;
|
int Style::m_minw = 0;
|
||||||
int Style::minh = 0;
|
int Style::m_minh = 0;
|
||||||
int Style::leftPageWidth = 0;
|
int Style::m_leftPageWidth = 0;
|
||||||
int Style::leftPageHeight = 0;
|
int Style::m_leftPageHeight = 0;
|
||||||
int Style::defaultQueryLineEditIconSize = 0;
|
int Style::m_defaultQueryLineEditIconSize = 0;
|
||||||
/**
|
/**
|
||||||
* 全屏窗口
|
* 全屏窗口
|
||||||
*/
|
*/
|
||||||
|
@ -43,75 +43,62 @@ int Style::defaultQueryLineEditIconSize = 0;
|
||||||
int Style::m_availableScreenWidth = 0;
|
int Style::m_availableScreenWidth = 0;
|
||||||
int Style::m_availableScreenHeight = 0;
|
int Style::m_availableScreenHeight = 0;
|
||||||
//搜索栏
|
//搜索栏
|
||||||
int Style::QueryLineEditHeight = 0;
|
int Style::m_queryLineEditHeight = 0;
|
||||||
//左侧栏
|
//左侧栏
|
||||||
int Style::m_leftWidWidth = 0;
|
int Style::m_leftWidWidth = 0;
|
||||||
int Style::LeftMargin = 0;
|
int Style::m_leftMargin = 0;
|
||||||
int Style::LeftBtnWidth = 0;
|
int Style::m_leftBtnWidth = 0;
|
||||||
int Style::LeftBtnHeight = 0;
|
int Style::m_leftBtnHeight = 0;
|
||||||
int Style::LeftLetterBtnHeight = 0;
|
int Style::m_leftLetterBtnHeight = 0;
|
||||||
int Style::LeftLetterFontSize = 0;
|
int Style::m_leftLetterFontSize = 0;
|
||||||
int Style::LeftIconSize = 0;
|
int Style::m_leftIconSize = 0;
|
||||||
int Style::LeftSpaceIconText = 0;
|
int Style::m_leftSpaceIconText = 0;
|
||||||
int Style::LeftSpaceBetweenItem = 0;
|
int Style::m_leftSpaceBetweenItem = 0;
|
||||||
//应用列表栏
|
//应用列表栏
|
||||||
int Style::m_applistWidWidth = 0;
|
int Style::m_applistWidWidth = 0;
|
||||||
int Style::m_applistAreaWidth = 0;
|
int Style::m_applistAreaWidth = 0;
|
||||||
int Style::m_applistWidHeight = 0;
|
int Style::m_applistWidHeight = 0;
|
||||||
int Style::m_scrollBarHeight = 0;
|
int Style::m_scrollBarHeight = 0;
|
||||||
int Style::AppListIconSize = 0;
|
int Style::m_appListIconSize = 0;
|
||||||
int Style::AppListBigIconSize = 0;
|
int Style::m_appListBigIconSize = 0;
|
||||||
int Style::m_appTextRectHeight = 0;
|
int Style::m_appTextRectHeight = 0;
|
||||||
int Style::m_boundaryOffset = 0;
|
int Style::m_boundaryOffset = 0;
|
||||||
int Style::AppListItemSizeWidth = 0;
|
int Style::m_appListItemSizeWidth = 0;
|
||||||
int Style::TabletItemSizeWidthOther = 0;
|
int Style::m_tabletItemSizeWidthOther = 0;
|
||||||
int Style::TabletItemSizeWidthFirst = 0;
|
int Style::m_tabletItemSizeWidthFirst = 0;
|
||||||
int Style::FirsPageViewWidth = 0;
|
int Style::m_firsPageViewWidth = 0;
|
||||||
int Style::OtherPageViewWidth = 0;
|
int Style::m_otherPageViewWidth = 0;
|
||||||
int Style::m_applistGridSizeWidth = 0;
|
int Style::m_applistGridSizeWidth = 0;
|
||||||
int Style::AppLeftSpace = 0;
|
int Style::m_appLeftSpace = 0;
|
||||||
int Style::m_appTopSpace = 0;
|
int Style::m_appTopSpace = 0;
|
||||||
int Style::AppSpaceBetweenIconText = 0;
|
int Style::m_appSpaceBetweenIconText = 0;
|
||||||
int Style::FirstPageSpace = 0;
|
int Style::m_firstPageSpace = 0;
|
||||||
int Style::OtherPageSpace = 0;
|
int Style::m_otherPageSpace = 0;
|
||||||
|
|
||||||
//侧边栏primaryScreen
|
//侧边栏primaryScreen
|
||||||
int Style::SideBarWidWidth = 0;
|
int Style::m_sideBarWidWidth = 0;
|
||||||
|
|
||||||
int Style::appLine = 0;
|
int Style::m_appLine = 0;
|
||||||
int Style::appColumn = 0;
|
int Style::m_appColumn = 0;
|
||||||
int Style::appLineFirst = 0;
|
int Style::m_appLineFirst = 0;
|
||||||
int Style::appColumnFirst = 0;
|
int Style::m_appColumnFirst = 0;
|
||||||
int Style::appPage = 1;
|
int Style::m_appPage = 1;
|
||||||
int Style::appNum = 0;
|
int Style::m_appNum = 0;
|
||||||
int Style::nowpagenum = 1;
|
int Style::m_nowpagenum = 1;
|
||||||
int Style::appRows = 0;
|
int Style::m_appRows = 0;
|
||||||
bool Style::ScreenRotation = false;
|
bool Style::m_screenRotation = false;
|
||||||
int Style::AppListItemSizeHeight = 270;
|
int Style::m_appListItemSizeHeight = 270;
|
||||||
int Style::AppListViewTopMargin = 0;
|
int Style::m_appListViewTopMargin = 0;
|
||||||
int Style::ScreenWidth = 0;
|
int Style::m_screenWidth = 0;
|
||||||
int Style::ScreenHeight = 0;
|
int Style::m_screenHeight = 0;
|
||||||
int Style::AppListViewLeftMargin = 52;
|
int Style::m_appListViewBottomMargin = 20;
|
||||||
int Style::AppListViewBottomMargin = 20;
|
int Style::m_timeWidgetTop = 81;
|
||||||
int Style::AppListViewRightMargin = 0;
|
int Style::m_timeWidgetLeft = 112;
|
||||||
int Style::TimeWidgetTop = 81;
|
int Style::m_centerWindHeight = 0;
|
||||||
int Style::TimeWidgetLeft = 112;
|
|
||||||
int Style::CenterWindHeight = 0;
|
|
||||||
|
|
||||||
int Style::GroupAppColumn = 1;
|
int Style::m_miniIconSize = 0;
|
||||||
int Style::GroupAppRow = 1;
|
int Style::m_rightViewWidth = 0;
|
||||||
|
int Style::m_rightViewHeight = 0;
|
||||||
int Style::ButtonWidgetWidth = 56;
|
|
||||||
|
|
||||||
int Style::ToolWidgetLeft = 24;
|
|
||||||
bool Style::IsWideScreen = false;
|
|
||||||
|
|
||||||
int Style::DropMenuWidth = 0;
|
|
||||||
int Style::DropMenuHeight = 0;
|
|
||||||
int Style::miniIconSize = 0;
|
|
||||||
|
|
||||||
int Style::rightViewWidth = 0;
|
|
||||||
int Style::rightViewHeight = 0;
|
|
||||||
|
|
||||||
void Style::initWidStyle()
|
void Style::initWidStyle()
|
||||||
{
|
{
|
||||||
|
@ -132,98 +119,95 @@ void Style::initWidStyle()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_availableScreenWidth == 800 && m_availableScreenHeight == 600) {
|
if (m_availableScreenWidth == 800 && m_availableScreenHeight == 600) {
|
||||||
minw = 320;
|
m_minw = 320;
|
||||||
minh = 500;
|
m_minh = 500;
|
||||||
leftPageWidth = 300;
|
m_leftPageWidth = 300;
|
||||||
leftPageHeight = 517;
|
m_leftPageHeight = 517;
|
||||||
} else {
|
} else {
|
||||||
minw = 652;
|
m_minw = 652;
|
||||||
minh = 590;
|
m_minh = 590;
|
||||||
leftPageWidth = 300;
|
m_leftPageWidth = 300;
|
||||||
leftPageHeight = 517;
|
m_leftPageHeight = 517;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_availableScreenWidth >= 2000 && m_availableScreenWidth <= 4000) {
|
if (m_availableScreenWidth >= 2000 && m_availableScreenWidth <= 4000) {
|
||||||
LeftMargin = 20;
|
m_leftMargin = 20;
|
||||||
LeftLetterFontSize = 14;
|
m_leftLetterFontSize = 14;
|
||||||
LeftSpaceBetweenItem = 15;
|
m_leftSpaceBetweenItem = 15;
|
||||||
AppListIconSize = 96;
|
m_appListIconSize = 96;
|
||||||
AppListItemSizeWidth = 168;
|
m_appListItemSizeWidth = 168;
|
||||||
m_applistGridSizeWidth = 240;
|
m_applistGridSizeWidth = 240;
|
||||||
AppSpaceBetweenIconText = 20;
|
m_appSpaceBetweenIconText = 20;
|
||||||
} else if (m_availableScreenWidth >= 1920 && m_availableScreenWidth < 2000) {
|
} else if (m_availableScreenWidth >= 1920 && m_availableScreenWidth < 2000) {
|
||||||
LeftMargin = 20;
|
m_leftMargin = 20;
|
||||||
LeftLetterFontSize = 14;
|
m_leftLetterFontSize = 14;
|
||||||
LeftSpaceBetweenItem = 15;
|
m_leftSpaceBetweenItem = 15;
|
||||||
AppListIconSize = 86;
|
m_appListIconSize = 86;
|
||||||
AppListItemSizeWidth = 168;
|
m_appListItemSizeWidth = 168;
|
||||||
m_applistGridSizeWidth = 220;
|
m_applistGridSizeWidth = 220;
|
||||||
AppSpaceBetweenIconText = 18;
|
m_appSpaceBetweenIconText = 18;
|
||||||
} else if (m_availableScreenWidth >= 1600 && m_availableScreenWidth < 1920) {
|
} else if (m_availableScreenWidth >= 1600 && m_availableScreenWidth < 1920) {
|
||||||
LeftMargin = 10;
|
m_leftMargin = 10;
|
||||||
LeftLetterFontSize = 11;
|
m_leftLetterFontSize = 11;
|
||||||
LeftSpaceBetweenItem = 10;
|
m_leftSpaceBetweenItem = 10;
|
||||||
AppListIconSize = 86;
|
m_appListIconSize = 86;
|
||||||
AppListItemSizeWidth = 150;
|
m_appListItemSizeWidth = 150;
|
||||||
m_applistGridSizeWidth = 180;
|
m_applistGridSizeWidth = 180;
|
||||||
AppSpaceBetweenIconText = 14;
|
m_appSpaceBetweenIconText = 14;
|
||||||
} else if (m_availableScreenWidth >= 1366 && m_availableScreenWidth < 1600) {
|
} else if (m_availableScreenWidth >= 1366 && m_availableScreenWidth < 1600) {
|
||||||
LeftMargin = 10;
|
m_leftMargin = 10;
|
||||||
LeftLetterFontSize = 11;
|
m_leftLetterFontSize = 11;
|
||||||
LeftSpaceBetweenItem = 10;
|
m_leftSpaceBetweenItem = 10;
|
||||||
AppListIconSize = 64;
|
m_appListIconSize = 64;
|
||||||
AppListItemSizeWidth = 112;
|
m_appListItemSizeWidth = 112;
|
||||||
m_applistGridSizeWidth = 140;
|
m_applistGridSizeWidth = 140;
|
||||||
AppSpaceBetweenIconText = 0;
|
m_appSpaceBetweenIconText = 0;
|
||||||
} else if (m_availableScreenWidth >= 1280 && m_availableScreenWidth < 1366) {
|
} else if (m_availableScreenWidth >= 1280 && m_availableScreenWidth < 1366) {
|
||||||
LeftMargin = 10;
|
m_leftMargin = 10;
|
||||||
LeftLetterFontSize = 11;
|
m_leftLetterFontSize = 11;
|
||||||
LeftSpaceBetweenItem = 10;
|
m_leftSpaceBetweenItem = 10;
|
||||||
AppListIconSize = 64;
|
m_appListIconSize = 64;
|
||||||
AppListItemSizeWidth = 112;
|
m_appListItemSizeWidth = 112;
|
||||||
m_applistGridSizeWidth = 142;
|
m_applistGridSizeWidth = 142;
|
||||||
AppSpaceBetweenIconText = 14;
|
m_appSpaceBetweenIconText = 14;
|
||||||
} else if (m_availableScreenWidth >= 1152 && m_availableScreenWidth < 1280) {
|
} else if (m_availableScreenWidth >= 1152 && m_availableScreenWidth < 1280) {
|
||||||
LeftMargin = 10;
|
m_leftMargin = 10;
|
||||||
LeftLetterFontSize = 11;
|
m_leftLetterFontSize = 11;
|
||||||
LeftSpaceBetweenItem = 10;
|
m_leftSpaceBetweenItem = 10;
|
||||||
AppListIconSize = 64;
|
m_appListIconSize = 64;
|
||||||
AppListItemSizeWidth = 112;
|
m_appListItemSizeWidth = 112;
|
||||||
m_applistGridSizeWidth = 142;
|
m_applistGridSizeWidth = 142;
|
||||||
AppSpaceBetweenIconText = 14;
|
m_appSpaceBetweenIconText = 14;
|
||||||
} else if (m_availableScreenWidth > 800 && m_availableScreenWidth < 1152) {
|
} else if (m_availableScreenWidth > 800 && m_availableScreenWidth < 1152) {
|
||||||
LeftMargin = 10;
|
m_leftMargin = 10;
|
||||||
LeftLetterFontSize = 11;
|
m_leftLetterFontSize = 11;
|
||||||
LeftSpaceBetweenItem = 10;
|
m_leftSpaceBetweenItem = 10;
|
||||||
AppListIconSize = 64;
|
m_appListIconSize = 64;
|
||||||
AppListItemSizeWidth = 112;
|
m_appListItemSizeWidth = 112;
|
||||||
m_applistGridSizeWidth = 141;
|
m_applistGridSizeWidth = 141;
|
||||||
AppSpaceBetweenIconText = 14;
|
m_appSpaceBetweenIconText = 14;
|
||||||
} else {
|
} else {
|
||||||
LeftMargin = 10;
|
m_leftMargin = 10;
|
||||||
LeftLetterFontSize = 11;
|
m_leftLetterFontSize = 11;
|
||||||
LeftSpaceBetweenItem = 10;
|
m_leftSpaceBetweenItem = 10;
|
||||||
AppListIconSize = 64;
|
m_appListIconSize = 64;
|
||||||
AppListItemSizeWidth = 112;
|
m_appListItemSizeWidth = 112;
|
||||||
m_applistGridSizeWidth = 138;
|
m_applistGridSizeWidth = 138;
|
||||||
AppSpaceBetweenIconText = 14;
|
m_appSpaceBetweenIconText = 14;
|
||||||
}
|
}
|
||||||
|
|
||||||
LeftBtnWidth = 68 + 5 * len;
|
m_leftBtnWidth = 68 + 5 * len;
|
||||||
LeftBtnHeight = 34;
|
m_leftBtnHeight = 34;
|
||||||
QueryLineEditHeight = 30;
|
m_queryLineEditHeight = 30;
|
||||||
LeftLetterBtnHeight = 25;
|
m_leftLetterBtnHeight = 25;
|
||||||
LeftIconSize = 19;
|
m_leftIconSize = 19;
|
||||||
DropMenuWidth = 170;
|
m_rightViewWidth = 324;
|
||||||
DropMenuHeight = 112;
|
m_rightViewHeight = 470;
|
||||||
miniIconSize = 8;
|
m_leftSpaceIconText = 14;
|
||||||
rightViewWidth = 324;
|
|
||||||
rightViewHeight = 470;
|
|
||||||
LeftSpaceIconText = 14;
|
|
||||||
m_appTextRectHeight = 30;
|
m_appTextRectHeight = 30;
|
||||||
|
|
||||||
m_appTopSpace = (AppListItemSizeWidth - AppSpaceBetweenIconText - AppListIconSize - m_appTextRectHeight) / 2;
|
m_appTopSpace = (m_appListItemSizeWidth - m_appSpaceBetweenIconText - m_appListIconSize - m_appTextRectHeight) / 2;
|
||||||
m_boundaryOffset = (m_applistGridSizeWidth - AppListItemSizeWidth) + m_appTopSpace + 10;
|
m_boundaryOffset = (m_applistGridSizeWidth - m_appListItemSizeWidth) + m_appTopSpace + 10;
|
||||||
m_applistWidWidth = m_availableScreenWidth / 1.25;
|
m_applistWidWidth = m_availableScreenWidth / 1.25;
|
||||||
m_applistWidWidth = m_applistWidWidth - (m_applistWidWidth % m_applistGridSizeWidth) + 2;
|
m_applistWidWidth = m_applistWidWidth - (m_applistWidWidth % m_applistGridSizeWidth) + 2;
|
||||||
m_applistWidHeight = m_availableScreenHeight - 120;
|
m_applistWidHeight = m_availableScreenHeight - 120;
|
||||||
|
@ -232,34 +216,32 @@ void Style::initWidStyle()
|
||||||
m_applistAreaWidth = m_applistWidWidth + 20;
|
m_applistAreaWidth = m_applistWidWidth + 20;
|
||||||
m_scrollBarHeight = 10;
|
m_scrollBarHeight = 10;
|
||||||
} else {
|
} else {
|
||||||
ScreenWidth = QApplication::primaryScreen()->geometry().width();
|
m_screenWidth = QApplication::primaryScreen()->geometry().width();
|
||||||
ScreenHeight = QApplication::primaryScreen()->geometry().height();
|
m_screenHeight = QApplication::primaryScreen()->geometry().height();
|
||||||
myDebug() << "Winches" << qApp->desktop()->widthMM();
|
myDebug() << "Winches" << qApp->desktop()->widthMM();
|
||||||
myDebug() << "Hinches" << qApp->desktop()->heightMM();
|
myDebug() << "Hinches" << qApp->desktop()->heightMM();
|
||||||
myDebug() << "ScreenWidth" << ScreenWidth;
|
myDebug() << "ScreenWidth" << m_screenWidth;
|
||||||
myDebug() << "ScreenHeight" << ScreenHeight;
|
myDebug() << "ScreenHeight" << m_screenHeight;
|
||||||
appColumn = 6;
|
m_appColumn = 6;
|
||||||
appLine = 4;
|
m_appLine = 4;
|
||||||
appLineFirst = 4;
|
m_appLineFirst = 4;
|
||||||
AppListViewTopMargin = 70;
|
m_appListViewTopMargin = 70;
|
||||||
AppListViewLeftMargin = 52;
|
m_appListViewBottomMargin = m_appListViewTopMargin - 30;
|
||||||
AppListViewBottomMargin = AppListViewTopMargin - 30;
|
m_leftWidWidth = m_screenWidth * 0.3;
|
||||||
AppListViewRightMargin = 0;
|
m_firsPageViewWidth = m_screenWidth - m_leftWidWidth - 5;
|
||||||
m_leftWidWidth = ScreenWidth * 0.3;
|
m_appColumnFirst = m_firsPageViewWidth / 220;
|
||||||
FirsPageViewWidth = ScreenWidth - m_leftWidWidth - 5;
|
m_otherPageViewWidth = m_screenWidth;
|
||||||
appColumnFirst = FirsPageViewWidth / 220;
|
m_tabletItemSizeWidthFirst = m_firsPageViewWidth / m_appColumnFirst;
|
||||||
OtherPageViewWidth = ScreenWidth;
|
m_tabletItemSizeWidthOther = (m_screenWidth - 5) / m_appColumn;
|
||||||
TabletItemSizeWidthFirst = FirsPageViewWidth / appColumnFirst;
|
m_centerWindHeight = m_screenHeight - m_appListViewBottomMargin - m_appListViewTopMargin;
|
||||||
TabletItemSizeWidthOther = (ScreenWidth - 5) / appColumn;
|
m_appListItemSizeHeight = m_centerWindHeight / m_appLine;
|
||||||
CenterWindHeight = ScreenHeight - AppListViewBottomMargin - AppListViewTopMargin;
|
m_appListIconSize = 96;
|
||||||
AppListItemSizeHeight = CenterWindHeight / appLine;
|
m_appListBigIconSize = 108;
|
||||||
AppListIconSize = 96;
|
m_appTopSpace = (m_appListItemSizeHeight - m_appListIconSize) / 2;
|
||||||
AppListBigIconSize = 108;
|
m_appLeftSpace = (m_tabletItemSizeWidthFirst - m_appListIconSize) / 2;
|
||||||
m_appTopSpace = (AppListItemSizeHeight - AppListIconSize) / 2;
|
m_timeWidgetTop = (m_centerWindHeight - 870) / 2;
|
||||||
AppLeftSpace = (TabletItemSizeWidthFirst - AppListIconSize) / 2;
|
m_timeWidgetLeft = (m_leftWidWidth - 400) / 2;
|
||||||
TimeWidgetTop = (CenterWindHeight - 870) / 2;
|
m_firstPageSpace = m_appLeftSpace;
|
||||||
TimeWidgetLeft = (m_leftWidWidth - 400) / 2;
|
m_otherPageSpace = (m_tabletItemSizeWidthOther - m_appListIconSize) / 2;
|
||||||
FirstPageSpace = AppLeftSpace;
|
|
||||||
OtherPageSpace = (TabletItemSizeWidthOther - AppListIconSize) / 2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,11 +85,11 @@ public:
|
||||||
static int m_primaryScreenY;
|
static int m_primaryScreenY;
|
||||||
static int m_panelPosition;
|
static int m_panelPosition;
|
||||||
//默认窗口
|
//默认窗口
|
||||||
static int minw;
|
static int m_minw;
|
||||||
static int minh;
|
static int m_minh;
|
||||||
static int leftPageWidth;
|
static int m_leftPageWidth;
|
||||||
static int leftPageHeight;
|
static int m_leftPageHeight;
|
||||||
static int defaultQueryLineEditIconSize;
|
static int m_defaultQueryLineEditIconSize;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全屏
|
* 全屏
|
||||||
|
@ -98,89 +98,71 @@ public:
|
||||||
static int m_availableScreenWidth;
|
static int m_availableScreenWidth;
|
||||||
static int m_availableScreenHeight;
|
static int m_availableScreenHeight;
|
||||||
//搜索栏
|
//搜索栏
|
||||||
static int QueryLineEditHeight;//搜索框高度
|
static int m_queryLineEditHeight;//搜索框高度
|
||||||
//左侧栏
|
//左侧栏
|
||||||
static int m_leftWidWidth; //宽度
|
static int m_leftWidWidth; //宽度
|
||||||
static int LeftMargin; //内左侧边距
|
static int m_leftMargin; //内左侧边距
|
||||||
static int LeftBtnWidth;//按钮宽度
|
static int m_leftBtnWidth;//按钮宽度
|
||||||
static int LeftBtnHeight;//按钮高度
|
static int m_leftBtnHeight;//按钮高度
|
||||||
static int LeftLetterBtnHeight;//按钮高度
|
static int m_leftLetterBtnHeight;//按钮高度
|
||||||
static int LeftLetterFontSize; //字体大小
|
static int m_leftLetterFontSize; //字体大小
|
||||||
static int LeftIconSize; //图标大小
|
static int m_leftIconSize; //图标大小
|
||||||
static int LeftSpaceIconText; //按钮图标与文字内边距
|
static int m_leftSpaceIconText; //按钮图标与文字内边距
|
||||||
static int LeftSpaceBetweenItem; //item间距
|
static int m_leftSpaceBetweenItem; //item间距
|
||||||
//应用列表栏
|
//应用列表栏
|
||||||
static int m_applistWidWidth; //宽度
|
static int m_applistWidWidth; //宽度
|
||||||
static int m_applistAreaWidth;
|
static int m_applistAreaWidth;
|
||||||
static int m_applistWidHeight; //高度
|
static int m_applistWidHeight; //高度
|
||||||
static int m_scrollBarHeight;
|
static int m_scrollBarHeight;
|
||||||
static int AppListIconSize; //图标大小
|
static int m_appListIconSize; //图标大小
|
||||||
static int AppListBigIconSize;
|
static int m_appListBigIconSize;
|
||||||
static int m_appTextRectHeight;
|
static int m_appTextRectHeight;
|
||||||
static int m_boundaryOffset;
|
static int m_boundaryOffset;
|
||||||
static int AppListItemSizeWidth; //item大小
|
static int m_appListItemSizeWidth; //item大小
|
||||||
static int TabletItemSizeWidthFirst;
|
static int m_tabletItemSizeWidthFirst;
|
||||||
static int TabletItemSizeWidthOther;
|
static int m_tabletItemSizeWidthOther;
|
||||||
static int FirsPageViewWidth;
|
static int m_firsPageViewWidth;
|
||||||
static int OtherPageViewWidth;
|
static int m_otherPageViewWidth;
|
||||||
static int m_applistGridSizeWidth; //网格大小
|
static int m_applistGridSizeWidth; //网格大小
|
||||||
static int AppLeftSpace;//左侧边距
|
static int m_appLeftSpace;//左侧边距
|
||||||
static int m_appTopSpace;//上侧边距
|
static int m_appTopSpace;//上侧边距
|
||||||
static int AppSpaceBetweenIconText;//图标与文字边距
|
static int m_appSpaceBetweenIconText;//图标与文字边距
|
||||||
static int FirstPageSpace;
|
static int m_firstPageSpace;
|
||||||
static int OtherPageSpace;
|
static int m_otherPageSpace;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 侧边栏
|
* 侧边栏
|
||||||
*/
|
*/
|
||||||
static int SideBarWidWidth; //宽度
|
static int m_sideBarWidWidth; //宽度
|
||||||
|
|
||||||
static int appLine;
|
static int m_appLine;
|
||||||
static int appColumn;
|
static int m_appColumn;
|
||||||
static int appLineFirst;
|
static int m_appLineFirst;
|
||||||
static int appColumnFirst;
|
static int m_appColumnFirst;
|
||||||
static int appNum;
|
static int m_appNum;
|
||||||
static int appPage;
|
static int m_appPage;
|
||||||
static int nowpagenum;
|
static int m_nowpagenum;
|
||||||
static int appRows; //app的总行数
|
static int m_appRows; //app的总行数
|
||||||
static bool ScreenRotation;
|
static bool m_screenRotation;
|
||||||
|
|
||||||
static int AppListItemSizeHeight;
|
static int m_appListItemSizeHeight;
|
||||||
|
|
||||||
// static int ScreenWidth;
|
// static int ScreenWidth;
|
||||||
// static int ScreenHeight;
|
// static int ScreenHeight;
|
||||||
|
|
||||||
|
static int m_screenWidth;
|
||||||
|
static int m_screenHeight;
|
||||||
|
static int m_appListViewTopMargin;
|
||||||
|
static int m_appListViewBottomMargin;
|
||||||
|
static int m_centerWindHeight;
|
||||||
|
|
||||||
static int LeftWidgetWidth;
|
static int m_timeWidgetTop;
|
||||||
|
static int m_timeWidgetLeft;
|
||||||
|
|
||||||
static int ScreenWidth;
|
static int m_miniIconSize;
|
||||||
static int ScreenHeight;
|
|
||||||
static int AppListViewTopMargin;
|
|
||||||
static int AppListViewLeftMargin;
|
|
||||||
static int AppListViewBottomMargin;
|
|
||||||
static int AppListViewRightMargin;
|
|
||||||
static int CenterWindHeight;
|
|
||||||
|
|
||||||
static int GroupAppRow;
|
static int m_rightViewWidth;
|
||||||
static int GroupAppColumn;
|
static int m_rightViewHeight;
|
||||||
|
|
||||||
static int TimeWidgetTop;
|
|
||||||
static int TimeWidgetLeft;
|
|
||||||
|
|
||||||
static int ButtonWidgetWidth;
|
|
||||||
|
|
||||||
//扩展的开始菜单应用列表
|
|
||||||
static int ToolWidgetLeft;
|
|
||||||
static int WideAppListItemSizeWidth;
|
|
||||||
static int WideAppListItemSizeHeight;
|
|
||||||
static int WideAppViewLeftMargin;
|
|
||||||
static bool IsWideScreen;
|
|
||||||
static int DropMenuWidth;
|
|
||||||
static int DropMenuHeight;
|
|
||||||
static int miniIconSize;
|
|
||||||
|
|
||||||
static int rightViewWidth;
|
|
||||||
static int rightViewHeight;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -40,11 +40,11 @@ void ThumbNail::initUi()
|
||||||
setWindowFlags(Qt::FramelessWindowHint);
|
setWindowFlags(Qt::FramelessWindowHint);
|
||||||
setAttribute(Qt::WA_TranslucentBackground);
|
setAttribute(Qt::WA_TranslucentBackground);
|
||||||
this->setStyleSheet("border:0px;background:transparent;");
|
this->setStyleSheet("border:0px;background:transparent;");
|
||||||
this->setFixedSize(Style::AppListIconSize, Style::AppListIconSize);
|
this->setFixedSize(Style::m_appListIconSize, Style::m_appListIconSize);
|
||||||
iconLabel = new QLabel(this);
|
iconLabel = new QLabel(this);
|
||||||
iconLabel->setStyleSheet("border:0px;background-color:transparent;");
|
iconLabel->setStyleSheet("border:0px;background-color:transparent;");
|
||||||
iconLabel->setFocusPolicy(Qt::NoFocus);
|
iconLabel->setFocusPolicy(Qt::NoFocus);
|
||||||
iconLabel->setFixedSize(Style::AppListIconSize, Style::AppListIconSize);
|
iconLabel->setFixedSize(Style::m_appListIconSize, Style::m_appListIconSize);
|
||||||
layout = new QVBoxLayout(this);
|
layout = new QVBoxLayout(this);
|
||||||
layout->setContentsMargins(0, 0, 0, 0);
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
layout->setSpacing(0);
|
layout->setSpacing(0);
|
||||||
|
@ -134,11 +134,11 @@ void ThumbNail::setupthumbnail(QString desktopfp)
|
||||||
QPixmap pixmap ;
|
QPixmap pixmap ;
|
||||||
|
|
||||||
if (appDisable(desktopfp) == 1) {
|
if (appDisable(desktopfp) == 1) {
|
||||||
pixmap = icon.pixmap((Style::AppListIconSize, Style::AppListIconSize), QIcon::Disabled, QIcon::Off);
|
pixmap = icon.pixmap((Style::m_appListIconSize, Style::m_appListIconSize), QIcon::Disabled, QIcon::Off);
|
||||||
//qDebug()<<"appDisable(desktopfp)"<<appDisable(desktopfp);
|
//qDebug()<<"appDisable(desktopfp)"<<appDisable(desktopfp);
|
||||||
} else {
|
} else {
|
||||||
//qDebug()<<"appDisable(desktopfp)"<<appDisable(desktopfp);
|
//qDebug()<<"appDisable(desktopfp)"<<appDisable(desktopfp);
|
||||||
pixmap = icon.pixmap((Style::AppListIconSize, Style::AppListIconSize), QIcon::Selected, QIcon::Off);
|
pixmap = icon.pixmap((Style::m_appListIconSize, Style::m_appListIconSize), QIcon::Selected, QIcon::Off);
|
||||||
}
|
}
|
||||||
|
|
||||||
iconLabel->setPixmap(pixmap);
|
iconLabel->setPixmap(pixmap);
|
||||||
|
|
Loading…
Reference in New Issue