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

View file

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