Skip to content

Commit 9f56686

Browse files
committed
chore: Merge branch 'dev'
2 parents 974933d + cee2dc8 commit 9f56686

File tree

6 files changed

+469
-371
lines changed

6 files changed

+469
-371
lines changed

src/lock.cpp

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,36 @@ void Lock::applyThemeQuirks() {
9696
})");
9797

9898
ui->widget_2->setStyleSheet(R"(QWidget#widget_2 {
99-
border-radius: 5px;
100-
background-image: url(":/icons/texture.png");
101-
background-color: palette(shadow);
99+
border-top-left-radius: 4px;
100+
border-top-right-radius: 4px;
101+
background-image: url(":/icons/texture.png");
102+
background-color: palette(shadow);
102103
})");
103104

104105
ui->widget->setStyleSheet(R"(QWidget#widget{
105-
border-radius: 5px;
106+
border-top-left-radius: 4px;
107+
border-top-right-radius: 4px;
106108
background-image:url(":/icons/texture.png");
107109
background-color:palette(shadow);
108110
})");
109111

110112
ui->centerWidget->setStyleSheet(R"(QWidget#centerWidget {
111113
background-image: url(":/icons/wa_bg.png");
112114
})");
115+
116+
// little quirks
117+
QString border = "border-bottom-right-radius: 4px;"
118+
"border-bottom-left-radius: 4px;";
119+
QString lightBg = "background-color: rgb(37, 211, 102);";
120+
QString darkBg = "background-color: rgb(0, 117, 96);";
121+
if (QString::compare(settings.value("windowTheme", "light").toString(),
122+
"dark", Qt::CaseInsensitive) == 0) { // light
123+
ui->bottomLine->setStyleSheet(darkBg + border);
124+
ui->bottomLine_2->setStyleSheet(darkBg + border);
125+
} else { // dark
126+
ui->bottomLine->setStyleSheet(lightBg + border);
127+
ui->bottomLine_2->setStyleSheet(lightBg + border);
128+
}
113129
}
114130

115131
Lock::~Lock() { delete ui; }
@@ -132,10 +148,7 @@ void Lock::keyReleaseEvent(QKeyEvent *event) {
132148

133149
bool Lock::event(QEvent *e) { return QWidget::event(e); }
134150

135-
bool Lock::getIsLocked() const
136-
{
137-
return isLocked;
138-
}
151+
bool Lock::getIsLocked() const { return isLocked; }
139152

140153
void Lock::on_passcode1_textChanged(const QString &arg1) {
141154
if (arg1.contains(" ")) {

0 commit comments

Comments
 (0)