Style fix

This commit is contained in:
Nicolas Mailloux 2022-08-08 22:22:36 -04:00
parent 94c42ad201
commit 5b726657ce
2 changed files with 45 additions and 20 deletions

View file

@ -16,6 +16,7 @@ powerDaemonSettings::powerDaemonSettings(QWidget *parent) :
ui->CBSLabel->setFont(QFont("Noto Sans Mono")); ui->CBSLabel->setFont(QFont("Noto Sans Mono"));
ui->idleSleepLabel->setFont(QFont("Noto Sans Mono")); ui->idleSleepLabel->setFont(QFont("Noto Sans Mono"));
// Font tweaks
ui->label_2->setFont(QFont("Inter")); ui->label_2->setFont(QFont("Inter"));
ui->exitBtn->setFont(QFont("Inter")); ui->exitBtn->setFont(QFont("Inter"));
@ -37,39 +38,39 @@ powerDaemonSettings::powerDaemonSettings(QWidget *parent) :
ui->label_2->setStyleSheet("font-weight: bold"); ui->label_2->setStyleSheet("font-weight: bold");
// Icons // Icons
int controlBtnFixedLength; int controlBtnFixedWidth;
if(global::deviceID == "n705\n") { if(global::deviceID == "n705\n") {
controlBtnFixedLength = 50; controlBtnFixedWidth = 50;
} }
else { else {
controlBtnFixedLength = 80; controlBtnFixedWidth = 80;
} }
ui->CBSDecreaseBtn->setIcon(QIcon(":/resources/minus.png")); ui->CBSDecreaseBtn->setIcon(QIcon(":/resources/minus.png"));
ui->CBSDecreaseBtn->setFixedWidth(controlBtnFixedLength); ui->CBSDecreaseBtn->setFixedWidth(controlBtnFixedWidth);
ui->CBSIncreaseBtn->setIcon(QIcon(":/resources/plus.png")); ui->CBSIncreaseBtn->setIcon(QIcon(":/resources/plus.png"));
ui->CBSIncreaseBtn->setFixedWidth(controlBtnFixedLength); ui->CBSIncreaseBtn->setFixedWidth(controlBtnFixedWidth);
int idleButtonsWidth; int idleBtnsFixedWidth;
if(global::deviceID == "n306\n") { if(global::deviceID == "n705\n") {
idleButtonsWidth = 100; idleBtnsFixedWidth = 80;
} }
else { else {
idleButtonsWidth = 100; idleBtnsFixedWidth = 100;
} }
ui->idleSleepDecreaseBtn->setFixedWidth(idleButtonsWidth); ui->idleSleepDecreaseBtn->setFixedWidth(idleBtnsFixedWidth);
ui->idleSleepIncreaseBtn->setFixedWidth(idleButtonsWidth); ui->idleSleepIncreaseBtn->setFixedWidth(idleBtnsFixedWidth);
ui->idleSleepDecreaseMBtn->setFixedWidth(idleButtonsWidth); ui->idleSleepDecreaseMBtn->setFixedWidth(idleBtnsFixedWidth);
ui->idleSleepIncreaseMBtn->setFixedWidth(idleButtonsWidth); ui->idleSleepIncreaseMBtn->setFixedWidth(idleBtnsFixedWidth);
// Padding // Padding
ui->CBSDecreaseBtn->setStyleSheet("padding: 10px"); ui->CBSDecreaseBtn->setStyleSheet("padding: 10px; font-size: 10pt");
ui->CBSIncreaseBtn->setStyleSheet("padding: 10px"); ui->CBSIncreaseBtn->setStyleSheet("padding: 10px; font-size: 10pt");
ui->idleSleepDecreaseBtn->setStyleSheet("padding: 10px"); ui->idleSleepDecreaseBtn->setStyleSheet("padding: 10px; font-size: 10pt");
ui->idleSleepIncreaseBtn->setStyleSheet("padding: 10px"); ui->idleSleepIncreaseBtn->setStyleSheet("padding: 10px; font-size: 10pt");
ui->idleSleepDecreaseMBtn->setStyleSheet("padding: 10px"); ui->idleSleepDecreaseMBtn->setStyleSheet("padding: 10px; font-size: 10pt");
ui->idleSleepIncreaseMBtn->setStyleSheet("padding: 10px"); ui->idleSleepIncreaseMBtn->setStyleSheet("padding: 10px; font-size: 10pt");
// Stylesheet // Stylesheet
QFile stylesheetFile("/mnt/onboard/.adds/inkbox/eink.qss"); QFile stylesheetFile("/mnt/onboard/.adds/inkbox/eink.qss");

View file

@ -75,7 +75,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>680</width> <width>680</width>
<height>553</height> <height>545</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
@ -216,6 +216,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>+1s</string> <string>+1s</string>
</property> </property>
@ -229,6 +235,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>-1s</string> <string>-1s</string>
</property> </property>
@ -246,6 +258,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>+1m</string> <string>+1m</string>
</property> </property>
@ -259,6 +277,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text"> <property name="text">
<string>-1m</string> <string>-1m</string>
</property> </property>