Merge branch 'master' into sebas/kplugins
This commit is contained in:
commit
06925637a7
@ -57,12 +57,12 @@ find_package(kdeqt5staging REQUIRED NO_MODULE)
|
|||||||
# Load CMake, Compiler and InstallDirs settings from KF5 and the following are already somewhat "done" tier1/tier2 libs from kdelibs:
|
# Load CMake, Compiler and InstallDirs settings from KF5 and the following are already somewhat "done" tier1/tier2 libs from kdelibs:
|
||||||
find_package(KF5 MODULE REQUIRED COMPONENTS CMake Compiler InstallDirs
|
find_package(KF5 MODULE REQUIRED COMPONENTS CMake Compiler InstallDirs
|
||||||
KIdleTime ItemModels KWidgetsAddons KWindowSystem KCodecs KArchive KCoreAddons Solid ThreadWeaver
|
KIdleTime ItemModels KWidgetsAddons KWindowSystem KCodecs KArchive KCoreAddons Solid ThreadWeaver
|
||||||
KConfig KAuth kjs KWallet KDBusAddons
|
KConfig KAuth KJS KWallet KDBusAddons
|
||||||
KI18n KGuiAddons KService KWidgets ItemViews KNotifications KIconThemes KCompletion KJobWidgets KConfigWidgets Sonnet KTextWidgets XmlGui KCrash)
|
KI18n KGuiAddons KService KWidgets ItemViews KNotifications KIconThemes KCompletion KJobWidgets KConfigWidgets Sonnet KTextWidgets XmlGui KCrash)
|
||||||
#find_package(KF5Transitional REQUIRED)
|
#find_package(KF5Transitional REQUIRED)
|
||||||
|
|
||||||
# those are not "done" yet:
|
# those are not "done" yet:
|
||||||
find_package(Kio REQUIRED NO_MODULE)
|
find_package(KIO REQUIRED NO_MODULE)
|
||||||
find_package(kdeclarative REQUIRED NO_MODULE)
|
find_package(kdeclarative REQUIRED NO_MODULE)
|
||||||
|
|
||||||
# Needed for some includes from KDE/ (KMimeType, etc.)
|
# Needed for some includes from KDE/ (KMimeType, etc.)
|
||||||
|
@ -151,7 +151,7 @@ function initPage(page, properties) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
container.page = page;
|
container.page = page;
|
||||||
if (page.parent == null) {
|
if (page.parent == null || page.parent == container.pageParent) {
|
||||||
container.owner = container;
|
container.owner = container;
|
||||||
} else {
|
} else {
|
||||||
container.owner = page.parent;
|
container.owner = page.parent;
|
||||||
|
@ -125,7 +125,7 @@ Item {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollAnimation.to = Math.max(0, Math.min(Math.max(0, columnWidth * level - columnWidth), columnWidth*depth- mainFlickable.width))
|
scrollAnimation.to = Math.max(0, Math.min(Math.max(0, columnWidth * level - columnWidth), mainFlickable.contentWidth - mainFlickable.width))
|
||||||
scrollAnimation.running = true
|
scrollAnimation.running = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,7 +209,8 @@ Item {
|
|||||||
Row {
|
Row {
|
||||||
id: root
|
id: root
|
||||||
spacing: -100
|
spacing: -100
|
||||||
width: childrenRect.width - 100
|
width: Math.max((depth-1+children[children.length-1].takenColumns) * columnWidth, childrenRect.width - 100)
|
||||||
|
|
||||||
height: parent.height
|
height: parent.height
|
||||||
Behavior on width {
|
Behavior on width {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
@ -291,6 +292,9 @@ Item {
|
|||||||
// State to be set after previous state change animation has finished
|
// State to be set after previous state change animation has finished
|
||||||
property string pendingState: "none"
|
property string pendingState: "none"
|
||||||
|
|
||||||
|
//how many columns take the page?
|
||||||
|
property alias takenColumns: actualContainer.takenColumns
|
||||||
|
|
||||||
// Ensures that transition finish actions are executed
|
// Ensures that transition finish actions are executed
|
||||||
// in case the object is destroyed before reaching the
|
// in case the object is destroyed before reaching the
|
||||||
// end state of an ongoing transition
|
// end state of an ongoing transition
|
||||||
@ -308,7 +312,10 @@ Item {
|
|||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: 100
|
rightMargin: 100
|
||||||
}
|
}
|
||||||
width: (container.pageDepth >= actualRoot.depth ? Math.min(actualRoot.width, Math.max(1, Math.round(page.implicitWidth/columnWidth))*columnWidth) : columnWidth)
|
|
||||||
|
property int takenColumns: Math.max(1, Math.round(container.page ? container.page.implicitWidth/columnWidth : 1));
|
||||||
|
|
||||||
|
width: (container.pageDepth >= actualRoot.depth ? Math.min(actualRoot.width, takenColumns*columnWidth) : columnWidth)
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
@ -368,6 +375,10 @@ Item {
|
|||||||
// Performs a push exit transition.
|
// Performs a push exit transition.
|
||||||
function pushExit(replace, immediate, orientationChanges)
|
function pushExit(replace, immediate, orientationChanges)
|
||||||
{
|
{
|
||||||
|
if (replace) {
|
||||||
|
setState(immediate ? "Hidden" : "Left");
|
||||||
|
}
|
||||||
|
|
||||||
if (actualRoot.visible && immediate)
|
if (actualRoot.visible && immediate)
|
||||||
internal.setPageStatus(page, PageStatus.Inactive);
|
internal.setPageStatus(page, PageStatus.Inactive);
|
||||||
if (replace) {
|
if (replace) {
|
||||||
@ -523,8 +534,9 @@ Item {
|
|||||||
page.parent = owner;
|
page.parent = owner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
container.parent = null;
|
||||||
container.destroy();
|
container.visible = false;
|
||||||
|
destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,9 +17,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
import QtQuick.Controls 1.0 as QtControls
|
||||||
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
import QtQuick.Layouts 1.0
|
||||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
|
||||||
import org.kde.plasma.configuration 2.0
|
import org.kde.plasma.configuration 2.0
|
||||||
|
|
||||||
|
|
||||||
@ -30,7 +29,7 @@ Rectangle {
|
|||||||
property int _m: theme.defaultFont.pointSize
|
property int _m: theme.defaultFont.pointSize
|
||||||
|
|
||||||
//BEGIN properties
|
//BEGIN properties
|
||||||
color: "lightgray"
|
color: syspal.window
|
||||||
width: 640
|
width: 640
|
||||||
height: 480
|
height: 480
|
||||||
//END properties
|
//END properties
|
||||||
@ -81,25 +80,26 @@ Rectangle {
|
|||||||
//END connections
|
//END connections
|
||||||
|
|
||||||
//BEGIN UI components
|
//BEGIN UI components
|
||||||
Column {
|
SystemPalette {id: syspal}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
id: mainColumn
|
id: mainColumn
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
property int implicitWidth: Math.max(contentRow.implicitWidth, buttonsRow.implicitWidth) + 8
|
property int implicitWidth: Math.max(contentRow.implicitWidth, buttonsRow.implicitWidth) + 8
|
||||||
property int implicitHeight: contentRow.implicitHeight + buttonsRow.implicitHeight + 8
|
property int implicitHeight: contentRow.implicitHeight + buttonsRow.implicitHeight + 8
|
||||||
|
|
||||||
Row {
|
RowLayout {
|
||||||
id: contentRow
|
id: contentRow
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
spacing: 4
|
Layout.fillHeight: true
|
||||||
height: parent.height - buttonsRow.height
|
Layout.preferredHeight: parent.height - buttonsRow.height
|
||||||
property int implicitWidth: categoriesScroll.implicitWidth + pageScroll.implicitWidth
|
|
||||||
property int implicitHeight: Math.max(categoriesScroll.implicitHeight, pageScroll.implicitHeight)
|
|
||||||
|
|
||||||
PlasmaExtras.ScrollArea {
|
QtControls.ScrollView{
|
||||||
id: categoriesScroll
|
id: categoriesScroll
|
||||||
|
frameVisible: true
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
@ -107,7 +107,6 @@ Rectangle {
|
|||||||
visible: (configDialog.configModel ? configDialog.configModel.count : 0) + globalConfigModel.count > 1
|
visible: (configDialog.configModel ? configDialog.configModel.count : 0) + globalConfigModel.count > 1
|
||||||
width: visible ? 100 : 0
|
width: visible ? 100 : 0
|
||||||
implicitWidth: width
|
implicitWidth: width
|
||||||
implicitHeight: theme.mSize(theme.defaultFont).height * 12
|
|
||||||
Flickable {
|
Flickable {
|
||||||
id: categoriesView
|
id: categoriesView
|
||||||
contentWidth: width
|
contentWidth: width
|
||||||
@ -120,10 +119,10 @@ Rectangle {
|
|||||||
id: categories
|
id: categories
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: Math.max(categoriesView.height, categoriesColumn.height)
|
height: Math.max(categoriesView.height, categoriesColumn.height)
|
||||||
color: "white"
|
color: syspal.base
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: theme.highlightColor
|
color: syspal.highlight
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: theme.iconSizes.IconSizeHuge
|
height: theme.iconSizes.IconSizeHuge
|
||||||
y: index * height
|
y: index * height
|
||||||
@ -152,23 +151,20 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PlasmaExtras.ScrollArea {
|
QtControls.ScrollView{
|
||||||
id: pageScroll
|
id: pageScroll
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
margins: 4
|
|
||||||
}
|
}
|
||||||
width: parent.width - categoriesScroll.width - 8
|
Layout.fillWidth: true
|
||||||
implicitWidth: main.currentPage ? main.currentPage.implicitWidth : 0
|
|
||||||
implicitHeight: main.currentPage ? main.currentPage.implicitHeight : 0
|
|
||||||
Flickable {
|
Flickable {
|
||||||
contentWidth: width
|
contentWidth: width
|
||||||
contentHeight: main.height
|
contentHeight: main.height
|
||||||
Item {
|
Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
PlasmaComponents.PageStack {
|
QtControls.StackView {
|
||||||
id: main
|
id: main
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 12
|
anchors.margins: 12
|
||||||
@ -201,14 +197,13 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Row {
|
RowLayout {
|
||||||
id: buttonsRow
|
id: buttonsRow
|
||||||
spacing: 4
|
|
||||||
anchors {
|
anchors {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: spacing
|
rightMargin: spacing
|
||||||
}
|
}
|
||||||
PlasmaComponents.Button {
|
QtControls.Button {
|
||||||
iconSource: "dialog-ok"
|
iconSource: "dialog-ok"
|
||||||
text: "Ok"
|
text: "Ok"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
@ -220,7 +215,7 @@ Rectangle {
|
|||||||
configDialog.close()
|
configDialog.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PlasmaComponents.Button {
|
QtControls.Button {
|
||||||
iconSource: "dialog-ok-apply"
|
iconSource: "dialog-ok-apply"
|
||||||
text: "Apply"
|
text: "Apply"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
@ -231,7 +226,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PlasmaComponents.Button {
|
QtControls.Button {
|
||||||
iconSource: "dialog-cancel"
|
iconSource: "dialog-cancel"
|
||||||
text: "Cancel"
|
text: "Cancel"
|
||||||
onClicked: configDialog.close()
|
onClicked: configDialog.close()
|
||||||
|
@ -17,8 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
import QtQuick.Controls 1.0 as QtControls
|
||||||
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
|
||||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@ -68,7 +67,7 @@ MouseArea {
|
|||||||
height: width
|
height: width
|
||||||
source: model.icon
|
source: model.icon
|
||||||
}
|
}
|
||||||
PlasmaComponents.Label {
|
QtControls.Label {
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
|
@ -20,6 +20,7 @@ import QtQuick 2.0
|
|||||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||||
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
||||||
import org.kde.plasma.configuration 2.0
|
import org.kde.plasma.configuration 2.0
|
||||||
|
import QtQuick.Controls 1.0 as QtControls
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: root
|
id: root
|
||||||
|
Loading…
x
Reference in New Issue
Block a user