解决:国产龙芯和x86系统设置界面显示不全的bug,调整sane扫描提示信息
This commit is contained in:
parent
51332b6c30
commit
cee72c5360
|
@ -148,14 +148,32 @@ void Dialog_progress_ui::FuncNotify(int event, void *msg, int flag)
|
|||
{
|
||||
case SANE_EVENT_WORKING:
|
||||
{
|
||||
QString finishInfo(tr("Start scan..."));
|
||||
QString finishInfo;
|
||||
if (msg != nullptr)
|
||||
{
|
||||
finishInfo = (char*)msg;
|
||||
}
|
||||
else
|
||||
{
|
||||
finishInfo = tr("Start scan...");
|
||||
}
|
||||
|
||||
emit p->scan_status(finishInfo, true);
|
||||
}
|
||||
break;
|
||||
|
||||
case SANE_EVENT_SCAN_FINISHED:
|
||||
{
|
||||
QString finishInfo(tr("Scan completed"));
|
||||
QString finishInfo;
|
||||
if (msg != nullptr)
|
||||
{
|
||||
finishInfo = (char*)msg;
|
||||
}
|
||||
else
|
||||
{
|
||||
finishInfo = tr("Scan completed");
|
||||
}
|
||||
|
||||
emit p->scan_finish(flag, finishInfo);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -317,6 +317,12 @@ void hg_settingdialog::create_scheme_management_ui(QVBoxLayout* layout)
|
|||
bool enabled = false;
|
||||
QHBoxLayout *hLayout = new QHBoxLayout();
|
||||
int width = 180;
|
||||
int width2 = 100;
|
||||
|
||||
#if defined (loongarch64)
|
||||
width2 = 120;
|
||||
#endif
|
||||
|
||||
std::vector<std::string> schemes;
|
||||
std::string cur_schm(cur_cfg_->get_current_scheme_name());
|
||||
|
||||
|
@ -347,7 +353,7 @@ void hg_settingdialog::create_scheme_management_ui(QVBoxLayout* layout)
|
|||
|
||||
m_pbtn_addNew = new QPushButton(this);
|
||||
m_pbtn_addNew->setText(tr("Add new"));
|
||||
m_pbtn_addNew->setFixedWidth(100);
|
||||
m_pbtn_addNew->setFixedWidth(width2);
|
||||
layout->addWidget(m_pbtn_addNew);
|
||||
connect(m_pbtn_addNew, SIGNAL(clicked(bool)), this, SLOT(slot_pushButton_scheme_management()));
|
||||
|
||||
|
@ -355,7 +361,7 @@ void hg_settingdialog::create_scheme_management_ui(QVBoxLayout* layout)
|
|||
|
||||
m_pbtn_Save = new QPushButton(this);
|
||||
m_pbtn_Save->setText(tr("Save"));
|
||||
m_pbtn_Save->setFixedWidth(100);
|
||||
m_pbtn_Save->setFixedWidth(width2);
|
||||
layout->addWidget(m_pbtn_Save);
|
||||
connect(m_pbtn_Save, SIGNAL(clicked(bool)), this, SLOT(slot_pushButton_scheme_management()));
|
||||
|
||||
|
@ -364,7 +370,7 @@ void hg_settingdialog::create_scheme_management_ui(QVBoxLayout* layout)
|
|||
m_deleteCur = new QPushButton(this);
|
||||
m_deleteCur->setText(tr("Delete"));
|
||||
m_deleteCur->setEnabled(enabled);
|
||||
m_deleteCur->setFixedWidth(100);
|
||||
m_deleteCur->setFixedWidth(width2);
|
||||
layout->addWidget(m_deleteCur);
|
||||
connect(m_deleteCur, SIGNAL(clicked(bool)), this, SLOT(slot_pushButton_scheme_management()));
|
||||
|
||||
|
@ -373,7 +379,7 @@ void hg_settingdialog::create_scheme_management_ui(QVBoxLayout* layout)
|
|||
m_deleteAll = new QPushButton(this);
|
||||
m_deleteAll->setText(tr("Delete all"));
|
||||
m_deleteAll->setEnabled(enabled);
|
||||
m_deleteAll->setFixedWidth(100);
|
||||
m_deleteAll->setFixedWidth(width2);
|
||||
layout->addWidget(m_deleteAll);
|
||||
connect(m_deleteAll, SIGNAL(clicked(bool)), this, SLOT(slot_pushButton_scheme_management()));
|
||||
|
||||
|
@ -387,7 +393,7 @@ void hg_settingdialog::create_scheme_management_ui(QVBoxLayout* layout)
|
|||
|
||||
m_pbtn_restore = new QPushButton(this);
|
||||
m_pbtn_restore->setText(tr("Restore"));
|
||||
m_pbtn_restore->setFixedWidth(100);
|
||||
m_pbtn_restore->setFixedWidth(width2);
|
||||
layout->addWidget(m_pbtn_restore);
|
||||
connect(m_pbtn_restore, SIGNAL(clicked(bool)), this, SLOT(slot_pushButton_scheme_management()));
|
||||
|
||||
|
@ -1887,7 +1893,7 @@ void hg_settingdialog::slot_buttonAboutClicked()
|
|||
|
||||
QMessageBox msg(QMessageBox::NoIcon, title,
|
||||
content, QMessageBox::Ok, this);
|
||||
msg.setStyleSheet("QLabel{""min-width: 260px;""}");
|
||||
msg.setStyleSheet("QLabel{""min-width: 280px;""}");
|
||||
msg.exec();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue