Some UI fixes; support USBMS for Nia and Libra devices

This commit is contained in:
Nicolas Mailloux 2022-03-06 10:25:25 -05:00
parent 0b4b1f51e1
commit dc92af6293
3 changed files with 11 additions and 1 deletions

View file

@ -9,7 +9,6 @@ bookInfoDialog::bookInfoDialog(QWidget *parent) :
ui(new Ui::bookInfoDialog) ui(new Ui::bookInfoDialog)
{ {
ui->setupUi(this); ui->setupUi(this);
bookInfoDialog::setFont(QFont("u001"));
// Stylesheet // Stylesheet
QFile stylesheetFile(":/resources/eink.qss"); QFile stylesheetFile(":/resources/eink.qss");

View file

@ -43,6 +43,7 @@ reader::reader(QWidget *parent) :
ui->sizeValueLabel->setFont(QFont("u001")); ui->sizeValueLabel->setFont(QFont("u001"));
ui->alignmentLabel->setFont(QFont("u001")); ui->alignmentLabel->setFont(QFont("u001"));
ui->fontChooser->setFont(QFont("u001")); ui->fontChooser->setFont(QFont("u001"));
ui->definitionStatusLabel->setFont(QFont("u001"));
ui->pageProgressBar->setFont(QFont("u001")); ui->pageProgressBar->setFont(QFont("u001"));
ui->previousBtn->setProperty("type", "borderless"); ui->previousBtn->setProperty("type", "borderless");

View file

@ -98,6 +98,16 @@ void usbms_splash::usbms_launch()
proc_1->waitForFinished(); proc_1->waitForFinished();
proc_1->deleteLater(); proc_1->deleteLater();
if(readFile("/opt/inkbox_device") == "n306\n" or readFile("/opt/inkbox_device") == "n873\n") {
QString functionInsmodProg("insmod");
QStringList functionInsmodArgs;
functionInsmodArgs << "/external_root/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko";
QProcess * functionInsmodProc = new QProcess();
functionInsmodProc->start();
functionInsmodProc->waitForFinished();
functionInsmodProc->deleteLater();
}
bool exitUsbMsDone = false; bool exitUsbMsDone = false;
QTimer *usbms_t = new QTimer(this); QTimer *usbms_t = new QTimer(this);
usbms_t->setInterval(1000); usbms_t->setInterval(1000);