mirror of
https://github.com/Quill-OS/quill.git
synced 2024-10-31 21:33:22 -07:00
Lockscreen fixes
This commit is contained in:
parent
ddf9be2edd
commit
20b6f7231a
4 changed files with 172 additions and 86 deletions
|
@ -805,6 +805,10 @@ void settings::on_enableLockscreenCheckBox_toggled(bool checked)
|
||||||
if(checked == true) {
|
if(checked == true) {
|
||||||
logEnabled(settingString, className);
|
logEnabled(settingString, className);
|
||||||
writeFile(".config/12-lockscreen/config", "true");
|
writeFile(".config/12-lockscreen/config", "true");
|
||||||
|
// Launching passcode setup wizard if none seems to be set at the moment
|
||||||
|
if(!(QFile::exists(".config/12-lockscreen/passcode") && QFile::exists(".config/12-lockscreen/salt"))) {
|
||||||
|
ui->setPasscodeBtn->click();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logDisabled(settingString, className);
|
logDisabled(settingString, className);
|
||||||
|
|
|
@ -10,13 +10,33 @@ egg::egg(QWidget *parent) :
|
||||||
ui->previousBtn->setProperty("type", "borderless");
|
ui->previousBtn->setProperty("type", "borderless");
|
||||||
ui->nextBtn->setProperty("type", "borderless");
|
ui->nextBtn->setProperty("type", "borderless");
|
||||||
ui->quitBtn->setProperty("type", "borderless");
|
ui->quitBtn->setProperty("type", "borderless");
|
||||||
ui->previousBtn->setFont(QFont("u001"));
|
ui->infoBtn->setProperty("type", "borderless");
|
||||||
ui->nextBtn->setFont(QFont("u001"));
|
ui->previousBtn->setText("");
|
||||||
ui->quitBtn->setFont(QFont("u001"));
|
ui->previousBtn->setIcon(QIcon(":/resources/arrow-left.png"));
|
||||||
|
ui->nextBtn->setText("");
|
||||||
|
ui->nextBtn->setIcon(QIcon(":/resources/arrow-right.png"));
|
||||||
|
ui->quitBtn->setText("");
|
||||||
|
ui->quitBtn->setIcon(QIcon(":/resources/close.png"));
|
||||||
|
ui->infoBtn->setText("");
|
||||||
|
ui->infoBtn->setIcon(QIcon(":/resources/info.png"));
|
||||||
ui->titleLabel->setFont(QFont("Inter"));
|
ui->titleLabel->setFont(QFont("Inter"));
|
||||||
ui->contributorName->setFont(QFont("Inter"));
|
ui->contributorName->setFont(QFont("Inter"));
|
||||||
|
if(global::deviceID == "n873\n") {
|
||||||
|
ui->nextBtn->setStyleSheet("padding: 13.5px");
|
||||||
|
ui->previousBtn->setStyleSheet("padding: 13.5px");
|
||||||
|
}
|
||||||
|
else if(global::deviceID == "n437\n") {
|
||||||
|
ui->nextBtn->setStyleSheet("padding: 12.5px");
|
||||||
|
ui->previousBtn->setStyleSheet("padding: 12.5px");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ui->nextBtn->setStyleSheet("padding: 10px");
|
||||||
|
ui->previousBtn->setStyleSheet("padding: 10px");
|
||||||
|
}
|
||||||
|
|
||||||
graphicsScene = new QGraphicsScene(this);
|
graphicsScene = new QGraphicsScene(this);
|
||||||
|
// Set first contributor name
|
||||||
|
ui->contributorName->setText("<div align='center'><b>Szybet<br>(Contributor)</b></div>");
|
||||||
QTimer::singleShot(500, this, SLOT(changeIndexSlot()));
|
QTimer::singleShot(500, this, SLOT(changeIndexSlot()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +55,23 @@ void egg::changeIndex(int index) {
|
||||||
tux-linux (3)
|
tux-linux (3)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Contributor name
|
||||||
|
QString name = "<div align='center'><b>";
|
||||||
|
if(index == 0) {
|
||||||
|
name.append("Szybet<br>(Contributor)");
|
||||||
|
}
|
||||||
|
else if(index == 1) {
|
||||||
|
name.append("NiLuJe<br>(Contributor)");
|
||||||
|
}
|
||||||
|
else if(index == 2) {
|
||||||
|
name.append("akemnade<br>(Contributor)");
|
||||||
|
}
|
||||||
|
else if(index == 3) {
|
||||||
|
name.append("tux-linux<br>(Maintainer)");
|
||||||
|
}
|
||||||
|
name.append("</b></div>");
|
||||||
|
ui->contributorName->setText(name);
|
||||||
|
|
||||||
ui->graphicsView->items().clear();
|
ui->graphicsView->items().clear();
|
||||||
graphicsScene->clear();
|
graphicsScene->clear();
|
||||||
|
|
||||||
|
@ -45,23 +82,6 @@ void egg::changeIndex(int index) {
|
||||||
QRectF rect = graphicsScene->itemsBoundingRect();
|
QRectF rect = graphicsScene->itemsBoundingRect();
|
||||||
graphicsScene->setSceneRect(rect);
|
graphicsScene->setSceneRect(rect);
|
||||||
ui->graphicsView->fitInView(graphicsScene->sceneRect(), Qt::KeepAspectRatio);
|
ui->graphicsView->fitInView(graphicsScene->sceneRect(), Qt::KeepAspectRatio);
|
||||||
|
|
||||||
// Contributor name
|
|
||||||
QString name = "<div align='center'><b>";
|
|
||||||
if(index == 0) {
|
|
||||||
name.append("Szybet");
|
|
||||||
}
|
|
||||||
else if(index == 1) {
|
|
||||||
name.append("NiLuJe");
|
|
||||||
}
|
|
||||||
else if(index == 2) {
|
|
||||||
name.append("akemnade");
|
|
||||||
}
|
|
||||||
else if(index == 3) {
|
|
||||||
name.append("tux-linux (Maintainer)");
|
|
||||||
}
|
|
||||||
name.append("</b></div>");
|
|
||||||
ui->contributorName->setText(name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void egg::changeIndexSlot() {
|
void egg::changeIndexSlot() {
|
||||||
|
@ -75,7 +95,7 @@ void egg::on_previousBtn_clicked()
|
||||||
changeIndex(index);
|
changeIndex(index);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QMessageBox::critical(this, "Critical", "Index out of range");
|
QMessageBox::critical(this, "Critical", "<font face='u001'>Index out of range.</font>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +106,7 @@ void egg::on_nextBtn_clicked()
|
||||||
changeIndex(index);
|
changeIndex(index);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QMessageBox::critical(this, "Critical", "Index out of range");
|
QMessageBox::critical(this, "Critical", "<font face='u001'>Index out of range.</font>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,3 +114,8 @@ void egg::on_quitBtn_clicked()
|
||||||
{
|
{
|
||||||
this->close();
|
this->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void egg::on_infoBtn_clicked()
|
||||||
|
{
|
||||||
|
QMessageBox::information(this, "Information", "<font face='u001'>Congratulations, you've found the easter egg!</font>");
|
||||||
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ private slots:
|
||||||
void on_nextBtn_clicked();
|
void on_nextBtn_clicked();
|
||||||
void changeIndexSlot();
|
void changeIndexSlot();
|
||||||
void on_quitBtn_clicked();
|
void on_quitBtn_clicked();
|
||||||
|
void on_infoBtn_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::egg *ui;
|
Ui::egg *ui;
|
||||||
|
|
|
@ -15,71 +15,80 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="1" column="0">
|
<property name="rightMargin">
|
||||||
<widget class="QGraphicsView" name="graphicsView"/>
|
<number>0</number>
|
||||||
</item>
|
</property>
|
||||||
<item row="3" column="0">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="4">
|
|
||||||
<widget class="QPushButton" name="nextBtn">
|
|
||||||
<property name="text">
|
|
||||||
<string>Next</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QLabel" name="contributorName">
|
|
||||||
<property name="text">
|
|
||||||
<string>Contributor</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignLeading|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QPushButton" name="previousBtn">
|
|
||||||
<property name="text">
|
|
||||||
<string>Previous</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="Line" name="line_2">
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="Line" name="line_3">
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="titleLabel">
|
<widget class="QPushButton" name="quitBtn">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>InkBox OS project - People</b></string>
|
<string>Quit</string>
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignLeading|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="titleLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><p><span style=" font-weight:700;">InkBox OS project – People</span></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="4">
|
||||||
|
<widget class="QPushButton" name="infoBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Info</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="Line" name="line_5">
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Plain</enum>
|
||||||
|
</property>
|
||||||
|
<property name="lineWidth">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QGraphicsView" name="graphicsView"/>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -87,17 +96,64 @@
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Plain</enum>
|
<enum>QFrame::Plain</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="lineWidth">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="quitBtn">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="text">
|
<property name="bottomMargin">
|
||||||
<string>Quit</string>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<item row="1" column="4">
|
||||||
|
<widget class="QPushButton" name="nextBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Next</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<widget class="Line" name="line_3">
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Plain</enum>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="Line" name="line_2">
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Plain</enum>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QPushButton" name="previousBtn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Previous</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QLabel" name="contributorName">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
Loading…
Reference in a new issue