aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar keshavbhatt <keshavnrj@gmail.com>2021-04-05 23:51:35 +0530
committerLibravatar keshavbhatt <keshavnrj@gmail.com>2021-04-05 23:51:35 +0530
commitee687f769175b39b611424d5a7bdc11a93b3ba65 (patch)
tree05fc42a6c7ca24e715962fac7936e1a63023d95c
parentdd32d18a16d2164b9a5f2cb750019a4714375a6a (diff)
downloadwhatsie-ee687f769175b39b611424d5a7bdc11a93b3ba65.tar.gz
whatsie-ee687f769175b39b611424d5a7bdc11a93b3ba65.zip
updated lock class
-rw-r--r--src/lock.cpp23
-rw-r--r--src/lock.h1
-rw-r--r--src/lock.ui39
3 files changed, 23 insertions, 40 deletions
diff --git a/src/lock.cpp b/src/lock.cpp
index 3a43a91..b04ee25 100644
--- a/src/lock.cpp
+++ b/src/lock.cpp
@@ -28,16 +28,33 @@ Lock::Lock(QWidget *parent) :
lock_app();
}
checkCaps();
- QString capsStyle = QString("background-color: rgba(0,170,0,20);"
+ QString capsStyle = QString("background-color: palette(window);"
"padding:4px;"
- "border:1px solid rgba(78, 154, 6,50);"
- "border-radius: 2px;");
+ "border:0px solid palette(highlight);"
+ "border-radius: 2px;"
+ "color:palette(window-text);");
ui->caps1->setStyleSheet(capsStyle);
ui->caps2->setStyleSheet(capsStyle);
ui->signup_warning->setStyleSheet(capsStyle);
ui->wrong->setStyleSheet(capsStyle);
}
+void Lock::applyThemeQuirks(){
+ //little quirks
+
+ ui->label_4->setStyleSheet("color:#c2c5d1;padding: 0px 8px 0px 8px;background:transparent;");
+ ui->label_3->setStyleSheet("color:#c2c5d1;padding: 0px 8px 0px 8px;background:transparent;");
+
+ ui->widget_2->setStyleSheet("QWidget#widget{\nborder-radius: 5px;\nbackground-image:url(:/icons/texture.png);\nbackground-color:palette(shadow);\n}");
+ ui->widget->setStyleSheet("QWidget#widget{\nborder-radius: 5px;\nbackground-image:url(:/icons/texture.png);\nbackground-color:palette(shadow);\n}");
+ if(settings.value("windowTheme","light").toString() == "dark")
+ {
+
+ }else{
+
+ }
+}
+
Lock::~Lock()
{
delete ui;
diff --git a/src/lock.h b/src/lock.h
index 8120c20..60c29f7 100644
--- a/src/lock.h
+++ b/src/lock.h
@@ -36,6 +36,7 @@ private slots:
public slots:
void lock_app();
+ void applyThemeQuirks();
signals:
void passwordSet();
void passwordNotSet();
diff --git a/src/lock.ui b/src/lock.ui
index 1746704..21ac705 100644
--- a/src/lock.ui
+++ b/src/lock.ui
@@ -83,11 +83,7 @@
<item>
<widget class="QWidget" name="widget_2" native="true">
<property name="styleSheet">
- <string notr="true">QWidget#widget_2{
-background-color: rgb(46, 52, 54);
-border-radius: 5px;
-background-image:url(:/icons/texture.png)
-}</string>
+ <string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
@@ -168,20 +164,11 @@ background-image:url(:/icons/texture.png)
</item>
<item>
<widget class="QLabel" name="label_3">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>24</height>
- </size>
- </property>
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
- <property name="styleSheet">
- <string notr="true">background-color:transparent;</string>
- </property>
<property name="text">
<string>Set application lock passcode</string>
</property>
@@ -201,9 +188,6 @@ background-image:url(:/icons/texture.png)
<height>30</height>
</size>
</property>
- <property name="styleSheet">
- <string notr="true">background-color:transparent;</string>
- </property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
@@ -223,9 +207,6 @@ background-image:url(:/icons/texture.png)
<height>30</height>
</size>
</property>
- <property name="styleSheet">
- <string notr="true">background-color:transparent;</string>
- </property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
@@ -404,11 +385,7 @@ background-image:url(:/icons/texture.png)
<item>
<widget class="QWidget" name="widget" native="true">
<property name="styleSheet">
- <string notr="true">QWidget#widget{
-background-color: rgb(46, 52, 54);
-border-radius: 5px;
-background-image:url(:/icons/texture.png)
-}</string>
+ <string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
@@ -550,20 +527,11 @@ background-image:url(:/icons/texture.png)
</item>
<item>
<widget class="QLabel" name="label_4">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>24</height>
- </size>
- </property>
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
- <property name="styleSheet">
- <string notr="true">background-color:transparent;</string>
- </property>
<property name="text">
<string>Enter your passcode to get access to app</string>
</property>
@@ -583,9 +551,6 @@ background-image:url(:/icons/texture.png)
<height>30</height>
</size>
</property>
- <property name="styleSheet">
- <string notr="true">background-color:transparent;</string>
- </property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>