mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 07:37:21 -08:00
GUI user applications: small fixes
This commit is contained in:
parent
0cf2bca0d3
commit
c5ec3f3560
4 changed files with 35 additions and 17 deletions
9
apps.cpp
9
apps.cpp
|
@ -317,7 +317,7 @@ void apps::showUserApps(bool showDisabledJson)
|
|||
emit clearAppsLayout();
|
||||
|
||||
if(jsonParseSuccess == true) {
|
||||
QString function = __func__; log(function + ": JSON is valid", className);
|
||||
QString function = __func__; log(function + ": Main user applications' JSON is valid", className);
|
||||
QJsonArray jsonListArray = jsonDocument.object()["list"].toArray();
|
||||
for(QJsonValueRef refJsonObject: jsonListArray) {
|
||||
QJsonObject appInfo = refJsonObject.toObject();
|
||||
|
@ -335,7 +335,8 @@ void apps::showUserApps(bool showDisabledJson)
|
|||
}
|
||||
}
|
||||
else {
|
||||
QString function = __func__; log(function + ": JSON is invalid", className);
|
||||
QString function = __func__; log(function + ": Main user applications' JSON file is invalid", className);
|
||||
QTimer::singleShot(500, this, SLOT(showFailedToParseMainUserAppsJsonFile()));
|
||||
|
||||
ui->editUserAppsBtn->deleteLater();
|
||||
ui->label_6->deleteLater();
|
||||
|
@ -350,3 +351,7 @@ void apps::updateJsonFileSlot(QJsonDocument jsonDocumentFunc)
|
|||
jsonDocument = jsonDocumentFunc;
|
||||
emit updateJsonFileSignal(jsonDocument);
|
||||
}
|
||||
|
||||
void apps::showFailedToParseMainUserAppsJsonFile() {
|
||||
emit showToast("Failed to parse 'apps.json'");
|
||||
}
|
||||
|
|
1
apps.h
1
apps.h
|
@ -39,6 +39,7 @@ private slots:
|
|||
bool parseJson();
|
||||
void showUserApps(bool showDisabledJson);
|
||||
void updateJsonFileSlot(QJsonDocument jsonDocument);
|
||||
void showFailedToParseMainUserAppsJsonFile();
|
||||
|
||||
private:
|
||||
Ui::apps *ui;
|
||||
|
|
|
@ -14,6 +14,8 @@ userapps::userapps(QWidget *parent) :
|
|||
ui->launchBtn->setProperty("type", "borderless");
|
||||
|
||||
ui->iconBtn->setProperty("type", "borderless");
|
||||
ui->iconBtn->setStyleSheet("QPushButton[type='borderless']:pressed { background: white; color: white; border: none; }");
|
||||
|
||||
ui->infoBtn->setProperty("type", "borderless");
|
||||
ui->statusBtn->setProperty("type", "borderless");
|
||||
ui->statusBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px");
|
||||
|
|
40
userapps.ui
40
userapps.ui
|
@ -138,23 +138,33 @@
|
|||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="iconBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="iconBtn">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
|
|
Loading…
Reference in a new issue