Apply 17 suggestion(s) to 7 file(s)

This commit is contained in:
Bart De Vries 2021-04-27 07:31:26 +00:00
parent f2c6c3fae2
commit c37ee7c7dd
7 changed files with 15 additions and 23 deletions

View File

@ -42,17 +42,17 @@ Kirigami.Page {
contentHeight: tabBarHeight contentHeight: tabBarHeight
Controls.TabButton { Controls.TabButton {
width: parent.parent.width/parent.count width: parent.parent.width / parent.count
height: tabBarHeight height: tabBarHeight
text: i18n("In Progress") text: i18n("In Progress")
} }
Controls.TabButton { Controls.TabButton {
width: parent.parent.width/parent.count width: parent.parent.width / parent.count
height: tabBarHeight height: tabBarHeight
text: i18n("Completed") text: i18n("Completed")
} }
Controls.TabButton { Controls.TabButton {
width: parent.parent.width/parent.count width: parent.parent.width / parent.count
height: tabBarHeight height: tabBarHeight
text: i18n("Errors") text: i18n("Errors")
} }

View File

@ -26,7 +26,7 @@ Kirigami.ScrollablePage {
Connections { Connections {
target: entry target: entry
function onQueueStatusChanged() { function onQueueStatusChanged() {
if (entry.queueStatus === false) { if (!entry.queueStatus) {
// this entry has just been removed from the queue // this entry has just been removed from the queue
if (pageStack.depth > 1) { if (pageStack.depth > 1) {
if (pageStack.get(0).lastEntry) { if (pageStack.get(0).lastEntry) {
@ -52,6 +52,7 @@ Kirigami.ScrollablePage {
Controls.Label { Controls.Label {
Layout.margins: Kirigami.Units.gridUnit Layout.margins: Kirigami.Units.gridUnit
id: text id: text
Layout.margins: Kirigami.Units.gridUnit
text: page.entry.content text: page.entry.content
baseUrl: page.entry.baseUrl baseUrl: page.entry.baseUrl
textFormat: Text.RichText textFormat: Text.RichText
@ -123,21 +124,13 @@ Kirigami.ScrollablePage {
Kirigami.Action { Kirigami.Action {
text: entry.read ? i18n("Unmark as Played") : i18n("Mark as Played") text: entry.read ? i18n("Unmark as Played") : i18n("Mark as Played")
onTriggered: { onTriggered: {
if(entry.read) { entry.read = !entry.read
entry.read = false
} else {
entry.read = true
}
} }
}, },
Kirigami.Action { Kirigami.Action {
text: entry.new ? i18n("Unmark as New") : i18n("Mark as New") text: entry.new ? i18n("Unmark as New") : i18n("Mark as New")
onTriggered: { onTriggered: {
if(entry.new) { entry.new = !entry.new
entry.new = false
} else {
entry.new = true
}
} }
} }
] ]

View File

@ -72,6 +72,7 @@ Kirigami.ScrollablePage {
ListView { ListView {
anchors.fill: parent anchors.fill: parent
id: errorList id: errorList
anchors.fill: parent
visible: count !== 0 visible: count !== 0
model: ErrorLogModel model: ErrorLogModel
@ -83,7 +84,7 @@ Kirigami.ScrollablePage {
actions.main: Kirigami.Action { actions.main: Kirigami.Action {
text: i18n("Clear all errors") text: i18n("Clear all errors")
iconName: "edit-clear-all" iconName: "edit-clear-all"
visible: !(errorList.count === 0) visible: errorList.count > 0
onTriggered: ErrorLogModel.clearAll() onTriggered: ErrorLogModel.clearAll()
} }
} }

View File

@ -22,7 +22,7 @@ Item {
Image { Image {
id: img id: img
asynchronous: true asynchronous: true
source: feed.image === "" ? "logo.png" : "file://"+Fetcher.image(feed.image) source: feed.image === "" ? "logo.png" : "file://" + Fetcher.image(feed.image)
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
x: cardMargin x: cardMargin
y: cardMargin y: cardMargin
@ -45,8 +45,8 @@ Item {
visible: feed.unreadEntryCount > 0 visible: feed.unreadEntryCount > 0
anchors.top: img.top anchors.top: img.top
anchors.right: img.right anchors.right: img.right
width: img.width/5 width: img.width / 5
height: img.height/5 height: img.height / 5
color: Kirigami.Theme.highlightColor color: Kirigami.Theme.highlightColor
} }

View File

@ -73,7 +73,7 @@ Kirigami.ScrollablePage {
visible: count !== 0 visible: count !== 0
anchors.fill: parent anchors.fill: parent
property int cardSize: width/3 - cardMargin //Kirigami.Units.gridUnit * 10 property int cardSize: width / 3 - cardMargin //Kirigami.Units.gridUnit * 10
property int cardMargin: Kirigami.Units.smallSpacing property int cardMargin: Kirigami.Units.smallSpacing
cellWidth: cardSize + cardMargin cellWidth: cardSize + cardMargin

View File

@ -16,9 +16,9 @@ import org.kde.alligator 1.0
Flickable { Flickable {
id: footerBar id: footerBar
property bool portrait: (contentZone.height/contentZone.width) > 0.7 property bool portrait: (contentZone.height / contentZone.width) > 0.7
property bool isMaximized: contentY == contentHeight / 2 property bool isMaximized: contentY === contentHeight / 2
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds

View File

@ -4,7 +4,6 @@
SPDX-License-Identifier: GPL-2.0-or-later SPDX-License-Identifier: GPL-2.0-or-later
*/ */
// Includes relevant modules used by the QML
import QtQuick 2.14 import QtQuick 2.14
import QtQuick.Controls 2.14 as Controls import QtQuick.Controls 2.14 as Controls
import QtQuick.Layouts 1.14 import QtQuick.Layouts 1.14
@ -13,7 +12,6 @@ import QtMultimedia 5.15
import QtGraphicalEffects 1.15 import QtGraphicalEffects 1.15
import org.kde.alligator 1.0 import org.kde.alligator 1.0
Kirigami.SwipeListItem { Kirigami.SwipeListItem {
id: listItem id: listItem
alwaysVisibleActions: true alwaysVisibleActions: true