mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08:00
Check device info in read-only mode
This commit is contained in:
parent
fb6d6255e5
commit
ac9c5b1a47
4 changed files with 10 additions and 10 deletions
|
@ -65,7 +65,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
sH = QGuiApplication::screens()[0]->size().height();
|
sH = QGuiApplication::screens()[0]->size().height();
|
||||||
|
|
||||||
// Defining what the default icon size will be
|
// Defining what the default icon size will be
|
||||||
string_checkconfig("/opt/inkbox_device");
|
string_checkconfig_ro("/opt/inkbox_device");
|
||||||
if(checkconfig_str_val == "n705\n") {
|
if(checkconfig_str_val == "n705\n") {
|
||||||
stdIconWidth = sW / 12;
|
stdIconWidth = sW / 12;
|
||||||
stdIconHeight = sH / 12;
|
stdIconHeight = sH / 12;
|
||||||
|
|
|
@ -872,7 +872,7 @@ void reader::menubar_show() {
|
||||||
ui->menuBarWidget->setVisible(true);
|
ui->menuBarWidget->setVisible(true);
|
||||||
ui->statusBarWidget->setVisible(true);
|
ui->statusBarWidget->setVisible(true);
|
||||||
|
|
||||||
string_checkconfig("/opt/inkbox_device");
|
string_checkconfig_ro("/opt/inkbox_device");
|
||||||
if(checkconfig_str_val == "n705\n" or checkconfig_str_val == "n905\n") {
|
if(checkconfig_str_val == "n705\n" or checkconfig_str_val == "n905\n") {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -891,7 +891,7 @@ void reader::menubar_show() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void reader::menubar_hide() {
|
void reader::menubar_hide() {
|
||||||
string_checkconfig("/opt/inkbox_device");
|
string_checkconfig_ro("/opt/inkbox_device");
|
||||||
if(checkconfig_str_val == "n705\n" or checkconfig_str_val == "n905\n") {
|
if(checkconfig_str_val == "n705\n" or checkconfig_str_val == "n905\n") {
|
||||||
ui->brightnessWidget->setVisible(false);
|
ui->brightnessWidget->setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
10
settings.cpp
10
settings.cpp
|
@ -101,7 +101,7 @@ settings::settings(QWidget *parent) :
|
||||||
else {
|
else {
|
||||||
int dpi_number = checkconfig_str_val.toInt();
|
int dpi_number = checkconfig_str_val.toInt();
|
||||||
// Checking if it's a Mini or a Touch
|
// Checking if it's a Mini or a Touch
|
||||||
string_checkconfig("/opt/inkbox_device");
|
string_checkconfig_ro("/opt/inkbox_device");
|
||||||
if(checkconfig_str_val == "n705\n") {
|
if(checkconfig_str_val == "n705\n") {
|
||||||
if(dpi_number == 187) {
|
if(dpi_number == 187) {
|
||||||
ui->uiScalingSlider->setValue(0);
|
ui->uiScalingSlider->setValue(0);
|
||||||
|
@ -498,7 +498,7 @@ void settings::on_darkModeCheckBox_toggled(bool checked)
|
||||||
void settings::on_uiScalingSlider_valueChanged(int value)
|
void settings::on_uiScalingSlider_valueChanged(int value)
|
||||||
{
|
{
|
||||||
if(value == 0) {
|
if(value == 0) {
|
||||||
string_checkconfig("/opt/inkbox_device");
|
string_checkconfig_ro("/opt/inkbox_device");
|
||||||
if(checkconfig_str_val == "n705\n") {
|
if(checkconfig_str_val == "n705\n") {
|
||||||
string_writeconfig(".config/09-dpi/config", "187");
|
string_writeconfig(".config/09-dpi/config", "187");
|
||||||
}
|
}
|
||||||
|
@ -507,7 +507,7 @@ void settings::on_uiScalingSlider_valueChanged(int value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(value == 1) {
|
if(value == 1) {
|
||||||
string_checkconfig("/opt/inkbox_device");
|
string_checkconfig_ro("/opt/inkbox_device");
|
||||||
if(checkconfig_str_val == "n705\n") {
|
if(checkconfig_str_val == "n705\n") {
|
||||||
string_writeconfig(".config/09-dpi/config", "214");
|
string_writeconfig(".config/09-dpi/config", "214");
|
||||||
}
|
}
|
||||||
|
@ -516,7 +516,7 @@ void settings::on_uiScalingSlider_valueChanged(int value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(value == 2) {
|
if(value == 2) {
|
||||||
string_checkconfig("/opt/inkbox_device");
|
string_checkconfig_ro("/opt/inkbox_device");
|
||||||
if(checkconfig_str_val == "n705\n") {
|
if(checkconfig_str_val == "n705\n") {
|
||||||
string_writeconfig(".config/09-dpi/config", "227");
|
string_writeconfig(".config/09-dpi/config", "227");
|
||||||
}
|
}
|
||||||
|
@ -614,7 +614,7 @@ void settings::on_enableUiScalingCheckBox_toggled(bool checked)
|
||||||
{
|
{
|
||||||
if(checked == true) {
|
if(checked == true) {
|
||||||
// Writing default value depending on the device
|
// Writing default value depending on the device
|
||||||
string_checkconfig("/opt/inkbox_device");
|
string_checkconfig_ro("/opt/inkbox_device");
|
||||||
if(checkconfig_str_val == "n705\n") {
|
if(checkconfig_str_val == "n705\n") {
|
||||||
string_writeconfig(".config/09-dpi/config", "187");
|
string_writeconfig(".config/09-dpi/config", "187");
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ settingsChooser::settingsChooser(QWidget *parent) :
|
||||||
sH = QGuiApplication::screens()[0]->size().height();
|
sH = QGuiApplication::screens()[0]->size().height();
|
||||||
|
|
||||||
// Defining what the default icon size will be
|
// Defining what the default icon size will be
|
||||||
string_checkconfig("/opt/inkbox_device");
|
string_checkconfig_ro("/opt/inkbox_device");
|
||||||
if(checkconfig_str_val == "n705\n") {
|
if(checkconfig_str_val == "n705\n") {
|
||||||
homeIconWidth = sW / 18;
|
homeIconWidth = sW / 18;
|
||||||
homeIconHeight = sW / 18;
|
homeIconHeight = sW / 18;
|
||||||
|
@ -41,7 +41,7 @@ settingsChooser::settingsChooser(QWidget *parent) :
|
||||||
ui->inkboxSettingsBtn->setProperty("type", "borderless");
|
ui->inkboxSettingsBtn->setProperty("type", "borderless");
|
||||||
ui->koboxSettingsBtn->setProperty("type", "borderless");
|
ui->koboxSettingsBtn->setProperty("type", "borderless");
|
||||||
|
|
||||||
string_checkconfig("/opt/inkbox_device");
|
string_checkconfig_ro("/opt/inkbox_device");
|
||||||
if(checkconfig_str_val == "n705\n" or checkconfig_str_val == "n905\n") {
|
if(checkconfig_str_val == "n705\n" or checkconfig_str_val == "n905\n") {
|
||||||
ui->inkboxSettingsBtn->setStyleSheet("padding: 20px; Text-align: left");
|
ui->inkboxSettingsBtn->setStyleSheet("padding: 20px; Text-align: left");
|
||||||
ui->koboxSettingsBtn->setStyleSheet("padding: 20px; Text-align: left");
|
ui->koboxSettingsBtn->setStyleSheet("padding: 20px; Text-align: left");
|
||||||
|
|
Loading…
Reference in a new issue