diff --git a/brightnessdialog.cpp b/brightnessdialog.cpp index 6c289b0..2a0b35c 100644 --- a/brightnessdialog.cpp +++ b/brightnessdialog.cpp @@ -36,7 +36,7 @@ brightnessDialog::brightnessDialog(QWidget *parent) : ui->valueLabel->setStyleSheet("font-size: 9pt"); ui->warmthValueLabel->setStyleSheet("font-size: 9pt"); - if(global::isN705 == true or global::isN905C == true or global::isN613 == true) { + if(global::isN705 == true or global::isN905C == true or global::isN613 == true or global::isKT == true) { ui->warmthSlider->hide(); ui->warmthDecBtn->hide(); ui->warmthIncBtn->hide(); @@ -72,7 +72,7 @@ brightnessDialog::brightnessDialog(QWidget *parent) : // I know, Mini and Touch don't have frontlights but that's a template to include others later... int value; int warmthValue; - if(global::isN705 == true or global::isN905C == true or global::isN873 == true) { + if(global::isN705 == true or global::isN905C == true or global::isKT == true or global::isN873 == true) { value = get_brightness(); if(global::isN873 == true) { warmthValue = get_warmth(); @@ -109,7 +109,7 @@ brightnessDialog::brightnessDialog(QWidget *parent) : ui->brightnessLabel->setFont(QFont(crimson_bold)); // Saving current brightness value in case we want to go backwards - if(global::isN705 == true or global::isN905C == true or global::isN873 == true) { + if(global::isN705 == true or global::isN905C == true or global::isKT == true or global::isN873 == true) { oldValue = get_brightness(); if(global::isN873 == true) { oldWarmthValue = get_warmth(); @@ -189,7 +189,7 @@ void brightnessDialog::on_okBtn_clicked() } void brightnessDialog::pre_set_brightness(int brightnessValue) { - if(global::isN705 == true or global::isN905C == true or global::isN873 == true) { + if(global::isN705 == true or global::isN905C == true or global::isKT == true or global::isN873 == true) { set_brightness(brightnessValue); } else if(global::isN613 == true) { diff --git a/functions.h b/functions.h index efa8cb1..e562c24 100644 --- a/functions.h +++ b/functions.h @@ -124,13 +124,14 @@ namespace global { } inline QString systemInfoText; inline bool forbidOpenSearchDialog; - inline bool isN705; - inline bool isN905C; - inline bool isN613; - inline bool isN873; - inline bool isN236; - inline bool isN437; - inline bool isN306; + inline bool isN705 = false; + inline bool isN905C = false; + inline bool isN613 = false; + inline bool isN873 = false; + inline bool isN236 = false; + inline bool isN437 = false; + inline bool isN306 = false; + inline bool isKT = false; inline bool runningInstanceIsReaderOnly; inline QString deviceID; } @@ -584,7 +585,7 @@ namespace { defaultEpubPageHeight = 365; defaultEpubPageWidth = 365; } - else if(global::deviceID == "n905\n") { + else if(global::deviceID == "n905\n" or global::deviceID == "kt\n") { defaultEpubPageHeight = 425; defaultEpubPageWidth = 425; } @@ -601,7 +602,7 @@ namespace { log(function + ": Defined default ePUB page width to " + QString::number(defaultEpubPageWidth), "functions"); } else if(fileType == 1) { - if(global::deviceID == "n705\n" or global::deviceID == "n905\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "kt\n") { if(global::reader::pdfOrientation == 0) { defaultPdfPageHeight = 750; defaultPdfPageWidth = 550; @@ -647,7 +648,7 @@ namespace { } } void pre_set_brightness(int brightnessValue) { - if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "n873\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "n873\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n" or global::deviceID == "kt\n") { set_brightness(brightnessValue); } else if(global::deviceID == "n613\n") { @@ -663,7 +664,7 @@ namespace { * 1: Bring DOWN brightness * 2: Auto; smooth brightness transition between two brightness levels */ - if(global::deviceID != "n705\n" && global::deviceID != "n905\n") { + if(global::deviceID != "n705\n" && global::deviceID != "n905\n" && global::deviceID != "kt\n") { QString function = __func__; log(function + ": Setting brightness to " + QString::number(value), "functions"); } if(mode == 0) { @@ -766,15 +767,17 @@ namespace { return checkconfig("/external_root/run/encfs_mounted"); } bool isUsbPluggedIn() { - // Thanks to https://github.com/koreader/KoboUSBMS/blob/2efdf9d920c68752b2933f21c664dc1afb28fc2e/usbms.c#L148-L158 - int ntxfd; - if((ntxfd = open("/dev/ntx_io", O_RDWR)) == -1) { - fprintf(stderr, "Error opening ntx_io device\n"); + if(global::deviceID != "kt\n") { + // Thanks to https://github.com/koreader/KoboUSBMS/blob/2efdf9d920c68752b2933f21c664dc1afb28fc2e/usbms.c#L148-L158 + int ntxfd; + if((ntxfd = open("/dev/ntx_io", O_RDWR)) == -1) { + fprintf(stderr, "Error opening ntx_io device\n"); + } + unsigned long ptr = 0U; + ioctl(ntxfd, 108, &ptr); + close(ntxfd); + return !!ptr; } - unsigned long ptr = 0U; - ioctl(ntxfd, 108, &ptr); - close(ntxfd); - return !!ptr; } int testPing(bool blocking) { QProcess *pingProcess = new QProcess(); diff --git a/koboxappsdialog.cpp b/koboxappsdialog.cpp index 242196e..6f01924 100644 --- a/koboxappsdialog.cpp +++ b/koboxappsdialog.cpp @@ -97,7 +97,7 @@ void koboxAppsDialog::on_launchBtn_clicked() // DPI setting string_checkconfig(".config/00-kobox/dpiSetting"); if(checkconfig_str_val == "") { - if(global::deviceID == "n705\n" or global::deviceID == "n905\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "kt\n") { dpiSetting = "125"; } else if(global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n306\n") { @@ -131,7 +131,7 @@ void koboxAppsDialog::on_launchBtn_clicked() log("Launching KoBox app: KTerm", className); string_writeconfig("/external_root/tmp/X_program", "/usr/local/bin/kterm -l /usr/local/share/kterm/layouts/keyboard-kt.xml -k 1"); dpModeSetting = "fullscreen"; - if(global::deviceID == "n705\n" or global::deviceID == "n905\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "kt\n") { dpiSetting = "175"; } else if(global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n306\n") { diff --git a/koboxsettings.cpp b/koboxsettings.cpp index 227aac3..1ec1be2 100644 --- a/koboxsettings.cpp +++ b/koboxsettings.cpp @@ -42,7 +42,7 @@ koboxSettings::koboxSettings(QWidget *parent) : QString dpiSetting; string_checkconfig(".config/00-kobox/dpiSetting"); if(checkconfig_str_val == "") { - if(global::deviceID == "n705\n" or global::deviceID == "n905\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "kt\n") { dpiSetting = "125"; } else if(global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n306\n") { diff --git a/librarywidget.cpp b/librarywidget.cpp index 6085173..3344981 100644 --- a/librarywidget.cpp +++ b/librarywidget.cpp @@ -34,7 +34,7 @@ libraryWidget::libraryWidget(QWidget *parent) : } QFont crimson(family); - if(global::deviceID != "n905\n") { + if(global::deviceID != "n905\n" and global::deviceID != "kt\n") { ui->previousBtn->setText(""); ui->previousBtn->setProperty("type", "borderless"); ui->nextBtn->setText(""); @@ -62,7 +62,7 @@ libraryWidget::libraryWidget(QWidget *parent) : ui->book6Btn->setText(""); ui->book7Btn->setText(""); ui->book8Btn->setText(""); - if(global::deviceID != "n905\n") { + if(global::deviceID != "n905\n" and global::deviceID != "kt\n") { ui->book9Btn->setText(""); ui->book10Btn->setText(""); ui->book11Btn->setText(""); @@ -98,7 +98,7 @@ libraryWidget::libraryWidget(QWidget *parent) : ui->book6Label->setStyleSheet("font-size: 8.5pt; font-style: italic"); ui->book7Label->setStyleSheet("font-size: 8.5pt; font-style: italic"); ui->book8Label->setStyleSheet("font-size: 8.5pt; font-style: italic"); - if(global::deviceID != "n905\n") { + if(global::deviceID != "n905\n" and global::deviceID != "kt\n") { ui->book9Label->setStyleSheet("font-size: 8.5pt; font-style: italic"); ui->book10Label->setStyleSheet("font-size: 8.5pt; font-style: italic"); ui->book11Label->setStyleSheet("font-size: 8.5pt; font-style: italic"); @@ -134,7 +134,7 @@ libraryWidget::libraryWidget(QWidget *parent) : ui->book6Label->setFont(crimson); ui->book7Label->setFont(crimson); ui->book8Label->setFont(crimson); - if(global::deviceID != "n905\n") { + if(global::deviceID != "n905\n" and global::deviceID != "kt\n") { ui->book9Label->setFont(crimson); ui->book10Label->setFont(crimson); ui->book11Label->setFont(crimson); @@ -186,7 +186,7 @@ void libraryWidget::setupView() { ui->book6Label->setText(readFile("/mnt/onboard/onboard/.inkbox/gutenberg-data/latest-books/6/title")); ui->book7Label->setText(readFile("/mnt/onboard/onboard/.inkbox/gutenberg-data/latest-books/7/title")); ui->book8Label->setText(readFile("/mnt/onboard/onboard/.inkbox/gutenberg-data/latest-books/8/title")); - if(global::deviceID != "n905\n") { + if(global::deviceID != "n905\n" and global::deviceID != "kt\n") { ui->book9Label->setText(readFile("/mnt/onboard/onboard/.inkbox/gutenberg-data/latest-books/9/title")); ui->book10Label->setText(readFile("/mnt/onboard/onboard/.inkbox/gutenberg-data/latest-books/10/title")); ui->book11Label->setText(readFile("/mnt/onboard/onboard/.inkbox/gutenberg-data/latest-books/11/title")); @@ -213,7 +213,7 @@ void libraryWidget::setupView() { ui->book7Btn->setIconSize(QSize(stdIconWidth, stdIconHeight)); ui->book8Btn->setIcon(QIcon("/mnt/onboard/onboard/.inkbox/gutenberg-data/latest-books/8/cover.jpg")); ui->book8Btn->setIconSize(QSize(stdIconWidth, stdIconHeight)); - if(global::deviceID != "n905\n") { + if(global::deviceID != "n905\n" and global::deviceID != "kt\n") { ui->book9Btn->setIcon(QIcon("/mnt/onboard/onboard/.inkbox/gutenberg-data/latest-books/9/cover.jpg")); ui->book9Btn->setIconSize(QSize(stdIconWidth, stdIconHeight)); ui->book10Btn->setIcon(QIcon("/mnt/onboard/onboard/.inkbox/gutenberg-data/latest-books/10/cover.jpg")); diff --git a/main.cpp b/main.cpp index 1dd3482..522d66a 100644 --- a/main.cpp +++ b/main.cpp @@ -114,65 +114,28 @@ int main(int argc, char *argv[]) string_writeconfig("/inkbox/skip_opendialog", "true"); if(global::deviceID == "n705\n") { global::isN705 = true; - global::isN905C = false; - global::isN613 = false; - global::isN873 = false; - global::isN236 = false; - global::isN437 = false; - global::isN306 = false; } else if(global::deviceID == "n905\n") { - global::isN705 = false; global::isN905C = true; - global::isN613 = false; - global::isN873 = false; - global::isN236 = false; - global::isN437 = false; - global::isN306 = false; } else if(global::deviceID == "n613\n") { - global::isN705 = false; - global::isN905C = false; global::isN613 = true; - global::isN873 = false; - global::isN236 = false; - global::isN437 = false; } else if(global::deviceID == "n873\n") { - global::isN705 = false; - global::isN905C = false; - global::isN613 = false; global::isN873 = true; - global::isN236 = false; - global::isN437 = false; } else if(global::deviceID == "n236\n") { - global::isN705 = false; - global::isN905C = false; - global::isN613 = false; - global::isN873 = false; global::isN236 = true; - global::isN437 = false; - global::isN306 = false; } else if(global::deviceID == "n437\n") { - global::isN705 = false; - global::isN905C = false; - global::isN613 = false; - global::isN873 = false; - global::isN236 = false; global::isN437 = true; - global::isN306 = false; } else if(global::deviceID == "n306\n") { - global::isN705 = false; - global::isN905C = false; - global::isN613 = false; - global::isN873 = false; - global::isN236 = false; - global::isN437 = false; global::isN306 = true; } + else if(global::deviceID == "kt\n") { + global::isKT = true; + } else { ; } @@ -200,67 +163,28 @@ int main(int argc, char *argv[]) if(global::deviceID == "n705\n") { global::isN705 = true; - global::isN905C = false; - global::isN613 = false; - global::isN873 = false; - global::isN236 = false; - global::isN437 = false; - global::isN306 = false; } else if(global::deviceID == "n905\n") { - global::isN705 = false; global::isN905C = true; - global::isN613 = false; - global::isN873 = false; - global::isN236 = false; - global::isN437 = false; - global::isN306 = false; } else if(global::deviceID == "n613\n") { - global::isN705 = false; - global::isN905C = false; global::isN613 = true; - global::isN873 = false; - global::isN236 = false; - global::isN437 = false; - global::isN306 = false; } else if(global::deviceID == "n873\n") { - global::isN705 = false; - global::isN905C = false; - global::isN613 = false; global::isN873 = true; - global::isN236 = false; - global::isN437 = false; - global::isN306 = false; } else if(global::deviceID == "n236\n") { - global::isN705 = false; - global::isN905C = false; - global::isN613 = false; - global::isN873 = false; global::isN236 = true; - global::isN437 = false; - global::isN306 = false; } else if(global::deviceID == "n437\n") { - global::isN705 = false; - global::isN905C = false; - global::isN613 = false; - global::isN873 = false; - global::isN236 = false; global::isN437 = true; - global::isN306 = false; } else if(global::deviceID == "n306\n") { - global::isN705 = false; - global::isN905C = false; - global::isN613 = false; - global::isN873 = false; - global::isN236 = false; - global::isN437 = false; global::isN306 = true; } + else if(global::deviceID == "kt\n") { + global::isKT = true; + } else { ; } diff --git a/mainwindow.cpp b/mainwindow.cpp index 826d7db..bfe86aa 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -83,7 +83,7 @@ MainWindow::MainWindow(QWidget *parent) wifiIconWidth = sW / 20.5; wifiIconHeight = sH / 20.5; } - else if(global::deviceID == "n905\n") { + else if(global::deviceID == "n905\n" or global::deviceID == "kt\n") { stdIconWidth = sW / 14; stdIconHeight = sH / 14; brightnessIconWidth = sW / 26; @@ -157,7 +157,7 @@ MainWindow::MainWindow(QWidget *parent) ui->wifiBtn->setStyleSheet("font-size: 9pt; padding-bottom: 0px; padding-top: 0px; padding-left: 8px; padding-right: 8px"); // Checking if we have a Mini or Touch there - if(global::deviceID == "n705\n" or global::deviceID == "n905\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "kt\n") { ui->batteryIcon->setStyleSheet("font-size: 5pt; padding-bottom: 0px; padding-top: 0px; padding-left: 1px; padding-right: 1px;"); } else if(global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n" or global::deviceID == "emu\n") { @@ -794,9 +794,9 @@ void MainWindow::resetIcons() { void MainWindow::setBatteryIcon() { // Battery - if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "n613\n" or global::deviceID == "n873\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "n613\n" or global::deviceID == "n873\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n" or global::deviceID == "kt\n") { // Hide brightness controls; they won't be very useful there anyway (for anything but the Glo (HD)/Libra/Aura 2) ... - if(global::deviceID == "n705\n" or global::deviceID == "n905\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "kt\n") { ui->brightnessBtn->hide(); ui->line_7->hide(); } @@ -876,7 +876,7 @@ void MainWindow::setInitialBrightness() { set_warmth(warmth); } int brightness_value = brightness_checkconfig(".config/03-brightness/config"); - if(global::deviceID != "n705\n" and global::deviceID != "n905\n") { + if(global::deviceID != "n705\n" and global::deviceID != "n905\n" and global::deviceID != "kt\n") { log("Setting initial brightness to " + QString::number(brightness_value), className); } if(checkconfig("/tmp/oobe-inkbox_completed") == true) { @@ -1174,7 +1174,7 @@ void MainWindow::resetFullWindow() { } void MainWindow::setRecentBooksLabelsTruncateThreshold() { - if(global::deviceID == "n705\n" or global::deviceID == "n905b\n" or global::deviceID == "n905c\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905b\n" or global::deviceID == "n905c\n" or global::deviceID == "kt\n") { truncateThreshold = 12; } else if(global::deviceID == "n613\n" or global::deviceID == "n873\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n"){ diff --git a/reader.cpp b/reader.cpp index 3cc42fe..9a72750 100644 --- a/reader.cpp +++ b/reader.cpp @@ -248,7 +248,7 @@ reader::reader(QWidget *parent) : // Custom settings // Brightness if(global::reader::globalReadingSettings == false) { - if(global::deviceID != "n705\n" and global::deviceID != "n905\n") { + if(global::deviceID != "n705\n" and global::deviceID != "n905\n" and global::deviceID != "kt\n") { int brightness_value = brightness_checkconfig(".config/03-brightness/config"); log("Local Reading Settings: Setting brightness to " + QString::number(brightness_value), className); cinematicBrightness(brightness_value, 2); @@ -344,7 +344,7 @@ reader::reader(QWidget *parent) : // Getting brightness level int brightness_value; - if(global::isN705 == true or global::isN905C == true or global::isN873 == true) { + if(global::isN705 == true or global::isN905C == true or global::isKT == true or global::isN873 == true) { brightness_value = get_brightness(); } else if(global::isN613 == true) { @@ -362,7 +362,7 @@ reader::reader(QWidget *parent) : float sH = QGuiApplication::screens()[0]->size().height(); // Defining what the icons' size will be if(checkconfig("/opt/inkbox_genuine") == true) { - if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n" or global::deviceID == "emu\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n" or global::deviceID == "kt\n" or global::deviceID == "emu\n") { float stdIconWidth = sW / 16; float stdIconHeight = sW / 16; QPixmap chargingPixmap(":/resources/battery_charging.png"); @@ -589,7 +589,7 @@ reader::reader(QWidget *parent) : if(global::deviceID == "n705\n") { infoLabelDefinedLength = 35; } - else if(global::deviceID == "n905\n" or global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n") { + else if(global::deviceID == "n905\n" or global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n" or global::deviceID == "kt\n") { infoLabelDefinedLength = 50; } else { @@ -618,7 +618,7 @@ reader::reader(QWidget *parent) : if(global::deviceID == "n705\n") { infoLabelDefinedLength = 35; } - else if(global::deviceID == "n905\n" or global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n") { + else if(global::deviceID == "n905\n" or global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n" or global::deviceID == "kt\n") { infoLabelDefinedLength = 50; } else { @@ -1183,7 +1183,7 @@ void reader::on_optionsBtn_clicked() void reader::on_brightnessDecBtn_clicked() { int bval; - if(global::isN705 == true or global::isN905C == true or global::isN873 == true) { + if(global::isN705 == true or global::isN905C == true or global::isKT == true or global::isN873 == true) { bval = get_brightness(); } else if(global::isN613 == true) { @@ -1206,7 +1206,7 @@ void reader::on_brightnessDecBtn_clicked() void reader::on_brightnessIncBtn_clicked() { int bval; - if(global::isN705 == true or global::isN905C == true or global::isN873 == true) { + if(global::isN705 == true or global::isN905C == true or global::isKT == true or global::isN873 == true) { bval = get_brightness(); } else if(global::isN613 == true) { @@ -1458,7 +1458,7 @@ void reader::menubar_show() { ui->pageWidget->setVisible(true); } - if(global::deviceID == "n705\n" or global::deviceID == "n905\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "kt\n") { ; } else { @@ -1470,7 +1470,7 @@ void reader::menubar_show() { void reader::menubar_hide() { log("Hiding menu bar", className); - if(global::deviceID == "n705\n" or global::deviceID == "n905\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "kt\n") { ui->brightnessWidget->setVisible(false); } else { @@ -1615,7 +1615,7 @@ void reader::on_sizeSlider_valueChanged(int value) ui->sizeValueLabel->setText("5"); } } - if(global::deviceID == "n905\n") { + if(global::deviceID == "n905\n" or global::deviceID == "kt\n") { if(value == 0) { ui->text->setStyleSheet("font-size: 6pt"); ui->sizeValueLabel->setText("1"); diff --git a/settings.cpp b/settings.cpp index 18dfb41..5104761 100644 --- a/settings.cpp +++ b/settings.cpp @@ -175,7 +175,7 @@ settings::settings(QWidget *parent) : ui->uiScalingSlider->setValue(2); } } - else if(global::deviceID == "n905\n") { + else if(global::deviceID == "n905\n" or global::deviceID == "kt\n") { if(dpi_number == 160) { ui->uiScalingSlider->setValue(0); } @@ -620,7 +620,7 @@ void settings::on_uiScalingSlider_valueChanged(int value) if(global::deviceID == "n705\n") { string_writeconfig(".config/09-dpi/config", "187"); } - if(global::deviceID == "n905\n") { + if(global::deviceID == "n905\n" or global::deviceID == "kt\n") { string_writeconfig(".config/09-dpi/config", "160"); } if(global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n306\n") { @@ -637,7 +637,7 @@ void settings::on_uiScalingSlider_valueChanged(int value) if(global::deviceID == "n705\n") { string_writeconfig(".config/09-dpi/config", "214"); } - if(global::deviceID == "n905\n") { + if(global::deviceID == "n905\n" or global::deviceID == "kt\n") { string_writeconfig(".config/09-dpi/config", "187"); } if(global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n306\n") { @@ -654,7 +654,7 @@ void settings::on_uiScalingSlider_valueChanged(int value) if(global::deviceID == "n705\n") { string_writeconfig(".config/09-dpi/config", "227"); } - if(global::deviceID == "n905\n") { + if(global::deviceID == "n905\n" or global::deviceID == "kt\n") { string_writeconfig(".config/09-dpi/config", "200"); } if(global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n306\n") { @@ -772,7 +772,7 @@ void settings::on_enableUiScalingCheckBox_toggled(bool checked) if(global::deviceID == "n705\n") { string_writeconfig(".config/09-dpi/config", "187"); } - else if(global::deviceID == "n905\n") { + else if(global::deviceID == "n905\n" or global::deviceID == "kt\n") { string_writeconfig(".config/09-dpi/config", "160"); } else if(global::deviceID == "n613\n" or global::deviceID == "n236\n" or global::deviceID == "n306\n") { diff --git a/settingschooser.cpp b/settingschooser.cpp index 3f496fd..90b5e1c 100644 --- a/settingschooser.cpp +++ b/settingschooser.cpp @@ -40,7 +40,7 @@ settingsChooser::settingsChooser(QWidget *parent) : ui->inkboxSettingsBtn->setProperty("type", "borderless"); ui->koboxSettingsBtn->setProperty("type", "borderless"); - if(global::deviceID == "n705\n" or global::deviceID == "n905\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "kt\n") { ui->inkboxSettingsBtn->setStyleSheet("padding: 20px; Text-align: left"); ui->koboxSettingsBtn->setStyleSheet("padding: 20px; Text-align: left"); } diff --git a/usbms_splash.cpp b/usbms_splash.cpp index 05510ec..e1446d7 100644 --- a/usbms_splash.cpp +++ b/usbms_splash.cpp @@ -34,7 +34,7 @@ usbms_splash::usbms_splash(QWidget *parent) : ui->label->setText("Launching KoBox subsystem"); ui->label->setStyleSheet("font-size: 14pt; font-weight: bold"); ui->label_3->setText("Please wait, this could take a while."); - if(global::deviceID == "n905\n") { + if(global::deviceID == "n905\n" or global::deviceID == "kt\n") { ui->label_3->setStyleSheet("font-size: 11pt"); } else {