Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Discover
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
Discover
Commits
309703c8
Commit
309703c8
authored
Dec 15, 2017
by
Aleix Pol Gonzalez
🐧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify and unify some pages not to have a header but a toolbar
parent
4b201f07
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
177 additions
and
172 deletions
+177
-172
discover/qml/ApplicationPage.qml
discover/qml/ApplicationPage.qml
+147
-149
discover/qml/InstalledPage.qml
discover/qml/InstalledPage.qml
+3
-3
discover/qml/SourcesPage.qml
discover/qml/SourcesPage.qml
+14
-8
discover/qml/UpdatesPage.qml
discover/qml/UpdatesPage.qml
+13
-12
No files found.
discover/qml/ApplicationPage.qml
View file @
309703c8
...
...
@@ -86,184 +86,182 @@ DiscoverPage {
}
}
ListView
{
headerPositioning
:
ListView
.
OverlayHeader
header
:
Kirigami.ItemViewHeader
{
maximumHeight
:
minimumHeight
header
:
QQC2.ToolBar
{
anchors
{
right
:
parent
.
right
left
:
parent
.
left
}
contentItem
:
RowLayout
{
spacing
:
Kirigami
.
Units
.
smallSpacing
contentItem
:
RowLayout
{
spacing
:
Kirigami
.
Units
.
smallSpacing
ToolButton
{
iconName
:
"
draw-arrow-back
"
tooltip
:
i18n
(
"
Back
"
)
enabled
:
appInfo
.
sClose
.
enabled
onClicked
:
appInfo
.
sClose
.
activated
()
}
Item
{
Layout.fillWidth
:
true
}
Kirigami.Icon
{
Layout.preferredHeight
:
Kirigami
.
Units
.
gridUnit
*
2
Layout.preferredWidth
:
Kirigami
.
Units
.
gridUnit
*
2
ToolButton
{
iconName
:
"
draw-arrow-back
"
tooltip
:
i18n
(
"
Back
"
)
enabled
:
appInfo
.
sClose
.
enabled
onClicked
:
appInfo
.
sClose
.
activated
()
}
Item
{
Layout.fillWidth
:
true
}
Kirigami.Icon
{
Layout.preferredHeight
:
Kirigami
.
Units
.
gridUnit
*
2
Layout.preferredWidth
:
Kirigami
.
Units
.
gridUnit
*
2
source
:
appInfo
.
application
.
icon
Layout.alignment
:
Qt
.
AlignVCenter
}
Kirigami.Heading
{
level
:
3
Layout.maximumWidth
:
parent
.
width
/
2
text
:
appInfo
.
application
.
name
maximumLineCount
:
1
elide
:
Text
.
ElideRight
horizontalAlignment
:
Text
.
AlignHCenter
}
Item
{
Layout.fillWidth
:
true
}
source
:
appInfo
.
application
.
icon
Layout.alignment
:
Qt
.
AlignVCenter
}
Kirigami.Heading
{
level
:
3
Layout.maximumWidth
:
parent
.
width
/
2
text
:
appInfo
.
application
.
name
maximumLineCount
:
1
elide
:
Text
.
ElideRight
horizontalAlignment
:
Text
.
AlignHCenter
}
Item
{
Layout.fillWidth
:
true
}
Binding
{
target
:
appInfo
.
actions
property
:
"
main
"
value
:
appbutton
.
action
}
Binding
{
target
:
appInfo
.
actions
property
:
"
main
"
value
:
appbutton
.
action
}
InstallApplicationButton
{
id
:
appbutton
application
:
appInfo
.
application
visible
:
applicationWindow
().
wideScreen
}
InstallApplicationButton
{
id
:
appbutton
application
:
appInfo
.
application
visible
:
applicationWindow
().
wideScreen
}
Button
{
visible
:
application
.
isInstalled
&&
application
.
canExecute
text
:
i18n
(
"
Launch
"
)
onClicked
:
application
.
invokeApplication
()
}
Button
{
visible
:
application
.
isInstalled
&&
application
.
canExecute
text
:
i18n
(
"
Launch
"
)
onClicked
:
application
.
invokeApplication
()
}
}
}
model
:
1
delegate
:
ColumnLayout
{
x
:
Kirigami
.
Units
.
gridUnit
y
:
Kirigami
.
Units
.
gridUnit
width
:
ListView
.
view
.
width
-
Kirigami
.
Units
.
gridUnit
*
2
spacing
:
0
ColumnLayout
{
x
:
Kirigami
.
Units
.
gridUnit
y
:
Kirigami
.
Units
.
gridUnit
width
:
ListView
.
view
.
width
-
Kirigami
.
Units
.
gridUnit
*
2
spacing
:
0
QQC2.Label
{
Layout.topMargin
:
Kirigami
.
Units
.
largeSpacing
Layout.fillWidth
:
true
text
:
appInfo
.
application
.
comment
wrapMode
:
Text
.
WordWrap
elide
:
Text
.
ElideRight
maximumLineCount
:
1
}
QQC2.Label
{
Layout.fillWidth
:
true
elide
:
Text
.
ElideRight
text
:
appInfo
.
application
.
categoryDisplay
color
:
Kirigami
.
Theme
.
linkColor
}
QQC2.Label
{
Layout.fillWidth
:
true
text
:
appInfo
.
application
.
comment
wrapMode
:
Text
.
WordWrap
elide
:
Text
.
ElideRight
maximumLineCount
:
1
}
QQC2.Label
{
Layout.fillWidth
:
true
elide
:
Text
.
ElideRight
text
:
appInfo
.
application
.
categoryDisplay
color
:
Kirigami
.
Theme
.
linkColor
}
Item
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
}
Item
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
}
QQC2.Label
{
readonly
property
string
version
:
appInfo
.
application
.
isInstalled
?
appInfo
.
application
.
installedVersion
:
appInfo
.
application
.
availableVersion
visible
:
version
.
length
>
0
text
:
version
?
i18n
(
"
Version: %1
"
,
version
)
:
""
}
QQC2.Label
{
text
:
i18n
(
"
Size: %1
"
,
appInfo
.
application
.
sizeDescription
)
}
RowLayout
{
QQC2.Label
{
readonly
property
string
version
:
appInfo
.
application
.
isInstalled
?
appInfo
.
application
.
installedVersion
:
appInfo
.
application
.
availableVersion
visible
:
version
.
length
>
0
text
:
version
?
i18n
(
"
Version: %1
"
,
version
)
:
""
text
:
i18n
(
"
Source:
"
)
}
QQC2.Label
{
text
:
i18n
(
"
Size: %1
"
,
appInfo
.
application
.
sizeDescription
)
LinkButton
{
enabled
:
alternativeResourcesView
.
count
>
1
text
:
appInfo
.
application
.
displayOrigin
onClicked
:
originsOverlay
.
open
()
}
RowLayout
{
QQC2.Label
{
text
:
i18n
(
"
Source:
"
)
}
LinkButton
{
enabled
:
alternativeResourcesView
.
count
>
1
text
:
appInfo
.
application
.
displayOrigin
onClicked
:
originsOverlay
.
open
()
}
}
RowLayout
{
QQC2.Label
{
text
:
i18n
(
"
License:
"
)
}
RowLayout
{
QQC2.Label
{
text
:
i18n
(
"
License:
"
)
}
LinkButton
{
text
:
appInfo
.
application
.
license
LinkButton
{
text
:
appInfo
.
application
.
license
// tooltip: i18n("See full license terms")
onClicked
:
Qt
.
openUrlExternally
(
"
https://spdx.org/licenses/
"
+
appInfo
.
application
.
license
+
"
.html#licenseText
"
)
}
onClicked
:
Qt
.
openUrlExternally
(
"
https://spdx.org/licenses/
"
+
appInfo
.
application
.
license
+
"
.html#licenseText
"
)
}
}
ApplicationScreenshots
{
Layout.topMargin
:
Kirigami
.
Units
.
largeSpacing
Layout.fillWidth
:
true
resource
:
appInfo
.
application
page
:
appInfo
}
ApplicationScreenshots
{
Layout.topMargin
:
Kirigami
.
Units
.
largeSpacing
Layout.fillWidth
:
true
resource
:
appInfo
.
application
page
:
appInfo
}
Kirigami.Heading
{
level
:
3
Layout.topMargin
:
Kirigami
.
Units
.
largeSpacing
text
:
i18n
(
"
Description
"
)
Layout.fillWidth
:
true
visible
:
appInfo
.
application
.
longDescription
.
length
>
0
}
QQC2.Label
{
Layout.fillWidth
:
true
horizontalAlignment
:
Text
.
AlignJustify
wrapMode
:
Text
.
WordWrap
text
:
appInfo
.
application
.
longDescription
+
originsOverlay
.
sentence
onLinkActivated
:
{
var
idx
=
parseInt
(
link
,
10
)
var
res
=
originsOverlay
.
model
.
resourceAt
(
idx
)
window
.
stack
.
pop
()
Navigation
.
openApplication
(
res
)
}
Kirigami.Heading
{
level
:
3
Layout.topMargin
:
Kirigami
.
Units
.
largeSpacing
text
:
i18n
(
"
Description
"
)
Layout.fillWidth
:
true
visible
:
appInfo
.
application
.
longDescription
.
length
>
0
}
QQC2.Label
{
Layout.fillWidth
:
true
horizontalAlignment
:
Text
.
AlignJustify
wrapMode
:
Text
.
WordWrap
text
:
appInfo
.
application
.
longDescription
+
originsOverlay
.
sentence
onLinkActivated
:
{
var
idx
=
parseInt
(
link
,
10
)
var
res
=
originsOverlay
.
model
.
resourceAt
(
idx
)
window
.
stack
.
pop
()
Navigation
.
openApplication
(
res
)
}
}
RowLayout
{
visible
:
button
.
text
.
length
>
0
QQC2.Label
{
text
:
i18n
(
"
Homepage:
"
)
}
LinkButton
{
id
:
button
text
:
application
.
homepage
onClicked
:
Qt
.
openUrlExternally
(
application
.
homepage
)
}
RowLayout
{
visible
:
button
.
text
.
length
>
0
QQC2.Label
{
text
:
i18n
(
"
Homepage:
"
)
}
LinkButton
{
id
:
addonsButton
text
:
i18n
(
"
Addons
"
)
visible
:
addonsView
.
containsAddons
onClicked
:
addonsView
.
sheetOpen
=
true
id
:
button
text
:
application
.
homepage
onClicked
:
Qt
.
openUrlExternally
(
application
.
homepage
)
}
}
LinkButton
{
text
:
i18n
(
"
Review
"
)
onClicked
:
reviewsSheet
.
openReviewDialog
()
visible
:
!
commentsButton
.
visible
&&
reviewsModel
.
backend
.
isResourceSupported
(
appInfo
.
application
)
}
LinkButton
{
id
:
commentsButton
readonly
property
QtObject
rating
:
appInfo
.
application
.
rating
visible
:
rating
&&
rating
.
ratingCount
>
0
&&
reviewsModel
.
count
text
:
i18n
(
"
Show reviews (%1)...
"
,
rating
?
reviewsModel
.
count
:
0
)
LinkButton
{
id
:
addonsButton
text
:
i18n
(
"
Addons
"
)
visible
:
addonsView
.
containsAddons
onClicked
:
addonsView
.
sheetOpen
=
true
}
onClicked
:
{
reviewsSheet
.
open
()
}
}
LinkButton
{
text
:
i18n
(
"
Review
"
)
onClicked
:
reviewsSheet
.
openReviewDialog
()
visible
:
!
commentsButton
.
visible
&&
reviewsModel
.
backend
.
isResourceSupported
(
appInfo
.
application
)
}
LinkButton
{
id
:
commentsButton
readonly
property
QtObject
rating
:
appInfo
.
application
.
rating
visible
:
rating
&&
rating
.
ratingCount
>
0
&&
reviewsModel
.
count
text
:
i18n
(
"
Show reviews (%1)...
"
,
rating
?
reviewsModel
.
count
:
0
)
Item
{
height
:
addonsButton
.
height
width
:
5
onClicked
:
{
reviewsSheet
.
open
()
}
}
Item
{
height
:
addonsButton
.
height
width
:
5
}
}
readonly
property
var
addons
:
AddonsView
{
...
...
discover/qml/InstalledPage.qml
View file @
309703c8
...
...
@@ -3,7 +3,7 @@ import QtQuick.Controls 1.1
import
QtQuick
.
Layouts
1.1
import
org
.
kde
.
discover
2.0
import
org
.
kde
.
discover
.
app
1.0
import
org
.
kde
.
kirigami
2.
0
as
Kirigami
import
org
.
kde
.
kirigami
2.
1
as
Kirigami
ApplicationsListPage
{
id
:
page
...
...
@@ -16,7 +16,7 @@ ApplicationsListPage {
compact
:
true
canNavigate
:
false
listHeader
:
Page
Header
{
backgroundImage.source
:
"
qrc:/banners/installedcrop.jpg
"
listHeader
:
Kirigami.ItemView
Header
{
maximumHeight
:
minimumHeight
}
}
discover/qml/SourcesPage.qml
View file @
309703c8
import
QtQuick
2.4
import
QtQuick
.
Controls
1.1
import
QtQuick
.
Controls
2.1
as
QQC2
import
QtQuick
.
Layouts
1.1
import
org
.
kde
.
discover
2.0
import
org
.
kde
.
discover
.
app
1.0
import
org
.
kde
.
kquickcontrolsaddons
2.0
import
org
.
kde
.
kirigami
2.
0
as
Kirigami
import
org
.
kde
.
kirigami
2.
1
as
Kirigami
import
"
navigation.js
"
as
Navigation
DiscoverPage
{
...
...
@@ -73,14 +74,22 @@ DiscoverPage {
}
headerPositioning
:
ListView
.
OverlayHeader
header
:
PageHeader
{
backgroundImage.source
:
"
qrc:/banners/syssettingscrop.jpg
"
extra
:
RowLayout
{
header
:
QQC2.ToolBar
{
anchors
{
right
:
parent
.
right
left
:
parent
.
left
}
contentItem
:
RowLayout
{
anchors
{
topMargin
:
Kirigami
.
Units
.
smallSpacing
bottomMargin
:
Kirigami
.
Units
.
smallSpacing
}
Item
{
Layout.fillWidth
:
true
}
ToolButton
{
text
:
i18n
(
"
Application Sources
"
)
tooltip
:
i18n
(
"
Allows to choose the source that will be used for browsing applications
"
)
...
...
@@ -167,9 +176,6 @@ DiscoverPage {
MenuItem
{
action
:
ActionBridge
{
action
:
app
.
action
(
"
help_report_bug
"
)
}
}
}
}
Item
{
Layout.fillWidth
:
true
}
}
}
...
...
@@ -213,7 +219,7 @@ DiscoverPage {
model
.
checked
=
checkedState
}
}
Label
{
QQC2.
Label
{
text
:
model
.
display
+
"
- <i>
"
+
model
.
toolTip
+
"
</i>
"
elide
:
Text
.
ElideRight
Layout.fillWidth
:
true
...
...
discover/qml/UpdatesPage.qml
View file @
309703c8
...
...
@@ -7,7 +7,7 @@ import org.kde.discover.app 1.0
import
org
.
kde
.
kquickcontrolsaddons
2.0
import
org
.
kde
.
kcoreaddons
1.0
import
"
navigation.js
"
as
Navigation
import
org
.
kde
.
kirigami
2.
0
as
Kirigami
import
org
.
kde
.
kirigami
2.
1
as
Kirigami
DiscoverPage
{
...
...
@@ -67,17 +67,14 @@ DiscoverPage
}
headerPositioning
:
ListView
.
OverlayHeader
header
:
PageHeader
{
backgroundImage.source
:
"
qrc:/banners/updatescrop.jpg
"
extra
:
RowLayout
{
id
:
updateControls
anchors.topMargin
:
Kirigami
.
Units
.
smallSpacing
Layout.fillWidth
:
true
visible
:
(
updateModel
.
totalUpdatesCount
>
0
&&
resourcesUpdatesModel
.
isProgressing
)
||
updateModel
.
hasUpdates
header
:
QQC2.ToolBar
{
anchors
{
right
:
parent
.
right
left
:
parent
.
left
}
visible
:
(
updateModel
.
totalUpdatesCount
>
0
&&
resourcesUpdatesModel
.
isProgressing
)
||
updateModel
.
hasUpdates
contentItem
:
RowLayout
{
LabelBackground
{
Layout.leftMargin
:
Kirigami
.
Units
.
gridUnit
text
:
updateModel
.
toUpdateCount
+
"
(
"
+
updateModel
.
updateSize
+
"
)
"
...
...
@@ -94,7 +91,11 @@ DiscoverPage
text
:
i18n
(
"
updates not selected
"
)
visible
:
unselectedItem
.
visible
}
Item
{
Layout.fillWidth
:
true
}
Item
{
Layout.fillWidth
:
true
}
Button
{
Layout.minimumWidth
:
Kirigami
.
Units
.
gridUnit
*
6
Layout.rightMargin
:
Kirigami
.
Units
.
gridUnit
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment