🐞 fix(UI模块): 修改导航栏切换逻辑
调整导航栏按钮切换逻辑,避免闪烁 157244 【多端协同】平板模式下使用屏幕键盘在搜索框输入字符时,每次输入,搜索框右侧会出现闪烁的白条(必现)
This commit is contained in:
parent
68c8fe3eba
commit
03d89fe676
|
@ -327,29 +327,29 @@ void FileManageWin::changeTabMode(FileManageWin::TabType type)
|
|||
{
|
||||
qInfo() << "ChangeTabMode ------------ " << type;
|
||||
|
||||
m_statusLab->setText(tr("Select File"));
|
||||
m_retreatBtn->hide();
|
||||
m_lab1->hide();
|
||||
m_forwardBtn->hide();
|
||||
m_statusLab->hide();
|
||||
m_lab2->hide();
|
||||
m_crumb->hide();
|
||||
m_searchBtn->hide();
|
||||
m_lab3->hide();
|
||||
m_editBtn->hide();
|
||||
m_selectBtn->hide();
|
||||
m_lab4->hide();
|
||||
m_verticalLine->hide();
|
||||
m_lab5->hide();
|
||||
m_finishBtn->hide();
|
||||
m_modeBtn->hide();
|
||||
m_lab6->hide();
|
||||
m_refreshBtn->hide();
|
||||
// m_retreatBtn->hide();
|
||||
// m_lab1->hide();
|
||||
// m_forwardBtn->hide();
|
||||
// m_statusLab->hide();
|
||||
// m_lab2->hide();
|
||||
// m_crumb->hide();
|
||||
// m_searchBtn->hide();
|
||||
// m_lab3->hide();
|
||||
// m_editBtn->hide();
|
||||
// m_selectBtn->hide();
|
||||
// m_lab4->hide();
|
||||
// m_verticalLine->hide();
|
||||
// m_lab5->hide();
|
||||
// m_finishBtn->hide();
|
||||
// m_modeBtn->hide();
|
||||
// m_lab6->hide();
|
||||
// m_refreshBtn->hide();
|
||||
switch (type) {
|
||||
case FileManageWin::TabType::Default: {
|
||||
m_retreatBtn->show();
|
||||
m_lab1->show();
|
||||
m_forwardBtn->show();
|
||||
m_statusLab->hide();
|
||||
m_lab2->show();
|
||||
m_crumb->show();
|
||||
if (m_searchLine->isHidden()) {
|
||||
|
@ -357,46 +357,78 @@ void FileManageWin::changeTabMode(FileManageWin::TabType type)
|
|||
}
|
||||
m_lab3->show();
|
||||
m_editBtn->show();
|
||||
m_selectBtn->hide();
|
||||
m_lab4->show();
|
||||
m_verticalLine->show();
|
||||
m_lab5->show();
|
||||
m_finishBtn->hide();
|
||||
m_modeBtn->show();
|
||||
m_lab6->show();
|
||||
m_refreshBtn->show();
|
||||
} break;
|
||||
case FileManageWin::TabType::AndroidHomePage: {
|
||||
m_statusLab->setText(crumbText(CrumbTag::FileList));
|
||||
m_retreatBtn->hide();
|
||||
m_lab1->show();
|
||||
m_forwardBtn->hide();
|
||||
m_statusLab->setText(tr("Select File"));
|
||||
m_statusLab->show();
|
||||
m_lab2->hide();
|
||||
m_crumb->hide();
|
||||
if (m_searchLine->isHidden()) {
|
||||
m_searchBtn->show();
|
||||
}
|
||||
m_lab3->hide();
|
||||
m_editBtn->hide();
|
||||
m_selectBtn->hide();
|
||||
m_lab4->show();
|
||||
m_verticalLine->hide();
|
||||
m_lab5->hide();
|
||||
m_finishBtn->hide();
|
||||
m_modeBtn->hide();
|
||||
m_lab6->hide();
|
||||
m_refreshBtn->hide();
|
||||
} break;
|
||||
case FileManageWin::TabType::AppHomePage: {
|
||||
m_retreatBtn->show();
|
||||
m_lab1->show();
|
||||
m_forwardBtn->show();
|
||||
m_statusLab->hide();
|
||||
m_lab2->show();
|
||||
m_crumb->show();
|
||||
if (m_searchLine->isHidden()) {
|
||||
m_searchBtn->show();
|
||||
}
|
||||
m_lab3->hide();
|
||||
m_editBtn->hide();
|
||||
m_selectBtn->hide();
|
||||
m_lab4->show();
|
||||
m_verticalLine->hide();
|
||||
m_lab5->hide();
|
||||
m_finishBtn->hide();
|
||||
m_modeBtn->hide();
|
||||
m_lab6->hide();
|
||||
m_refreshBtn->hide();
|
||||
} break;
|
||||
case FileManageWin::TabType::SearchResultsPage: {
|
||||
m_statusLab->setText(tr("Search File"));
|
||||
m_retreatBtn->setEnabled(true);
|
||||
m_retreatBtn->show();
|
||||
m_lab1->hide();
|
||||
m_forwardBtn->hide();
|
||||
m_statusLab->setText(tr("Search File"));
|
||||
m_statusLab->show();
|
||||
m_lab2->hide();
|
||||
m_crumb->hide();
|
||||
if (m_searchLine->isHidden()) {
|
||||
m_searchBtn->show();
|
||||
}
|
||||
m_lab3->show();
|
||||
m_editBtn->show();
|
||||
m_selectBtn->hide();
|
||||
m_lab4->show();
|
||||
m_verticalLine->show();
|
||||
m_lab5->show();
|
||||
m_finishBtn->hide();
|
||||
m_modeBtn->show();
|
||||
m_lab6->show();
|
||||
m_refreshBtn->show();
|
||||
|
@ -406,11 +438,24 @@ void FileManageWin::changeTabMode(FileManageWin::TabType type)
|
|||
case FileManageWin::TabType::Load: {
|
||||
} break;
|
||||
case FileManageWin::TabType::Edit: {
|
||||
m_retreatBtn->hide();
|
||||
m_lab1->hide();
|
||||
m_forwardBtn->hide();
|
||||
m_statusLab->setText(tr("Select File"));
|
||||
m_statusLab->show();
|
||||
m_lab2->hide();
|
||||
m_crumb->hide();
|
||||
m_searchBtn->hide();
|
||||
m_lab3->show();
|
||||
m_editBtn->hide();
|
||||
m_selectBtn->show();
|
||||
m_lab4->hide();
|
||||
m_verticalLine->hide();
|
||||
m_lab5->show();
|
||||
m_finishBtn->show();
|
||||
m_modeBtn->hide();
|
||||
m_lab6->hide();
|
||||
m_refreshBtn->hide();
|
||||
} break;
|
||||
}
|
||||
update();
|
||||
|
@ -447,6 +492,10 @@ void FileManageWin::slotKdkBtnClicked()
|
|||
if (m_isSearch) {
|
||||
m_isSearch = false;
|
||||
m_searchLine->clear();
|
||||
m_isSearchLineHiddenIn = true;
|
||||
m_searchLineAnimation->setStartValue(SEARCHLINE_WIDTH);
|
||||
m_searchLineAnimation->setEndValue(0);
|
||||
m_searchLineAnimation->start();
|
||||
} else {
|
||||
Q_EMIT sigBtnCliked(FileManageWin::BtnType::GoBacktBtn);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue