Remove plasma mobile components, pull from upstream at build time
This prevents us from constantly having to worry about keeping them in sync. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
1
.gitignore
vendored
|
@ -33,3 +33,4 @@ Subsurface.app
|
|||
.DS_Store
|
||||
!android/**/*.xml
|
||||
build*
|
||||
qt-mobile/qml/mobilecomponents
|
||||
|
|
|
@ -288,6 +288,48 @@ if [ "$SUBSURFACE_DESKTOP" = "ON" ] ; then
|
|||
else
|
||||
SUBSURFACE_MOBILE="ON"
|
||||
fi
|
||||
|
||||
if [ "$SUBSURFACE_MOBILE" = "ON" ] ; then
|
||||
# now bring in the latest Plasma-mobile mobile components plus a couple of icons that we need
|
||||
# first, get the latest from upstream
|
||||
# yes, this is a bit overkill as we clone a lot of stuff for just a few files, but this way
|
||||
# we stop having to manually merge our code with upstream all the time
|
||||
# as we get closer to shipping a production version we'll likely check out specific tags
|
||||
# or SHAs from upstream
|
||||
if [ ! -d plasma-mobile ] ; then
|
||||
git clone git://github.com/KDE/plasma-mobile
|
||||
fi
|
||||
pushd plasma-mobile
|
||||
git pull
|
||||
popd
|
||||
if [ ! -d breeze-icons ] ; then
|
||||
git clone git://anongit.kde.org/breeze-icons
|
||||
fi
|
||||
pushd breeze-icons
|
||||
git pull
|
||||
popd
|
||||
|
||||
# now copy the components and a couple of icons into plae
|
||||
MC=$SUBSURFACE_SOURCE/qt-mobile/qml/mobilecomponents
|
||||
PMMC=plasma-mobile/components/mobilecomponents
|
||||
BREEZE=breeze-icons
|
||||
|
||||
rm -rf $MC
|
||||
mkdir -p $MC/icons
|
||||
cp -R $PMMC/qml/* $MC/
|
||||
cp $PMMC/fallbacktheme/*qml $MC/
|
||||
|
||||
cp $BREEZE/icons/actions/24/dialog-cancel.svg $MC/icons
|
||||
cp $BREEZE/icons/actions/24/distribute-horizontal-x.svg $MC/icons
|
||||
cp $BREEZE/icons/actions/24/document-edit.svg $MC/icons
|
||||
cp $BREEZE/icons/actions/24/document-save.svg $MC/icons
|
||||
cp $BREEZE/icons/actions/24/go-next.svg $MC/icons
|
||||
cp $BREEZE/icons/actions/24/go-previous.svg $MC/icons
|
||||
cp $BREEZE/icons/actions/16/view-readermode.svg $MC/icons
|
||||
|
||||
echo org.kde.plasma.mobilecomponents synced from upstream
|
||||
fi
|
||||
|
||||
if [ ! -z "$SUBSURFACE_MOBILE" ] ; then
|
||||
mkdir -p subsurface-mobile-build-$ARCH
|
||||
cd subsurface-mobile-build-$ARCH
|
||||
|
@ -298,7 +340,7 @@ else
|
|||
cd subsurface-build-$ARCH
|
||||
fi
|
||||
|
||||
# somehting in the qt-android-cmake-thingies mangles your path, so thats why we need to hard-code ant and pkg-config here.
|
||||
# something in the qt-android-cmake-thingies mangles your path, so thats why we need to hard-code ant and pkg-config here.
|
||||
if [ $PLATFORM = Darwin ] ; then
|
||||
ANT=/usr/local/bin/ant
|
||||
FTDI=OFF
|
||||
|
@ -306,6 +348,7 @@ else
|
|||
ANT=/usr/bin/ant
|
||||
FTDI=ON
|
||||
fi
|
||||
|
||||
PKGCONF=$(which pkg-config)
|
||||
cmake $MOBILE_CMAKE \
|
||||
-DQT_ANDROID_ANT=${ANT} \
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
<file alias="org/kde/plasma/mobilecomponents/private/ActionButtonArrow.qml">mobilecomponents/private/ActionButtonArrow.qml</file>
|
||||
<file alias="org/kde/plasma/mobilecomponents/private/AbstractDrawer.qml">mobilecomponents/private/AbstractDrawer.qml</file>
|
||||
<file alias="org/kde/plasma/mobilecomponents/private/PageStack.js">mobilecomponents/private/PageStack.js</file>
|
||||
<file alias="org/kde/plasma/mobilecomponents/private/qmldir">mobilecomponents/private/qmldir</file>
|
||||
<file alias="org/kde/plasma/mobilecomponents/icons/go-next.svg">mobilecomponents/icons/go-next.svg</file>
|
||||
<file alias="org/kde/plasma/mobilecomponents/icons/go-previous.svg">mobilecomponents/icons/go-previous.svg</file>
|
||||
<file alias="org/kde/plasma/mobilecomponents/icons/distribute-horizontal-x.svg">mobilecomponents/icons/distribute-horizontal-x.svg</file>
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
* Copycontext 2015 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Controls 1.3
|
||||
|
||||
Action {
|
||||
id: root
|
||||
default property alias children: root.__children
|
||||
property list<Action> __children
|
||||
}
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
* Copycontext 2015 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Controls 1.3
|
||||
import "private"
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
|
||||
/**
|
||||
* A window that provides some basic features needed for all apps
|
||||
*
|
||||
* It's usually used as a root QML component for the application.
|
||||
* It's based around the PageRow component, the application will be
|
||||
* about pages adding and removal.
|
||||
*/
|
||||
ApplicationWindow {
|
||||
id: root
|
||||
|
||||
/**
|
||||
* The first page that will be loaded when the application starts
|
||||
*/
|
||||
property alias initialPage: __pageStack.initialPage
|
||||
|
||||
/**
|
||||
* The stack used to allocate the pages and to manage the transitions
|
||||
* between them.
|
||||
* It's using a PageRow, while having the same API as PageStack,
|
||||
* it positions the pages as adjacent columns, with as many columns
|
||||
* as can fit in the screen. An handheld device would usually have a single
|
||||
* fullscreen column, a tablet device would have many tiled columns.
|
||||
*/
|
||||
property alias pageStack: __pageStack
|
||||
|
||||
function showPassiveNotification(message, timeout, actionText, callBack) {
|
||||
if (!__actionButton.__passiveNotification) {
|
||||
var component = Qt.createComponent("private/PassiveNotification.qml");
|
||||
__actionButton.__passiveNotification = component.createObject(contentItem.parent);
|
||||
}
|
||||
|
||||
__actionButton.__passiveNotification.showNotification(message, timeout, actionText, callBack);
|
||||
}
|
||||
|
||||
PageRow {
|
||||
id: __pageStack
|
||||
anchors {
|
||||
fill: parent
|
||||
bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
|
||||
}
|
||||
focus: true
|
||||
Keys.onReleased: {
|
||||
if (event.key == Qt.Key_Back && stackView.depth > 1) {
|
||||
stackView.pop();
|
||||
event.accepted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property AbstractDrawer globalDrawer
|
||||
property AbstractDrawer contextDrawer
|
||||
|
||||
onGlobalDrawerChanged: {
|
||||
globalDrawer.parent = contentItem.parent;
|
||||
}
|
||||
onContextDrawerChanged: {
|
||||
contextDrawer.parent = contentItem.parent;
|
||||
}
|
||||
|
||||
width: Units.gridUnit * 25
|
||||
height: Units.gridUnit * 30
|
||||
|
||||
property alias actionButton: __actionButton
|
||||
ActionButton {
|
||||
id: __actionButton
|
||||
//put it there just to make it not accessible bu users
|
||||
property Item __passiveNotification
|
||||
z: 9999
|
||||
anchors.bottom: parent.bottom
|
||||
x: parent.width/2 - width/2
|
||||
iconSource: "distribute-horizontal-x"
|
||||
|
||||
visible: root.globalDrawer || root.contextDrawer
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
* Copyright 2010 Marco Martin <notmart@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Layouts 1.2
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
|
||||
/**
|
||||
* An item delegate for the primitive ListView component.
|
||||
*
|
||||
* It's intended to make all listviews look coherent.
|
||||
*
|
||||
* @inherit QtQuick.Item
|
||||
*/
|
||||
ListItem {
|
||||
id: listItem
|
||||
|
||||
property string label
|
||||
property var icon
|
||||
|
||||
RowLayout {
|
||||
height: implicitHeight + Units.smallSpacing * 2
|
||||
anchors {
|
||||
left: parent.left
|
||||
margins: Units.largeSpacing
|
||||
}
|
||||
Icon {
|
||||
Layout.minimumHeight: Units.iconSizes.smallMedium
|
||||
Layout.minimumWidth: height
|
||||
source: listItem.icon
|
||||
}
|
||||
Label {
|
||||
text: listItem.label
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
* Copyright 2015 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Controls 1.0 as QtControls
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
|
||||
OverlayDrawer {
|
||||
id: root
|
||||
|
||||
property string title: typeof i18n !== "undefined" ? i18n("Actions") : "Actions"
|
||||
|
||||
//This can be any type of object that a ListView can accept as model. It expects items compatible with either QAction or QQC Action
|
||||
property var actions: pageStack.lastVisiblePage ? pageStack.lastVisiblePage.contextualActions : null
|
||||
enabled: menu.count > 0
|
||||
edge: Qt.RightEdge
|
||||
|
||||
contentItem: QtControls.ScrollView {
|
||||
implicitWidth: Units.gridUnit * 20
|
||||
ListView {
|
||||
id: menu
|
||||
interactive: contentHeight > height
|
||||
model: {
|
||||
if (typeof root.actions == "undefined") {
|
||||
return null;
|
||||
}
|
||||
if (root.actions.length == 0) {
|
||||
return null;
|
||||
} else {
|
||||
return root.actions[0].text !== undefined &&
|
||||
root.actions[0].trigger !== undefined ?
|
||||
root.actions :
|
||||
root.actions[0];
|
||||
}
|
||||
}
|
||||
topMargin: menu.height - menu.contentHeight
|
||||
header: Item {
|
||||
height: heading.height
|
||||
width: menu.width
|
||||
Heading {
|
||||
id: heading
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
margins: Units.largeSpacing
|
||||
}
|
||||
elide: Text.ElideRight
|
||||
level: 2
|
||||
text: root.title
|
||||
}
|
||||
}
|
||||
delegate: BasicListItem {
|
||||
checked: modelData.checked
|
||||
icon: modelData.iconName
|
||||
label: model ? model.text : modelData.text
|
||||
enabled: model ? model.enabled : modelData.enabled
|
||||
opacity: enabled ? 1.0 : 0.6
|
||||
onClicked: {
|
||||
if (modelData && modelData.trigger !== undefined) {
|
||||
modelData.trigger();
|
||||
// assume the model is a list of QAction or Action
|
||||
} else if (menu.model.length > index) {
|
||||
menu.model[index].trigger();
|
||||
} else {
|
||||
console.warning("Don't know how to trigger the action")
|
||||
}
|
||||
root.opened = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,183 +0,0 @@
|
|||
/*
|
||||
* Copyright 2015 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Controls 1.0
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
|
||||
OverlayDrawer {
|
||||
id: root
|
||||
edge: Qt.LeftEdge
|
||||
|
||||
default property alias content: mainContent.data
|
||||
|
||||
property alias title: heading.text
|
||||
property alias titleIcon: headingIcon.source
|
||||
property alias bannerImageSource: bannerImage.source
|
||||
property list<Action> actions
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
id: mainColumn
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
implicitWidth: Units.gridUnit * 12
|
||||
|
||||
Image {
|
||||
id: bannerImage
|
||||
Layout.fillWidth: true
|
||||
|
||||
Layout.preferredWidth: title.implicitWidth
|
||||
Layout.preferredHeight: bannerImageSource != "" ? Math.max(title.implicitHeight, Math.floor(width / (sourceSize.width/sourceSize.height))) : title.implicitHeight
|
||||
Layout.minimumHeight: Math.max(headingIcon.height, heading.height) + Units.smallSpacing * 2
|
||||
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: parent.top
|
||||
}
|
||||
|
||||
LinearGradient {
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: parent.top
|
||||
}
|
||||
visible: bannerImageSource != ""
|
||||
height: title.height * 1.3
|
||||
start: Qt.point(0, 0)
|
||||
end: Qt.point(0, height)
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0.0
|
||||
color: Qt.rgba(0, 0, 0, 0.8)
|
||||
}
|
||||
GradientStop {
|
||||
position: 1.0
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: title
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
margins: Units.smallSpacing * 2
|
||||
}
|
||||
Icon {
|
||||
id: headingIcon
|
||||
Layout.minimumWidth: Units.iconSizes.large
|
||||
Layout.minimumHeight: width
|
||||
}
|
||||
Heading {
|
||||
id: heading
|
||||
level: 1
|
||||
color: bannerImageSource != "" ? "white" : Theme.textColor
|
||||
}
|
||||
Item {
|
||||
height: 1
|
||||
Layout.minimumWidth: heading.height
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: Theme.textColor
|
||||
opacity: 0.2
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumHeight: 1
|
||||
}
|
||||
|
||||
StackView {
|
||||
id: pageRow
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
initialItem: menuComponent
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: mainContent
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.minimumWidth: parent.width - Units.smallSpacing*2
|
||||
Layout.maximumWidth: Layout.minimumWidth
|
||||
Layout.fillWidth: false
|
||||
Layout.fillHeight: true
|
||||
visible: children.length > 0
|
||||
}
|
||||
Item {
|
||||
Layout.minimumWidth: Units.smallSpacing
|
||||
Layout.minimumHeight: Units.smallSpacing
|
||||
}
|
||||
|
||||
Component {
|
||||
id: menuComponent
|
||||
ListView {
|
||||
id: optionMenu
|
||||
clip: true
|
||||
|
||||
model: actions
|
||||
property int level: 0
|
||||
|
||||
interactive: contentHeight > height
|
||||
|
||||
footer: BasicListItem {
|
||||
visible: level > 0
|
||||
enabled: true
|
||||
icon: "go-previous"
|
||||
label: typeof i18n !== "undefined" ? i18n("Back") : "Back"
|
||||
onClicked: pageRow.pop()
|
||||
}
|
||||
delegate: BasicListItem {
|
||||
enabled: true
|
||||
checked: modelData.checked
|
||||
icon: modelData.iconName
|
||||
label: modelData.text
|
||||
|
||||
Icon {
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
right: parent.right
|
||||
}
|
||||
width: height
|
||||
source: "go-next"
|
||||
visible: modelData.children != undefined
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
if (modelData.children) {
|
||||
pageRow.push(menuComponent, {"model": modelData.children, "level": level + 1});
|
||||
} else {
|
||||
modelData.trigger();
|
||||
pageRow.pop(pageRow.initialPage);
|
||||
root.opened = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 by Sebastian Kügler <sebas@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
|
||||
/**
|
||||
* A heading label used for subsections of texts.
|
||||
*
|
||||
* The characteristics of the text will be automatically set according to the
|
||||
* plasma Theme. Use this components for section titles or headings in your UI,
|
||||
* for example page or section titles.
|
||||
*
|
||||
* Example usage:
|
||||
*
|
||||
* @code
|
||||
* import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
||||
* [...]
|
||||
* Column {
|
||||
* MobileComponents.Heading { text: "Apples in the sunlight"; level: 2 }
|
||||
* [...]
|
||||
* }
|
||||
* @endcode
|
||||
*
|
||||
* The most important property is "text", which applies to the text property of
|
||||
* Label. See PlasmaComponents Label and primitive QML Text element API for
|
||||
* additional properties, methods and signals.
|
||||
*/
|
||||
Label {
|
||||
id: heading
|
||||
|
||||
/**
|
||||
* The level determines how big the section header is display, values
|
||||
* between 1 (big) and 5 (small) are accepted
|
||||
*/
|
||||
property int level: 1
|
||||
|
||||
property int step: 2
|
||||
|
||||
height: Math.round(paintedHeight * 1.2)
|
||||
font.pointSize: headerPointSize(level)
|
||||
font.weight: Font.Light
|
||||
wrapMode: Text.WordWrap
|
||||
opacity: 0.8
|
||||
|
||||
function headerPointSize(l) {
|
||||
var n = Theme.defaultFont.pointSize;
|
||||
var s;
|
||||
if (l > 4) {
|
||||
s = n
|
||||
} else if (l < 2) {
|
||||
s = n + (5*step)
|
||||
} else {
|
||||
s = n + ((5-level)*2)
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* Copyright 2015 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property string source
|
||||
property alias smooth: image.smooth
|
||||
property bool active: false
|
||||
property bool valid: image.status == Image.Ready
|
||||
|
||||
implicitWidth: image.source != "" ? Units.iconSizes.smallMedium : 0
|
||||
implicitHeight: image.source != "" ? Units.iconSizes.smallMedium : 0
|
||||
|
||||
Image {
|
||||
id: image
|
||||
anchors.fill: parent
|
||||
source: root.source != "" ? (root.source.indexOf(".") === -1 ? "icons/" + root.source + ".svg" : root.source) : root.source
|
||||
sourceSize.width: root.width
|
||||
sourceSize.height: root.height
|
||||
}
|
||||
/* // FIXME: This causes black squares on some GLES drivers, notably on Adreno hardware
|
||||
GammaAdjust {
|
||||
anchors.fill: image
|
||||
source: image
|
||||
gamma: root.active ? 3.0 : 1
|
||||
}
|
||||
*/
|
||||
}
|
|
@ -1,238 +0,0 @@
|
|||
/*
|
||||
Copyright 2010 Marco Martin <notmart@gmail.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
import org.kde.plasma.mobilecomponents.private 0.2
|
||||
|
||||
Item {
|
||||
id: main
|
||||
|
||||
property Component delegate
|
||||
property QtObject model
|
||||
|
||||
property int pageSize: Math.floor(iconView.width / main.delegateWidth) * Math.floor(iconView.height / main.delegateHeight)
|
||||
property int delegateWidth: Units.iconSizes.huge + Units.gridUnit * 2
|
||||
property int delegateHeight: Units.iconSizes.huge + Units.gridUnit * 2
|
||||
property alias currentPage: iconView.currentIndex
|
||||
property int pagesCount: Math.ceil(model.count / pageSize)
|
||||
property int count: model.count
|
||||
property alias contentX: iconView.contentX
|
||||
clip: true
|
||||
|
||||
function positionViewAtIndex(index)
|
||||
{
|
||||
iconView.positionViewAtIndex(index / pageSize, ListView.Beginning)
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: resizeTimer
|
||||
running: true
|
||||
interval: 100
|
||||
onTriggered: {
|
||||
main.pageSize = Math.floor(iconView.width / main.delegateWidth) * Math.floor(iconView.height / main.delegateHeight)
|
||||
if (iconView.currentItem) {
|
||||
iconView.currentItem.width = iconView.width
|
||||
iconView.currentItem.height = iconView.height
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: iconView
|
||||
objectName: "iconView"
|
||||
pressDelay: 200
|
||||
cacheBuffer: Units.gridUnit * 8
|
||||
highlightMoveDuration: Units.shortDuration
|
||||
anchors.fill: parent
|
||||
onWidthChanged: resizeTimer.restart()
|
||||
onHeightChanged: resizeTimer.restart()
|
||||
|
||||
model: main.model ? Math.ceil(main.model.count/main.pageSize) : 0
|
||||
highlightRangeMode: ListView.StrictlyEnforceRange
|
||||
orientation: ListView.Horizontal
|
||||
snapMode: ListView.SnapOneItem
|
||||
boundsBehavior: Flickable.DragOverBounds
|
||||
|
||||
signal clicked(string url)
|
||||
|
||||
delegate: Component {
|
||||
Item {
|
||||
id: delegatePage
|
||||
//Explicitly *not* bind the properties for performance reasons
|
||||
Component.onCompleted: {
|
||||
width = iconView.width
|
||||
height = iconView.height
|
||||
//iconView.cacheBuffer = iconView.width
|
||||
}
|
||||
|
||||
Flow {
|
||||
id: iconFlow
|
||||
width: iconRepeater.suggestedWidth
|
||||
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
}
|
||||
property int orientation: ListView.Horizontal
|
||||
|
||||
PagedProxyModel {
|
||||
id: pagedProxyModel
|
||||
sourceModel: main.model
|
||||
currentPage: model.index
|
||||
pageSize: main.pageSize
|
||||
}
|
||||
Repeater {
|
||||
id: iconRepeater
|
||||
model: pagedProxyModel
|
||||
property int columns: Math.min(count, Math.floor(delegatePage.width / main.delegateWidth))
|
||||
property int suggestedWidth: main.delegateWidth * columns
|
||||
//property int suggestedHeight: main.delegateHeight*Math.floor(count/columns)
|
||||
|
||||
delegate: main.delegate
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loader {
|
||||
id: scrollArea
|
||||
visible: main.model && Math.ceil(main.model.count/main.pageSize) > 1
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
}
|
||||
height: Math.max(16, iconView.height - Math.floor(iconView.height / delegateHeight) * delegateHeight)
|
||||
|
||||
property int pageCount: main.model ? Math.ceil(main.model.count/main.pageSize) : 0
|
||||
|
||||
sourceComponent: pageCount > 1 ? ((pageCount * 20 > width) ? scrollDotComponent : dotsRow) : undefined
|
||||
function setViewIndex(index)
|
||||
{
|
||||
//animate only if near
|
||||
if (Math.abs(iconView.currentIndex - index) > 1) {
|
||||
iconView.positionViewAtIndex(index, ListView.Beginning)
|
||||
} else {
|
||||
iconView.currentIndex = index
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: scrollDotComponent
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
property int pendingIndex: 0
|
||||
Rectangle {
|
||||
id: barRectangle
|
||||
color: Theme.textColor
|
||||
height: 4
|
||||
radius: 2
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
leftMargin: (parent.width / pageCount / 2)
|
||||
rightMargin: (parent.width / pageCount / 2)
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
color: Theme.textColor
|
||||
height: 8
|
||||
width: height
|
||||
radius: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
x: parent.width / (pageCount / (iconView.currentIndex+1)) - (parent.width / pageCount / 2) - 4
|
||||
Behavior on x {
|
||||
NumberAnimation {
|
||||
duration: Units.shortDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
function setViewIndexFromMouse(x)
|
||||
{
|
||||
pendingIndex = Math.min(pageCount,
|
||||
Math.round(pageCount / (barRectangle.width / Math.max(x - barRectangle.x, 1))))
|
||||
viewPositionTimer.restart()
|
||||
}
|
||||
onPressed: setViewIndexFromMouse(mouse.x)
|
||||
onPositionChanged: setViewIndexFromMouse(mouse.x)
|
||||
|
||||
Timer {
|
||||
id: viewPositionTimer
|
||||
interval: 200
|
||||
onTriggered: setViewIndex(pendingIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: dotsRow
|
||||
|
||||
Item {
|
||||
Row {
|
||||
anchors.centerIn: parent
|
||||
spacing: units.gridUnit
|
||||
|
||||
Repeater {
|
||||
model: scrollArea.pageCount
|
||||
|
||||
|
||||
Rectangle {
|
||||
width: 6
|
||||
height: 6
|
||||
scale: iconView.currentIndex == index ? 1.5 : 1
|
||||
radius: 5
|
||||
smooth: true
|
||||
opacity: iconView.currentIndex == index ? 0.8: 0.4
|
||||
color: Theme.textColor
|
||||
|
||||
Behavior on scale {
|
||||
NumberAnimation {
|
||||
duration: units.shortDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: units.shortDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: Units.gridUnit / 2
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
setViewIndex(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2011 by Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
|
||||
/**
|
||||
* This is a label which uses the plasma Theme.
|
||||
*
|
||||
* The characteristics of the text will be automatically set according to the
|
||||
* plasma Theme. If you need a more customized text item use the Text component
|
||||
* from QtQuick.
|
||||
*
|
||||
* You can use all elements of the QML Text component, in particular the "text"
|
||||
* property to define the label text.
|
||||
*
|
||||
* @inherit QtQuick.Text
|
||||
*/
|
||||
Text {
|
||||
id: root
|
||||
|
||||
height: Math.round(Math.max(paintedHeight, Units.gridUnit * 1.6))
|
||||
verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter
|
||||
|
||||
activeFocusOnTab: false
|
||||
renderType: Text.NativeRendering
|
||||
|
||||
font.capitalization: Theme.defaultFont.capitalization
|
||||
font.family: Theme.defaultFont.family
|
||||
font.italic: Theme.defaultFont.italic
|
||||
font.letterSpacing: Theme.defaultFont.letterSpacing
|
||||
font.pointSize: Theme.defaultFont.pointSize
|
||||
font.strikeout: Theme.defaultFont.strikeout
|
||||
font.underline: Theme.defaultFont.underline
|
||||
font.weight: Theme.defaultFont.weight
|
||||
font.wordSpacing: Theme.defaultFont.wordSpacing
|
||||
color: Theme.textColor
|
||||
|
||||
opacity: enabled? 1 : 0.6
|
||||
|
||||
Accessible.role: Accessible.StaticText
|
||||
Accessible.name: text
|
||||
}
|
|
@ -1,129 +0,0 @@
|
|||
/*
|
||||
* Copyright 2010 Marco Martin <notmart@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
|
||||
/**
|
||||
* An item delegate for the primitive ListView component.
|
||||
*
|
||||
* It's intended to make all listviews look coherent.
|
||||
*
|
||||
* @inherit QtQuick.Item
|
||||
*/
|
||||
Item {
|
||||
id: listItem
|
||||
default property alias content: paddingItem.data
|
||||
|
||||
/**
|
||||
* type:bool Holds if the item emits signals related to mouse interaction.
|
||||
*
|
||||
* The default value is false.
|
||||
*/
|
||||
property alias enabled: itemMouse.enabled
|
||||
//item has been clicked or pressed+hold
|
||||
|
||||
/**
|
||||
* This signal is emitted when there is a click.
|
||||
*
|
||||
* This is disabled by default, set enabled to true to use it.
|
||||
* @see enabled
|
||||
*/
|
||||
signal clicked
|
||||
|
||||
|
||||
/**
|
||||
* The user pressed the item with the mouse and didn't release it for a
|
||||
* certain amount of time.
|
||||
*
|
||||
* This is disabled by default, set enabled to true to use it.
|
||||
* @see enabled
|
||||
*/
|
||||
signal pressAndHold
|
||||
|
||||
/**
|
||||
* If true makes the list item look as checked or pressed. It has to be set
|
||||
* from the code, it won't change by itself.
|
||||
*/
|
||||
//plasma extension
|
||||
//always look pressed?
|
||||
property bool checked: false
|
||||
|
||||
/**
|
||||
* If true the item will be a delegate for a section, so will look like a
|
||||
* "title" for the otems under it.
|
||||
*/
|
||||
//is this to be used as section delegate?
|
||||
property bool sectionDelegate: false
|
||||
|
||||
/**
|
||||
* True if the list item contains mouse
|
||||
*/
|
||||
property alias containsMouse: itemMouse.containsMouse
|
||||
|
||||
width: parent ? parent.width : childrenRect.width
|
||||
height: paddingItem.childrenRect.height + Units.smallSpacing*2
|
||||
|
||||
property int implicitHeight: paddingItem.childrenRect.height + Units.smallSpacing*2
|
||||
|
||||
|
||||
MouseArea {
|
||||
id: itemMouse
|
||||
property bool changeBackgroundOnPress: !listItem.checked && !listItem.sectionDelegate
|
||||
anchors.fill: parent
|
||||
enabled: false
|
||||
hoverEnabled: true
|
||||
|
||||
onClicked: listItem.clicked()
|
||||
onPressAndHold: listItem.pressAndHold()
|
||||
|
||||
Rectangle {
|
||||
id : background
|
||||
color: listItem.checked || (itemMouse.pressed && itemMouse.changeBackgroundOnPress) ? Theme.highlightColor : Theme.viewBackgroundColor
|
||||
|
||||
anchors.fill: parent
|
||||
visible: listItem.ListView.view ? listItem.ListView.view.highlight === null : true
|
||||
opacity: itemMouse.containsMouse && !itemMouse.pressed ? 0.5 : 1
|
||||
Behavior on color {
|
||||
ColorAnimation { duration: Units.longDuration }
|
||||
}
|
||||
Behavior on opacity { NumberAnimation { duration: Units.longDuration } }
|
||||
}
|
||||
Item {
|
||||
id: paddingItem
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: Units.smallSpacing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: Theme.textColor
|
||||
opacity: 0.2
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
}
|
||||
height: 1
|
||||
}
|
||||
|
||||
Accessible.role: Accessible.ListItem
|
||||
}
|
|
@ -1,292 +0,0 @@
|
|||
/*
|
||||
* Copyright 2010 Marco Martin <notmart@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Controls 1.0
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
/**
|
||||
* An item delegate for the primitive ListView component.
|
||||
*
|
||||
* It's intended to make all listviews look coherent.
|
||||
*
|
||||
* @inherit QtQuick.Item
|
||||
*/
|
||||
Item {
|
||||
id: listItem
|
||||
default property alias content: paddingItem.data
|
||||
|
||||
/**
|
||||
* type:bool Holds if the item emits signals related to mouse interaction.
|
||||
*
|
||||
* The default value is false.
|
||||
*/
|
||||
property alias enabled: itemMouse.enabled
|
||||
//item has been clicked or pressed+hold
|
||||
|
||||
/**
|
||||
* This signal is emitted when there is a click.
|
||||
*
|
||||
* This is disabled by default, set enabled to true to use it.
|
||||
* @see enabled
|
||||
*/
|
||||
signal clicked
|
||||
|
||||
/**
|
||||
* The user pressed the item with the mouse and didn't release it for a
|
||||
* certain amount of time.
|
||||
*
|
||||
* This is disabled by default, set enabled to true to use it.
|
||||
* @see enabled
|
||||
*/
|
||||
signal pressAndHold
|
||||
|
||||
/**
|
||||
* If true makes the list item look as checked or pressed. It has to be set
|
||||
* from the code, it won't change by itself.
|
||||
*/
|
||||
//plasma extension
|
||||
//always look pressed?
|
||||
property bool checked: false
|
||||
|
||||
/**
|
||||
* If true the item will be a delegate for a section, so will look like a
|
||||
* "title" for the otems under it.
|
||||
*/
|
||||
//is this to be used as section delegate?
|
||||
property bool sectionDelegate: false
|
||||
|
||||
/**
|
||||
* True if the list item contains mouse
|
||||
*/
|
||||
property alias containsMouse: itemMouse.containsMouse
|
||||
|
||||
/**
|
||||
* Defines the actions for the page: at most 4 buttons will
|
||||
* contain the actions at the bottom of the page, if the main
|
||||
* item of the page is a Flickable or a ScrllArea, it will
|
||||
* control the visibility of the actions.
|
||||
*/
|
||||
property alias actions: internalActions.data
|
||||
|
||||
Item {
|
||||
id: internalActions
|
||||
}
|
||||
|
||||
width: parent ? parent.width : childrenRect.width
|
||||
height: paddingItem.childrenRect.height + Units.smallSpacing * 2
|
||||
|
||||
property int implicitHeight: paddingItem.childrenRect.height + Units.smallSpacing * 2
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: shadowHolder
|
||||
color: Theme.backgroundColor
|
||||
x: itemMouse.x + itemMouse.width
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
}
|
||||
InnerShadow {
|
||||
anchors.fill: shadowHolder
|
||||
radius: Units.smallSpacing * 2
|
||||
samples: 16
|
||||
horizontalOffset: verticalOffset
|
||||
verticalOffset: Units.smallSpacing / 2
|
||||
color: Qt.rgba(0, 0, 0, 0.3)
|
||||
source: shadowHolder
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
drag {
|
||||
target: itemMouse
|
||||
axis: Drag.XAxis
|
||||
maximumX: 0
|
||||
}
|
||||
onClicked: itemMouse.x = 0;
|
||||
onPressed: handleArea.mouseDown(mouse);
|
||||
onPositionChanged: handleArea.positionChanged(mouse);
|
||||
onReleased: handleArea.released(mouse);
|
||||
}
|
||||
RowLayout {
|
||||
anchors {
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
rightMargin: y
|
||||
}
|
||||
height: Math.min( parent.height / 1.5, Units.iconSizes.medium)
|
||||
property bool exclusive: false
|
||||
property Item checkedButton
|
||||
spacing: Units.largeSpacing
|
||||
Repeater {
|
||||
model: {
|
||||
if (listItem.actions.length == 0) {
|
||||
return null;
|
||||
} else {
|
||||
return listItem.actions[0].text !== undefined &&
|
||||
listItem.actions[0].trigger !== undefined ?
|
||||
listItem.actions :
|
||||
listItem.actions[0];
|
||||
}
|
||||
}
|
||||
delegate: Icon {
|
||||
Layout.fillHeight: true
|
||||
Layout.minimumWidth: height
|
||||
source: modelData.iconName
|
||||
MouseArea {
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: -Units.smallSpacing
|
||||
}
|
||||
onClicked: {
|
||||
if (modelData && modelData.trigger !== undefined) {
|
||||
modelData.trigger();
|
||||
// assume the model is a list of QAction or Action
|
||||
} else if (toolbar.model.length > index) {
|
||||
toolbar.model[index].trigger();
|
||||
} else {
|
||||
console.log("Don't know how to trigger the action")
|
||||
}
|
||||
itemMouse.x = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MouseArea {
|
||||
id: itemMouse
|
||||
property bool changeBackgroundOnPress: !listItem.checked && !listItem.sectionDelegate
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
enabled: false
|
||||
hoverEnabled: true
|
||||
|
||||
onClicked: listItem.clicked()
|
||||
onPressAndHold: listItem.pressAndHold()
|
||||
|
||||
Behavior on x {
|
||||
NumberAnimation {
|
||||
duration: Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id : item
|
||||
color: listItem.checked || (itemMouse.pressed && itemMouse.changeBackgroundOnPress) ? Theme.highlightColor : Theme.viewBackgroundColor
|
||||
anchors.fill: parent
|
||||
|
||||
visible: listItem.ListView.view ? listItem.ListView.view.highlight === null : true
|
||||
Behavior on color {
|
||||
ColorAnimation { duration: Units.longDuration }
|
||||
}
|
||||
|
||||
Item {
|
||||
id: paddingItem
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: Units.smallSpacing
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: speedSampler
|
||||
interval: 100
|
||||
repeat: true
|
||||
property real speed
|
||||
property real oldItemMouseX
|
||||
onTriggered: {
|
||||
speed = itemMouse.x - oldItemMouseX;
|
||||
oldItemMouseX = itemMouse.x;
|
||||
}
|
||||
onRunningChanged: {
|
||||
if (running) {
|
||||
speed = 0;
|
||||
} else {
|
||||
speed = itemMouse.x - oldItemMouseX;
|
||||
}
|
||||
oldItemMouseX = itemMouse.x;
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
id: handleArea
|
||||
width: Units.iconSizes.smallMedium
|
||||
height: width
|
||||
preventStealing: true
|
||||
anchors {
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
rightMargin: y
|
||||
}
|
||||
drag {
|
||||
target: itemMouse
|
||||
axis: Drag.XAxis
|
||||
maximumX: 0
|
||||
minimumX: -listItem.width
|
||||
}
|
||||
function mouseDown(mouse) {
|
||||
speedSampler.speed = 0;
|
||||
speedSampler.running = true;
|
||||
}
|
||||
onPressed: mouseDown(mouse);
|
||||
onCanceled: speedSampler.running = false;
|
||||
onReleased: {
|
||||
speedSampler.running = false;
|
||||
|
||||
if (speedSampler.speed < -Units.gridUnit * 3) {
|
||||
itemMouse.x = -itemMouse.width + width * 2;
|
||||
} else if (speedSampler.speed > Units.gridUnit * 3 || itemMouse.x > -itemMouse.width/3) {
|
||||
itemMouse.x = 0;
|
||||
} else {
|
||||
itemMouse.x = -itemMouse.width + width * 2;
|
||||
}
|
||||
}
|
||||
onClicked: {
|
||||
if (itemMouse.x < -itemMouse.width/2) {
|
||||
itemMouse.x = 0;
|
||||
} else {
|
||||
itemMouse.x = -itemMouse.width + width * 2
|
||||
}
|
||||
}
|
||||
Icon {
|
||||
anchors.fill: parent
|
||||
source: "application-menu"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Rectangle {
|
||||
color: Theme.textColor
|
||||
opacity: 0.2
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
}
|
||||
height: 1
|
||||
}
|
||||
|
||||
Accessible.role: Accessible.ListItem
|
||||
}
|
|
@ -1,377 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtGraphicalEffects 1.0
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
import "private"
|
||||
|
||||
/**Documented API
|
||||
|
||||
Imports:
|
||||
QtQuick 2.1
|
||||
|
||||
Description:
|
||||
Overlay Drawers are used to expose additional UI elements needed for
|
||||
small secondary tasks for which the main UI elements are not needed.
|
||||
For example in Okular Active, an Overlay Drawer is used to display
|
||||
thumbnails of all pages within a document along with a search field.
|
||||
This is used for the distinct task of navigating to another page.
|
||||
|
||||
Properties:
|
||||
bool opened:
|
||||
If true the drawer is open showing the contents of the "drawer"
|
||||
component.
|
||||
|
||||
Item page:
|
||||
It's the default property. it's the main content of the drawer page,
|
||||
the part that is always shown
|
||||
|
||||
Item contentItem:
|
||||
It's the part that can be pulled in and out, will act as a sidebar.
|
||||
**/
|
||||
AbstractDrawer {
|
||||
id: root
|
||||
anchors.fill: parent
|
||||
z: 9999
|
||||
|
||||
default property alias page: mainPage.data
|
||||
property Item contentItem
|
||||
property alias opened: mainFlickable.open
|
||||
property int edge: Qt.LeftEdge
|
||||
property real position: 0
|
||||
onPositionChanged: {
|
||||
if (!mainFlickable.flicking && !mainFlickable.dragging && !mainAnim.running) {
|
||||
switch (root.edge) {
|
||||
case Qt.RightEdge:
|
||||
mainFlickable.contentX = drawerPage.width * position;
|
||||
break;
|
||||
case Qt.LeftEdge:
|
||||
mainFlickable.contentX = drawerPage.width * (1-position);
|
||||
break;
|
||||
case Qt.BottomEdge:
|
||||
mainFlickable.contentY = drawerPage.height * position;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
onContentItemChanged: {
|
||||
contentItem.parent = drawerPage
|
||||
contentItem.anchors.fill = drawerPage
|
||||
}
|
||||
|
||||
|
||||
function open () {
|
||||
mainAnim.to = 0;
|
||||
switch (root.edge) {
|
||||
case Qt.RightEdge:
|
||||
mainAnim.to = drawerPage.width;
|
||||
break;
|
||||
case Qt.BottomEdge:
|
||||
mainAnim.to = drawerPage.height;
|
||||
break;
|
||||
case Qt.LeftEdge:
|
||||
case Qt.TopEdge:
|
||||
default:
|
||||
mainAnim.to = 0;
|
||||
break;
|
||||
}
|
||||
mainAnim.running = true;
|
||||
mainFlickable.open = true;
|
||||
}
|
||||
function close () {
|
||||
switch (root.edge) {
|
||||
case Qt.RightEdge:
|
||||
case Qt.BottomEdge:
|
||||
mainAnim.to = 0;
|
||||
break;
|
||||
case Qt.LeftEdge:
|
||||
mainAnim.to = drawerPage.width;
|
||||
break;
|
||||
case Qt.TopEdge:
|
||||
mainAnim.to = drawerPage.height;
|
||||
break;
|
||||
}
|
||||
mainAnim.running = true;
|
||||
mainFlickable.open = false;
|
||||
}
|
||||
|
||||
Item {
|
||||
id: mainPage
|
||||
anchors.fill: parent
|
||||
onChildrenChanged: mainPage.children[0].anchors.fill = mainPage
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "black"
|
||||
opacity: 0.6 * mainFlickable.internalPosition
|
||||
}
|
||||
|
||||
|
||||
NumberAnimation {
|
||||
id: mainAnim
|
||||
target: mainFlickable
|
||||
properties: (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) ? "contentX" : "contentY"
|
||||
duration: Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: edgeMouse
|
||||
anchors {
|
||||
right: root.edge == Qt.LeftEdge ? undefined : parent.right
|
||||
left: root.edge == Qt.RightEdge ? undefined : parent.left
|
||||
top: root.edge == Qt.BottomEdge ? undefined : parent.top
|
||||
bottom: root.edge == Qt.TopEdge ? undefined : parent.bottom
|
||||
}
|
||||
z: 99
|
||||
width: Units.smallSpacing * 2
|
||||
height: Units.smallSpacing * 2
|
||||
property int startMouseX
|
||||
property real oldMouseX
|
||||
property int startMouseY
|
||||
property real oldMouseY
|
||||
property bool startDragging: false
|
||||
|
||||
onPressed: {
|
||||
if (drawerPage.children.length == 0) {
|
||||
mouse.accepted = false;
|
||||
return;
|
||||
}
|
||||
|
||||
speedSampler.restart();
|
||||
mouse.accepted = true;
|
||||
oldMouseX = startMouseX = mouse.x;
|
||||
oldMouseY = startMouseY = mouse.y;
|
||||
startDragging = false;
|
||||
}
|
||||
|
||||
onPositionChanged: {
|
||||
if (!root.contentItem) {
|
||||
mouse.accepted = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Math.abs(mouse.x - startMouseX) > root.width / 5 ||
|
||||
Math.abs(mouse.y - startMouseY) > root.height / 5) {
|
||||
startDragging = true;
|
||||
}
|
||||
if (startDragging) {
|
||||
switch (root.edge) {
|
||||
case Qt.RightEdge:
|
||||
mainFlickable.contentX = Math.min(mainItem.width - root.width, mainFlickable.contentX + oldMouseX - mouse.x);
|
||||
break;
|
||||
case Qt.LeftEdge:
|
||||
mainFlickable.contentX = Math.max(0, mainFlickable.contentX + oldMouseX - mouse.x);
|
||||
break;
|
||||
case Qt.BottomEdge:
|
||||
mainFlickable.contentY = Math.min(mainItem.height - root.height, mainFlickable.contentY + oldMouseY - mouse.y);
|
||||
break;
|
||||
case Qt.TopEdge:
|
||||
mainFlickable.contentY = Math.max(0, mainFlickable.contentY + oldMouseY - mouse.y);
|
||||
break;
|
||||
}
|
||||
}
|
||||
oldMouseX = mouse.x;
|
||||
oldMouseY = mouse.y;
|
||||
}
|
||||
onReleased: {
|
||||
speedSampler.running = false;
|
||||
if (speedSampler.speed != 0) {
|
||||
if (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) {
|
||||
mainFlickable.flick(speedSampler.speed, 0);
|
||||
} else {
|
||||
mainFlickable.flick(0, speedSampler.speed);
|
||||
}
|
||||
} else {
|
||||
if (mainFlickable.internalPosition > 0.5) {
|
||||
root.open();
|
||||
} else {
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: speedSampler
|
||||
interval: 100
|
||||
repeat: true
|
||||
property real speed
|
||||
property real oldContentX
|
||||
property real oldContentY
|
||||
onTriggered: {
|
||||
if (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) {
|
||||
speed = (mainFlickable.contentX - oldContentX) * 10;
|
||||
oldContentX = mainFlickable.contentX;
|
||||
} else {
|
||||
speed = (mainFlickable.contentY - oldContentY) * 10;
|
||||
oldContentY = mainFlickable.contentY;
|
||||
}
|
||||
}
|
||||
onRunningChanged: {
|
||||
if (running) {
|
||||
speed = 0;
|
||||
oldContentX = mainFlickable.contentX;
|
||||
oldContentY = mainFlickable.contentY;
|
||||
} else {
|
||||
if (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) {
|
||||
speed = (oldContentX - mainFlickable.contentX) * 10;
|
||||
} else {
|
||||
speed = (oldContentY - mainFlickable.contentY) * 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mainMouseArea
|
||||
anchors.fill: parent
|
||||
drag.filterChildren: true
|
||||
onClicked: {
|
||||
if ((root.edge == Qt.LeftEdge && mouse.x < drawerPage.width) ||
|
||||
(root.edge == Qt.RightEdge && mouse.x > drawerPage.x) ||
|
||||
(root.edge == Qt.TopEdge && mouse.y < drawerPage.height) ||
|
||||
(root.edge == Qt.BottomEdge && mouse.y > drawerPage.y)) {
|
||||
return;
|
||||
}
|
||||
root.clicked();
|
||||
root.close();
|
||||
}
|
||||
enabled: (root.edge == Qt.LeftEdge && !mainFlickable.atXEnd) ||
|
||||
(root.edge == Qt.RightEdge && !mainFlickable.atXBeginning) ||
|
||||
(root.edge == Qt.TopEdge && !mainFlickable.atYEnd) ||
|
||||
(root.edge == Qt.BottomEdge && !mainFlickable.atYBeginning) ||
|
||||
mainFlickable.moving
|
||||
|
||||
Flickable {
|
||||
id: mainFlickable
|
||||
property bool open
|
||||
anchors.fill: parent
|
||||
|
||||
onOpenChanged: {
|
||||
if (open) {
|
||||
root.open();
|
||||
} else {
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
enabled: parent.enabled
|
||||
flickableDirection: root.edge == Qt.LeftEdge || root.edge == Qt.RightEdge ? Flickable.HorizontalFlick : Flickable.VerticalFlick
|
||||
contentWidth: mainItem.width
|
||||
contentHeight: mainItem.height
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
property real internalPosition: {
|
||||
switch (root.edge) {
|
||||
case Qt.RightEdge:
|
||||
return mainFlickable.contentX/drawerPage.width;
|
||||
case Qt.LeftEdge:
|
||||
return 1 - (mainFlickable.contentX/drawerPage.width);
|
||||
case Qt.BottomEdge:
|
||||
return mainFlickable.contentY/drawerPage.height;
|
||||
case Qt.TopEdge:
|
||||
return 1 - (mainFlickable.contentY/drawerPage.height);
|
||||
}
|
||||
}
|
||||
onInternalPositionChanged: {
|
||||
root.position = internalPosition;
|
||||
}
|
||||
|
||||
onFlickingChanged: {
|
||||
if (!flicking) {
|
||||
if (internalPosition > 0.5) {
|
||||
root.open();
|
||||
} else {
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
onMovingChanged: {
|
||||
if (!moving) {
|
||||
flickingChanged();
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: mainItem
|
||||
width: root.width + ((root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) ? drawerPage.width : 0)
|
||||
height: root.height + ((root.edge == Qt.TopEdge || root.edge == Qt.BottomEdge) ? drawerPage.height : 0)
|
||||
onWidthChanged: {
|
||||
if (root.edge == Qt.LeftEdge) {
|
||||
mainFlickable.contentX = drawerPage.width;
|
||||
}
|
||||
}
|
||||
onHeightChanged: {
|
||||
if (root.edge == Qt.TopEdge) {
|
||||
mainFlickable.contentY = drawerPage.Height;
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: drawerPage
|
||||
anchors {
|
||||
left: root.edge != Qt.RightEdge ? parent.left : undefined
|
||||
right: root.edge != Qt.LeftEdge ? parent.right : undefined
|
||||
top: root.edge != Qt.BottomEdge ? parent.top : undefined
|
||||
bottom: root.edge != Qt.TopEdge ? parent.bottom : undefined
|
||||
}
|
||||
color: Theme.viewBackgroundColor
|
||||
clip: true
|
||||
width: root.contentItem ? Math.min(root.contentItem.implicitWidth, root.width - Units.gridUnit * 2) : 0
|
||||
height: root.contentItem ? Math.min(root.contentItem.implicitHeight, root.height - Units.gridUnit * 2) : 0
|
||||
}
|
||||
LinearGradient {
|
||||
width: Units.gridUnit/2
|
||||
height: Units.gridUnit/2
|
||||
anchors {
|
||||
right: root.edge == Qt.RightEdge ? drawerPage.left : (root.edge == Qt.LeftEdge ? undefined : parent.right)
|
||||
left: root.edge == Qt.LeftEdge ? drawerPage.right : (root.edge == Qt.RightEdge ? undefined : parent.left)
|
||||
top: root.edge == Qt.TopEdge ? drawerPage.bottom : (root.edge == Qt.BottomEdge ? undefined : parent.top)
|
||||
bottom: root.edge == Qt.BottomEdge ? drawerPage.top : (root.edge == Qt.TopEdge ? undefined : parent.bottom)
|
||||
}
|
||||
|
||||
opacity: root.position == 0 ? 0 : 1
|
||||
start: Qt.point(0, 0)
|
||||
end: (root.edge == Qt.RightEdge || root.edge == Qt.LeftEdge) ? Qt.point(Units.gridUnit/2, 0) : Qt.point(0, Units.gridUnit/2)
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0.0
|
||||
color: root.edge == Qt.LeftEdge ? Qt.rgba(0, 0, 0, 0.3) : "transparent"
|
||||
}
|
||||
GradientStop {
|
||||
position: root.edge == Qt.LeftEdge ? 0.3 : 0.7
|
||||
color: Qt.rgba(0, 0, 0, 0.15)
|
||||
}
|
||||
GradientStop {
|
||||
position: 1.0
|
||||
color: root.edge == Qt.LeftEdge ? "transparent" : Qt.rgba(0, 0, 0, 0.3)
|
||||
}
|
||||
}
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* Copyright 2015 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Layouts 1.2
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
import "private"
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
/**
|
||||
* type:PageStack
|
||||
* The page stack that this page is owned by.
|
||||
*/
|
||||
property Item pageStack
|
||||
|
||||
/**
|
||||
* Defines the toolbar contents for the page. If the page stack is set up
|
||||
* using a toolbar instance, it automatically shows the currently active
|
||||
* page's toolbar contents in the toolbar.
|
||||
*
|
||||
* The default value is null resulting in the page's toolbar to be
|
||||
* invisible when the page is active.
|
||||
*/
|
||||
property Item tools: null
|
||||
|
||||
/**
|
||||
* Defines the contextual actions for the page:
|
||||
* an easy way to assign actions in the right sliding panel
|
||||
*/
|
||||
property list<QtObject> contextualActions
|
||||
|
||||
|
||||
Layout.fillWidth: true
|
||||
color: "transparent"
|
||||
}
|
|
@ -1,513 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2012 Marco Martin <mart@kde.org>
|
||||
**
|
||||
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the Qt Components project.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
|
||||
** the names of its contributors may be used to endorse or promote
|
||||
** products derived from this software without specific prior written
|
||||
** permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.0
|
||||
import QtQuick.Layouts 1.2
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
|
||||
import "private/PageStack.js" as Engine
|
||||
|
||||
Item {
|
||||
id: actualRoot
|
||||
|
||||
width: parent ? parent.width : 0
|
||||
height: parent ? parent.height : 0
|
||||
|
||||
|
||||
property int depth: Engine.getDepth()
|
||||
property Item currentPage: null
|
||||
property Item lastVisiblePage: currentPage
|
||||
property ToolBar toolBar
|
||||
property variant initialPage
|
||||
//A column is wide enough for 30 characters
|
||||
property int columnWidth: Math.round(parent.width/(Units.gridUnit*30)) > 0 ? parent.width/Math.round(parent.width/(Units.gridUnit*30)) : width
|
||||
property alias clip: scrollArea.clip
|
||||
|
||||
// Indicates whether there is an ongoing page transition.
|
||||
property bool busy: internal.ongoingTransitionCount > 0
|
||||
|
||||
// Pushes a page on the stack.
|
||||
// The page can be defined as a component, item or string.
|
||||
// If an item is used then the page will get re-parented.
|
||||
// If a string is used then it is interpreted as a url that is used to load a page component.
|
||||
//
|
||||
// The page can also be given as an array of pages. In this case all those pages will be pushed
|
||||
// onto the stack. The items in the stack can be components, items or strings just like for single
|
||||
// pages. Additionally an object can be used, which specifies a page and an optional properties
|
||||
// property. This can be used to push multiple pages while still giving each of them properties.
|
||||
// When an array is used the transition animation will only be to the last page.
|
||||
//
|
||||
// The properties argument is optional and allows defining a map of properties to set on the page.
|
||||
// If the immediate argument is true then no transition animation is performed.
|
||||
// Returns the page instance.
|
||||
function push(page, properties, immediate)
|
||||
{
|
||||
pop(lastVisiblePage, true);
|
||||
scrollAnimation.running = false;
|
||||
var item = Engine.push(page, properties, false, immediate)
|
||||
scrollToLevel(depth)
|
||||
return item
|
||||
}
|
||||
|
||||
// Pops a page off the stack.
|
||||
// If page is specified then the stack is unwound to that page, to unwind to the first page specify
|
||||
// page as null. If the immediate argument is true then no transition animation is performed.
|
||||
// Returns the page instance that was popped off the stack.
|
||||
function pop(page, immediate)
|
||||
{
|
||||
scrollToLevel(depth-1);
|
||||
return Engine.pop(page, immediate);
|
||||
}
|
||||
|
||||
// Replaces a page on the stack.
|
||||
// See push() for details.
|
||||
function replace(page, properties, immediate)
|
||||
{
|
||||
pop(lastVisiblePage, true);
|
||||
scrollAnimation.running = false;
|
||||
var item = Engine.push(page, properties, true, immediate);
|
||||
scrollToLevel(depth)
|
||||
return item
|
||||
}
|
||||
|
||||
// Clears the page stack.
|
||||
function clear()
|
||||
{
|
||||
return Engine.clear();
|
||||
}
|
||||
|
||||
// Iterates through all pages (top to bottom) and invokes the specified function.
|
||||
// If the specified function returns true the search stops and the find function
|
||||
// returns the page that the iteration stopped at. If the search doesn't result
|
||||
// in any page being found then null is returned.
|
||||
function find(func)
|
||||
{
|
||||
return Engine.find(func);
|
||||
}
|
||||
|
||||
// Scroll the view to have the page of the given level as first item
|
||||
function scrollToLevel(level)
|
||||
{
|
||||
if (level < 0 || level > depth || root.width < width) {
|
||||
return
|
||||
}
|
||||
|
||||
var firstLevel = Math.max(0, level - mainFlickable.width/columnWidth + 1);
|
||||
scrollAnimation.to = Math.max(0, Math.min(Math.max(0, columnWidth * (firstLevel - 1)), mainFlickable.contentWidth));
|
||||
scrollAnimation.running = true;
|
||||
}
|
||||
|
||||
SequentialAnimation {
|
||||
id: scrollAnimation
|
||||
property alias to: actualScrollAnimation.to
|
||||
NumberAnimation {
|
||||
id: actualScrollAnimation
|
||||
target: mainFlickable
|
||||
properties: "contentX"
|
||||
duration: internal.transitionDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
ScriptAction {
|
||||
script: {
|
||||
//At startup sometimes the contentX is NaN for an instant
|
||||
if (isNaN(mainFlickable.contentX)) {
|
||||
return;
|
||||
}
|
||||
|
||||
actualRoot.lastVisiblePage = root.children[Math.floor((mainFlickable.contentX + mainFlickable.width - 1)/columnWidth)].page;
|
||||
if (!actualRoot.lastVisiblePage) {
|
||||
actualRoot.lastVisiblePage = actualRoot.currentPage;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Called when the page stack visibility changes.
|
||||
onVisibleChanged: {
|
||||
if (currentPage) {
|
||||
if (visible)
|
||||
currentPage.visible = currentPage.parent.visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
onInitialPageChanged: {
|
||||
if (!internal.completed) {
|
||||
return
|
||||
}
|
||||
|
||||
if (initialPage) {
|
||||
if (depth == 0) {
|
||||
push(initialPage, null, true)
|
||||
} else if (depth == 1) {
|
||||
replace(initialPage, null, true)
|
||||
} else {
|
||||
console.log("Cannot update PageStack.initialPage")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onWidthChanged: {
|
||||
var firstLevel = Math.max(0, depth - mainFlickable.width/columnWidth + 1);
|
||||
mainFlickable.contentX = Math.max(0, Math.min(Math.max(0, columnWidth * (firstLevel - 1)), mainFlickable.contentWidth));
|
||||
}
|
||||
Component.onCompleted: {
|
||||
internal.completed = true
|
||||
if (initialPage && depth == 0)
|
||||
push(initialPage, null, true)
|
||||
}
|
||||
|
||||
QtObject {
|
||||
id: internal
|
||||
|
||||
// The number of ongoing transitions.
|
||||
property int ongoingTransitionCount: 0
|
||||
|
||||
//FIXME: there should be a way to access to theh without storing it in an ugly way
|
||||
property bool completed: false
|
||||
|
||||
// Duration of transition animation (in ms)
|
||||
property int transitionDuration: Units.longDuration
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
id: scrollArea
|
||||
anchors.fill: parent
|
||||
Flickable {
|
||||
id: mainFlickable
|
||||
anchors.fill: parent
|
||||
interactive: root.width > width
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
contentWidth: root.width
|
||||
contentHeight: height
|
||||
Row {
|
||||
id: root
|
||||
spacing: -Units.gridUnit * 8
|
||||
width: Math.max((depth-1+children[children.length-1].takenColumns) * columnWidth, childrenRect.width - Units.gridUnit * 8)
|
||||
|
||||
height: parent.height
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
duration: internal.transitionDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
onMovementEnded: {
|
||||
scrollToLevel(Math.round(contentX/columnWidth)+1)
|
||||
}
|
||||
onFlickEnded: {
|
||||
movementEnded();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Component for page containers.
|
||||
Component {
|
||||
id: containerComponent
|
||||
|
||||
Item {
|
||||
id: container
|
||||
|
||||
implicitWidth: actualContainer.width + Units.gridUnit * 8
|
||||
width: implicitWidth
|
||||
height: parent ? parent.height : 0
|
||||
|
||||
x: 0
|
||||
|
||||
// The actual parent of page: page will anchor to that
|
||||
property Item pageParent: actualContainer
|
||||
|
||||
property int pageDepth: 0
|
||||
Component.onCompleted: {
|
||||
pageDepth = Engine.getDepth() + 1
|
||||
container.z = -Engine.getDepth()
|
||||
}
|
||||
|
||||
// The states correspond to the different possible positions of the container.
|
||||
state: "Hidden"
|
||||
|
||||
// The page held by this container.
|
||||
property Item page: null
|
||||
|
||||
// The owner of the page.
|
||||
property Item owner: null
|
||||
|
||||
// The width of the longer stack dimension
|
||||
property int stackWidth: Math.max(actualRoot.width, actualRoot.height)
|
||||
|
||||
|
||||
// Flag that indicates the container should be cleaned up after the transition has ended.
|
||||
property bool cleanupAfterTransition: false
|
||||
|
||||
// Flag that indicates if page transition animation is running
|
||||
property bool transitionAnimationRunning: false
|
||||
|
||||
// State to be set after previous state change animation has finished
|
||||
property string pendingState: "none"
|
||||
|
||||
//how many columns take the page?
|
||||
property alias takenColumns: actualContainer.takenColumns
|
||||
|
||||
// Ensures that transition finish actions are executed
|
||||
// in case the object is destroyed before reaching the
|
||||
// end state of an ongoing transition
|
||||
Component.onDestruction: {
|
||||
if (transitionAnimationRunning)
|
||||
transitionEnded();
|
||||
}
|
||||
|
||||
Item {
|
||||
id: actualContainer
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
right: parent.right
|
||||
rightMargin: Units.gridUnit * 8
|
||||
}
|
||||
|
||||
property int takenColumns: {
|
||||
if (container.page && container.page.Layout && container.page.Layout.fillWidth) {
|
||||
return Math.max(1, Math.round(actualRoot.width/columnWidth)-(container.x > 0 ? 1: 0));
|
||||
} else {
|
||||
return Math.max(1, Math.round(container.page ? container.page.implicitWidth/columnWidth : 1));
|
||||
}
|
||||
}
|
||||
|
||||
width: (container.pageDepth >= actualRoot.depth ? Math.min(actualRoot.width, takenColumns*columnWidth) : columnWidth)
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
right: actualContainer.right
|
||||
}
|
||||
width: 1
|
||||
color: Theme.textColor
|
||||
opacity: 0.3
|
||||
visible: container.pageDepth < actualRoot.depth
|
||||
}
|
||||
|
||||
// Sets pending state as current if state change is delayed
|
||||
onTransitionAnimationRunningChanged: {
|
||||
if (!transitionAnimationRunning && pendingState != "none") {
|
||||
state = pendingState;
|
||||
pendingState = "none";
|
||||
}
|
||||
}
|
||||
|
||||
// Handles state change depening on transition animation status
|
||||
function setState(newState)
|
||||
{
|
||||
if (transitionAnimationRunning)
|
||||
pendingState = newState;
|
||||
else
|
||||
state = newState;
|
||||
}
|
||||
|
||||
// Performs a push enter transition.
|
||||
function pushEnter(immediate, orientationChanges)
|
||||
{
|
||||
if (!immediate) {
|
||||
setState("Right");
|
||||
}
|
||||
setState("");
|
||||
page.visible = true;
|
||||
}
|
||||
|
||||
// Performs a push exit transition.
|
||||
function pushExit(replace, immediate, orientationChanges)
|
||||
{
|
||||
if (replace) {
|
||||
setState(immediate ? "Hidden" : "Left");
|
||||
}
|
||||
|
||||
if (replace) {
|
||||
if (immediate)
|
||||
cleanup();
|
||||
else
|
||||
cleanupAfterTransition = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Performs a pop enter transition.
|
||||
function popEnter(immediate, orientationChanges)
|
||||
{
|
||||
setState("");
|
||||
page.visible = true;
|
||||
}
|
||||
|
||||
// Performs a pop exit transition.
|
||||
function popExit(immediate, orientationChanges)
|
||||
{
|
||||
setState(immediate ? "Hidden" : "Left");
|
||||
|
||||
if (immediate)
|
||||
cleanup();
|
||||
else
|
||||
cleanupAfterTransition = true;
|
||||
}
|
||||
|
||||
// Called when a transition has started.
|
||||
function transitionStarted()
|
||||
{
|
||||
container.clip = true
|
||||
transitionAnimationRunning = true;
|
||||
internal.ongoingTransitionCount++;
|
||||
}
|
||||
|
||||
// Called when a transition has ended.
|
||||
function transitionEnded()
|
||||
{
|
||||
container.clip = false
|
||||
if (state != "")
|
||||
state = "Hidden";
|
||||
|
||||
internal.ongoingTransitionCount--;
|
||||
transitionAnimationRunning = false;
|
||||
|
||||
if (cleanupAfterTransition) {
|
||||
cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
states: [
|
||||
// Explicit properties for default state.
|
||||
State {
|
||||
name: ""
|
||||
PropertyChanges { target: container; visible: true; opacity: 1 }
|
||||
PropertyChanges { target: container; width: container.implicitWidth}
|
||||
},
|
||||
// Start state for pop entry, end state for push exit.
|
||||
State {
|
||||
name: "Left"
|
||||
PropertyChanges { target: container; opacity: 0 }
|
||||
PropertyChanges { target: container; width: Units.gridUnit * 8}
|
||||
},
|
||||
// Start state for push entry, end state for pop exit.
|
||||
State {
|
||||
name: "Right"
|
||||
PropertyChanges { target: container; opacity: 0 }
|
||||
PropertyChanges { target: container; width: Units.gridUnit * 8}
|
||||
},
|
||||
// Inactive state.
|
||||
State {
|
||||
name: "Hidden"
|
||||
PropertyChanges { target: container; visible: false }
|
||||
PropertyChanges { target: container; width: container.implicitWidth}
|
||||
}
|
||||
]
|
||||
|
||||
transitions: [
|
||||
// Push exit transition
|
||||
Transition {
|
||||
from: ""; to: "Left"
|
||||
SequentialAnimation {
|
||||
ScriptAction { script: transitionStarted() }
|
||||
ParallelAnimation {
|
||||
PropertyAnimation { properties: "width"; easing.type: Easing.InQuad; duration: internal.transitionDuration }
|
||||
PropertyAnimation { properties: "opacity"; easing.type: Easing.InQuad; duration: internal.transitionDuration }
|
||||
}
|
||||
ScriptAction { script: transitionEnded() }
|
||||
}
|
||||
},
|
||||
// Pop entry transition
|
||||
Transition {
|
||||
from: "Left"; to: ""
|
||||
SequentialAnimation {
|
||||
ScriptAction { script: transitionStarted() }
|
||||
ParallelAnimation {
|
||||
PropertyAnimation { properties: "width"; easing.type: Easing.OutQuad; duration: internal.transitionDuration }
|
||||
PropertyAnimation { properties: "opacity"; easing.type: Easing.InQuad; duration: internal.transitionDuration }
|
||||
}
|
||||
ScriptAction { script: transitionEnded() }
|
||||
}
|
||||
},
|
||||
// Pop exit transition
|
||||
Transition {
|
||||
from: ""; to: "Right"
|
||||
SequentialAnimation {
|
||||
ScriptAction { script: transitionStarted() }
|
||||
ParallelAnimation {
|
||||
PropertyAnimation { properties: "width"; easing.type: Easing.InQuad; duration: internal.transitionDuration }
|
||||
PropertyAnimation { properties: "opacity"; easing.type: Easing.InQuad; duration: internal.transitionDuration }
|
||||
}
|
||||
// Workaround for transition animation bug causing ghost view with page pop transition animation
|
||||
// TODO: Root cause still unknown
|
||||
PropertyAnimation {}
|
||||
ScriptAction { script: transitionEnded() }
|
||||
}
|
||||
},
|
||||
// Push entry transition
|
||||
Transition {
|
||||
from: "Right"; to: ""
|
||||
SequentialAnimation {
|
||||
ScriptAction { script: transitionStarted() }
|
||||
ParallelAnimation {
|
||||
PropertyAnimation { properties: "width"; easing.type: Easing.OutQuad; duration: internal.transitionDuration }
|
||||
PropertyAnimation { properties: "opacity"; easing.type: Easing.InQuad; duration: internal.transitionDuration }
|
||||
}
|
||||
ScriptAction { script: transitionEnded() }
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
// Cleans up the container and then destroys it.
|
||||
function cleanup()
|
||||
{
|
||||
if (page != null) {
|
||||
if (owner != container) {
|
||||
// container is not the owner of the page - re-parent back to original owner
|
||||
page.visible = false;
|
||||
page.anchors.fill = undefined
|
||||
page.parent = owner;
|
||||
}
|
||||
}
|
||||
container.parent = null;
|
||||
container.visible = false;
|
||||
destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,234 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtGraphicalEffects 1.0
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
import "private"
|
||||
|
||||
/**Documented API
|
||||
Inherits:
|
||||
Item
|
||||
|
||||
Imports:
|
||||
QtQuick 2.1
|
||||
|
||||
Description:
|
||||
Split Drawers are used to expose additional UI elements which are optional and can be used in conjunction with the main UI elements. For example the Resource Browser uses a Split Drawer to select different kinds of filters for the main view.
|
||||
|
||||
Properties:
|
||||
bool open:
|
||||
If true the drawer is open showing the contents of the "drawer" component.
|
||||
|
||||
Item page:
|
||||
It's the default property. it's the main content of the drawer page, the part that is always shown
|
||||
|
||||
Item drawer:
|
||||
It's the part that can be pulled in and out, will act as a sidebar.
|
||||
|
||||
int visibleDrawerWidth: the width of the visible portion of the drawer: it updates while dragging or animating
|
||||
**/
|
||||
AbstractDrawer {
|
||||
id: root
|
||||
anchors {
|
||||
fill: parent
|
||||
}
|
||||
visible: true
|
||||
|
||||
default property alias page: mainPage.data
|
||||
property Item contentItem
|
||||
property alias opened: sidebar.open
|
||||
property int visibleDrawerWidth: browserFrame.x
|
||||
|
||||
Component.onCompleted: {
|
||||
mainPage.width = browserFrame.width
|
||||
}
|
||||
|
||||
onContentItemChanged: contentItem.parent = drawerPage
|
||||
MouseArea {
|
||||
id: mouseEventListener
|
||||
z: 200
|
||||
drag.filterChildren: true
|
||||
//drag.target: browserFrame
|
||||
property int startMouseX
|
||||
property int oldMouseX
|
||||
property int startBrowserFrameX
|
||||
property bool toggle: false
|
||||
property string startState
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
onPressed: {
|
||||
if (drawerPage.children.length == 0 || (browserFrame.state == "Closed" && mouse.x > Units.gridUnit) ||
|
||||
mouse.x < browserFrame.x) {
|
||||
mouse.accepted = false;
|
||||
return;
|
||||
}
|
||||
|
||||
toggle = true;
|
||||
startBrowserFrameX = browserFrame.x;
|
||||
oldMouseX = startMouseX = mouse.x;
|
||||
startState = browserFrame.state;
|
||||
browserFrame.state = "Dragging";
|
||||
browserFrame.x = startBrowserFrameX;
|
||||
}
|
||||
|
||||
onPositionChanged: {
|
||||
browserFrame.x = Math.max(0, browserFrame.x + mouse.x - oldMouseX);
|
||||
oldMouseX = mouse.x;
|
||||
if (Math.abs(mouse.x - startMouseX) > Units.gridUnit * 2) {
|
||||
toggle = false;
|
||||
}
|
||||
}
|
||||
|
||||
onReleased: {
|
||||
if (toggle) {
|
||||
browserFrame.state = startState == "Open" ? "Closed" : "Open"
|
||||
} else if (browserFrame.x < sidebar.width / 2) {
|
||||
browserFrame.state = "Closed";
|
||||
} else {
|
||||
browserFrame.state = "Open";
|
||||
}
|
||||
}
|
||||
onClicked: root.clicked()
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: browserFrame
|
||||
z: 100
|
||||
color: Theme.backgroundColor
|
||||
state: "Closed"
|
||||
onStateChanged: sidebar.open = (state != "Closed")
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
}
|
||||
width: root.width;
|
||||
|
||||
Item {
|
||||
id: mainPage
|
||||
onChildrenChanged: mainPage.children[0].anchors.fill = mainPage
|
||||
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "black"
|
||||
opacity: Math.min(0.4, 0.4 * (browserFrame.x / sidebar.width))
|
||||
}
|
||||
LinearGradient {
|
||||
width: Units.gridUnit/2
|
||||
anchors {
|
||||
right: parent.left
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
rightMargin: -1
|
||||
}
|
||||
start: Qt.point(0, 0)
|
||||
end: Qt.point(Units.gridUnit/2, 0)
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0.0
|
||||
color: "transparent"
|
||||
}
|
||||
GradientStop {
|
||||
position: 0.7
|
||||
color: Qt.rgba(0, 0, 0, 0.15)
|
||||
}
|
||||
GradientStop {
|
||||
position: 1.0
|
||||
color: Qt.rgba(0, 0, 0, 0.3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "Open"
|
||||
PropertyChanges {
|
||||
target: browserFrame
|
||||
x: sidebar.width
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "Dragging"
|
||||
PropertyChanges {
|
||||
target: browserFrame
|
||||
x: mouseEventListener.startBrowserFrameX
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "Closed"
|
||||
PropertyChanges {
|
||||
target: browserFrame
|
||||
x: 0
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
//Exclude Dragging
|
||||
to: "Open,Closed,Hidden"
|
||||
NumberAnimation {
|
||||
properties: "x"
|
||||
duration: Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Item {
|
||||
id: sidebar
|
||||
|
||||
property bool open: false
|
||||
onOpenChanged: {
|
||||
if (drawerPage.children.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (open) {
|
||||
browserFrame.state = "Open";
|
||||
} else {
|
||||
browserFrame.state = "Closed";
|
||||
}
|
||||
}
|
||||
|
||||
width: Math.min(parent.width/4*3, Math.max(root.contentItem ? root.contentItem.implicitWidth : 0, parent.width/4))
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
Item {
|
||||
id: drawerPage
|
||||
anchors.fill: parent
|
||||
clip: false
|
||||
onChildrenChanged: drawerPage.children[0].anchors.fill = drawerPage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/*
|
||||
* Copyright 2015 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.4
|
||||
|
||||
pragma Singleton
|
||||
|
||||
/*!
|
||||
\qmltype Theme
|
||||
\inqmlmodule Material 0.1
|
||||
|
||||
\brief Provides access to standard colors that follow the Material Design specification.
|
||||
|
||||
See \l {http://www.google.com/design/spec/style/color.html#color-ui-color-application} for
|
||||
details about choosing a color scheme for your application.
|
||||
*/
|
||||
QtObject {
|
||||
id: theme
|
||||
|
||||
property color textColor: Qt.rgba(0,0,0, 0.54)
|
||||
|
||||
property color highlightColor: "#2196F3"
|
||||
property color backgroundColor: "#eff0f1"
|
||||
property color linkColor: "#2196F3"
|
||||
property color visitedLinkColor: "#2196F3"
|
||||
|
||||
property color buttonTextColor: Qt.rgba(0,0,0, 0.54)
|
||||
property color buttonBackgroundColor: "#eff0f1"
|
||||
property color buttonHoverColor: "#2196F3"
|
||||
property color buttonFocusColor: "#2196F3"
|
||||
|
||||
property color viewTextColor: Qt.rgba(0,0,0, 0.54)
|
||||
property color viewBackgroundColor: "#fcfcfc"
|
||||
property color viewHoverColor: "#2196F3"
|
||||
property color viewFocusColor: "#2196F3"
|
||||
|
||||
property color complementaryTextColor: "#f3f3f3"
|
||||
property color complementaryBackgroundColor: Qt.rgba(0,0,0, 0.54)
|
||||
property color complementaryHoverColor: "#2196F3"
|
||||
property color complementaryFocusColor: "#2196F3"
|
||||
|
||||
property font defaultFont: fontMetrics.font
|
||||
|
||||
property variant fontMetrics: TextMetrics {}
|
||||
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
/*
|
||||
* Copyright 2015 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.4
|
||||
import QtQuick.Window 2.2
|
||||
|
||||
pragma Singleton
|
||||
|
||||
|
||||
QtObject {
|
||||
id: units
|
||||
|
||||
/**
|
||||
* The fundamental unit of space that should be used for sizes, expressed in pixels.
|
||||
* Given the screen has an accurate DPI settings, it corresponds to a width of
|
||||
* the capital letter M
|
||||
*/
|
||||
property int gridUnit: fontMetrics.height
|
||||
|
||||
/**
|
||||
* units.iconSizes provides access to platform-dependent icon sizing
|
||||
*
|
||||
* The icon sizes provided are normalized for different DPI, so icons
|
||||
* will scale depending on the DPI.
|
||||
*
|
||||
* Icon sizes from KIconLoader, adjusted to devicePixelRatio:
|
||||
* * small
|
||||
* * smallMedium
|
||||
* * medium
|
||||
* * large
|
||||
* * huge
|
||||
* * enormous
|
||||
*
|
||||
* Not devicePixelRation-adjusted::
|
||||
* * desktop
|
||||
*/
|
||||
property QtObject iconSizes: QtObject {
|
||||
property int small: 16 * devicePixelRatio
|
||||
property int smallMedium: 22 * devicePixelRatio
|
||||
property int medium: 32 * devicePixelRatio
|
||||
property int large: 48 * devicePixelRatio
|
||||
property int huge: 64 * devicePixelRatio
|
||||
property int enormous: 128 * devicePixelRatio
|
||||
}
|
||||
|
||||
/**
|
||||
* units.smallSpacing is the amount of spacing that should be used around smaller UI elements,
|
||||
* for example as spacing in Columns. Internally, this size depends on the size of
|
||||
* the default font as rendered on the screen, so it takes user-configured font size and DPI
|
||||
* into account.
|
||||
*/
|
||||
property int smallSpacing: gridUnit/4
|
||||
|
||||
/**
|
||||
* units.largeSpacing is the amount of spacing that should be used inside bigger UI elements,
|
||||
* for example between an icon and the corresponding text. Internally, this size depends on
|
||||
* the size of the default font as rendered on the screen, so it takes user-configured font
|
||||
* size and DPI into account.
|
||||
*/
|
||||
property int largeSpacing: gridUnit
|
||||
|
||||
/**
|
||||
* The ratio between physical and device-independent pixels. This value does not depend on the \
|
||||
* size of the configured font. If you want to take font sizes into account when scaling elements,
|
||||
* use theme.mSize(theme.defaultFont), units.smallSpacing and units.largeSpacing.
|
||||
* The devicePixelRatio follows the definition of "device independent pixel" by Microsoft.
|
||||
*/
|
||||
property real devicePixelRatio: fontMetrics.height / fontMetrics.font.pointSize
|
||||
|
||||
/**
|
||||
* units.longDuration should be used for longer, screen-covering animations, for opening and
|
||||
* closing of dialogs and other "not too small" animations
|
||||
*/
|
||||
property int longDuration: 250
|
||||
|
||||
/**
|
||||
* units.shortDuration should be used for short animations, such as accentuating a UI event,
|
||||
* hover events, etc..
|
||||
*/
|
||||
property int shortDuration: 150
|
||||
|
||||
property variant fontMetrics: TextMetrics {
|
||||
text: "M"
|
||||
}
|
||||
}
|
|
@ -1,122 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="24" height="24" id="svg3869" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="dialog-cancel.svg">
|
||||
<defs id="defs3871">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#4d4d4d;
|
||||
}
|
||||
.ColorScheme-Background {
|
||||
color:#eff0f1;
|
||||
}
|
||||
.ColorScheme-Highlight {
|
||||
color:#3daee9;
|
||||
}
|
||||
.ColorScheme-ViewText {
|
||||
color:#31363b;
|
||||
}
|
||||
.ColorScheme-ViewBackground {
|
||||
color:#fcfcfc;
|
||||
}
|
||||
.ColorScheme-ViewHover {
|
||||
color:#93cee9;
|
||||
}
|
||||
.ColorScheme-ViewFocus{
|
||||
color:#3daee9;
|
||||
}
|
||||
.ColorScheme-ButtonText {
|
||||
color:#31363b;
|
||||
}
|
||||
.ColorScheme-ButtonBackground {
|
||||
color:#eff0f1;
|
||||
}
|
||||
.ColorScheme-ButtonHover {
|
||||
color:#93cee9;
|
||||
}
|
||||
.ColorScheme-ButtonFocus{
|
||||
color:#3daee9;
|
||||
}
|
||||
</style>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4090"/>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath16">
|
||||
<path d="m 0,706.465 1490.926,0 L 1490.926,0 0,0 0,706.465 Z" id="path18"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath24">
|
||||
<path d="m 22.1953,686.117 1447.7347,0 0,-667.1902 -1447.7347,0 L 22.1953,686.117 Z" id="path26"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4534">
|
||||
<rect ry="15.999986" y="8.0000038" x="8.0000114" height="31.999971" width="31.999989" id="rect4536" style="fill:url(#linearGradient4538);fill-opacity:1;stroke:none"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4584">
|
||||
<rect ry="15.999986" y="507.798" x="392.57144" height="31.999971" width="31.999989" id="rect4586" style="fill:url(#linearGradient4588);fill-opacity:1;stroke:none"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4550">
|
||||
<rect ry="15.999986" y="507.798" x="392.57144" height="31.999971" width="31.999989" id="rect4552" style="fill:url(#linearGradient4554);fill-opacity:1;stroke:none"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4568">
|
||||
<rect ry="15.999986" y="507.798" x="392.57144" height="31.999971" width="31.999989" id="rect4570" style="fill:url(#linearGradient4572);fill-opacity:1;stroke:none"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4528">
|
||||
<rect ry="15.999986" y="8.0000038" x="8.0000114" height="31.999971" width="31.999989" id="rect4530" style="fill:url(#linearGradient4532);fill-opacity:1;stroke:none"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4578">
|
||||
<rect ry="15.999986" y="507.798" x="392.57144" height="31.999971" width="31.999989" id="rect4580" style="fill:url(#linearGradient4582);fill-opacity:1;stroke:none"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4562">
|
||||
<rect ry="15.999986" y="507.798" x="392.57144" height="31.999971" width="31.999989" id="rect4564" style="fill:url(#linearGradient4566);fill-opacity:1;stroke:none"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4544">
|
||||
<rect ry="15.999986" y="507.798" x="392.57144" height="31.999971" width="31.999989" id="rect4546" style="fill:url(#linearGradient4548);fill-opacity:1;stroke:none"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4390">
|
||||
<rect ry="15.999986" y="8.0000038" x="8.0000114" height="31.999971" width="31.999989" id="rect4392" style="fill:url(#linearGradient4532);fill-opacity:1;stroke:none"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4407">
|
||||
<rect ry="15.999986" y="507.798" x="392.57144" height="31.999971" width="31.999989" id="rect4409" style="fill:url(#linearGradient4582);fill-opacity:1;stroke:none"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4424">
|
||||
<rect ry="15.999986" y="507.798" x="392.57144" height="31.999971" width="31.999989" id="rect4426" style="fill:url(#linearGradient4566);fill-opacity:1;stroke:none"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4441">
|
||||
<rect ry="15.999986" y="507.798" x="392.57144" height="31.999971" width="31.999989" id="rect4443" style="fill:url(#linearGradient4548);fill-opacity:1;stroke:none"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath4528-1" clipPathUnits="userSpaceOnUse">
|
||||
<rect style="fill:url(#linearGradient4532);fill-opacity:1;stroke:none" id="rect4530-7" width="31.999989" height="31.999971" x="8.0000114" y="8.0000038" ry="15.999986"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath4578-8" clipPathUnits="userSpaceOnUse">
|
||||
<rect style="fill:url(#linearGradient4582);fill-opacity:1;stroke:none" id="rect4580-7" width="31.999989" height="31.999971" x="392.57144" y="507.798" ry="15.999986"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath4562-8" clipPathUnits="userSpaceOnUse">
|
||||
<rect style="fill:url(#linearGradient4566);fill-opacity:1;stroke:none" id="rect4564-8" width="31.999989" height="31.999971" x="392.57144" y="507.798" ry="15.999986"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath4544-1" clipPathUnits="userSpaceOnUse">
|
||||
<rect style="fill:url(#linearGradient4548);fill-opacity:1;stroke:none" id="rect4546-1" width="31.999989" height="31.999971" x="392.57144" y="507.798" ry="15.999986"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="22.627416" inkscape:cx="11.061087" inkscape:cy="12.032563" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:window-width="1366" inkscape:window-height="709" inkscape:window-x="-4" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:showpageshadow="false" inkscape:object-nodes="true" inkscape:snap-bbox="true">
|
||||
<inkscape:grid type="xygrid" id="grid4132"/>
|
||||
<sodipodi:guide position="4,18" orientation="18,0" id="guide4138"/>
|
||||
<sodipodi:guide position="5,3" orientation="0,18" id="guide4140"/>
|
||||
<sodipodi:guide position="20,2.0000174" orientation="-18,0" id="guide4142"/>
|
||||
<sodipodi:guide position="2,21" orientation="0,-18" id="guide4144"/>
|
||||
<sodipodi:guide position="3,19.000017" orientation="16,0" id="guide4146"/>
|
||||
<sodipodi:guide position="2,4" orientation="0,16" id="guide4148"/>
|
||||
<sodipodi:guide position="21,20" orientation="-16,0" id="guide4150"/>
|
||||
<sodipodi:guide position="2,20" orientation="0,-16" id="guide4152"/>
|
||||
</sodipodi:namedview>
|
||||
<metadata id="metadata3874">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g inkscape:label="Capa 1" inkscape:groupmode="layer" id="layer1" transform="translate(-326,-532.3622)">
|
||||
<g transform="translate(-224.28572,-74.2857)" id="layer1-6" inkscape:label="Capa 1">
|
||||
<path id="rect4203" transform="translate(550.28572,606.6479)" d="M 12,4 C 9.9724023,4 8.1286798,4.7566937 6.71875,6 6.592511,6.1113202 6.4627201,6.2247799 6.34375,6.34375 L 6,6.71875 C 4.7566937,8.1286798 4,9.9724023 4,12 c 0,4.41828 3.58172,8 8,8 2.027598,0 3.87132,-0.756694 5.28125,-2 l 0.375,-0.34375 C 17.77522,17.53728 17.88868,17.407489 18,17.28125 19.243306,15.87132 20,14.027598 20,12 20,7.58172 16.41828,4 12,4 Z m 0,1 c 3.86599,0 7,3.13401 7,7 0,1.75366 -0.653215,3.334268 -1.71875,4.5625 L 7.4375,6.71875 C 8.6657315,5.6532151 10.24634,5 12,5 Z M 6.71875,7.4375 16.5625,17.28125 C 15.334268,18.346785 13.75366,19 12,19 8.13401,19 5,15.86599 5,12 5,10.24634 5.6532151,8.6657315 6.71875,7.4375 Z" style="fill:currentColor;fill-opacity:1;stroke:none" inkscape:connector-curvature="0" class="ColorScheme-Text"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 8.5 KiB |
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="22"
|
||||
height="22"
|
||||
id="svg3813"
|
||||
version="1.1"
|
||||
inkscape:version="0.48+devel r"
|
||||
sodipodi:docname="distribute-horizontal-x.svg">
|
||||
<defs
|
||||
id="defs3815" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="26.930216"
|
||||
inkscape:cx="9.6140302"
|
||||
inkscape:cy="11.263762"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="668"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="23"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:showpageshadow="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4109" />
|
||||
<sodipodi:guide
|
||||
position="2.0000072,19.999993"
|
||||
orientation="18,0"
|
||||
id="guide4115" />
|
||||
<sodipodi:guide
|
||||
position="2.0000072,1.9999929"
|
||||
orientation="0,18"
|
||||
id="guide4117" />
|
||||
<sodipodi:guide
|
||||
position="20.000007,1.9999929"
|
||||
orientation="-18,0"
|
||||
id="guide4119" />
|
||||
<sodipodi:guide
|
||||
position="20.000007,19.999993"
|
||||
orientation="0,-18"
|
||||
id="guide4121" />
|
||||
<sodipodi:guide
|
||||
position="3.0000072,18.999993"
|
||||
orientation="16,0"
|
||||
id="guide4123" />
|
||||
<sodipodi:guide
|
||||
position="3.0000072,2.9999929"
|
||||
orientation="0,16"
|
||||
id="guide4125" />
|
||||
<sodipodi:guide
|
||||
position="19.000007,2.9999929"
|
||||
orientation="-16,0"
|
||||
id="guide4127" />
|
||||
<sodipodi:guide
|
||||
position="19.000007,18.999993"
|
||||
orientation="0,-16"
|
||||
id="guide4129" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata3818">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Capa 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-378.85714,-540.07647)">
|
||||
<path
|
||||
style="opacity:1;fill:#4d4d4d;fill-opacity:1;stroke:none"
|
||||
d="M 3 7 L 3 15 L 8 15 L 8 7 L 3 7 z M 14 7 L 14 15 L 19 15 L 19 7 L 14 7 z M 4 8 L 7 8 L 7 14 L 4 14 L 4 8 z M 15 8 L 18 8 L 18 14 L 15 14 L 15 8 z M 9 9 L 9 13 L 10 13 L 10 12 L 12 12 L 12 13 L 13 13 L 13 9 L 12 9 L 12 10 L 10 10 L 10 9 L 9 9 z "
|
||||
transform="translate(378.85714,540.07647)"
|
||||
id="rect4109" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 3.1 KiB |
|
@ -1,93 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32"
|
||||
height="32"
|
||||
id="svg5453"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="document-edit.svg"
|
||||
viewBox="0 0 32 32">
|
||||
<defs
|
||||
id="defs5455" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="16"
|
||||
inkscape:cx="10.68915"
|
||||
inkscape:cy="11.29602"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="957"
|
||||
inkscape:window-x="-4"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:showpageshadow="false"
|
||||
borderlayer="true"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:object-nodes="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:snap-global="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4063" />
|
||||
<sodipodi:guide
|
||||
position="4,24"
|
||||
orientation="28,0"
|
||||
id="guide4280" />
|
||||
<sodipodi:guide
|
||||
position="13,4"
|
||||
orientation="0,28"
|
||||
id="guide4282" />
|
||||
<sodipodi:guide
|
||||
position="28,25"
|
||||
orientation="-28,0"
|
||||
id="guide4284" />
|
||||
<sodipodi:guide
|
||||
position="15,28"
|
||||
orientation="0,-28"
|
||||
id="guide4286" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5458">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Capa 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-384.57143,-515.798)">
|
||||
<path
|
||||
style="opacity:1;fill:#4d4d4d;fill-opacity:1;stroke:none"
|
||||
d="M 22.269531 4 L 4 22.269531 L 4 28 L 9.7304688 28 C 9.7304688 28 27.99966 9.7307308 28 9.7304688 L 22.269531 4 z M 19.404297 8.2988281 L 23.701172 12.595703 L 12 24.298828 L 12 23 L 12 22 L 11 22 L 8 22 L 8 19.701172 L 19.404297 8.2988281 z M 7 20.701172 L 7 23 L 8 23 L 11 23 L 11 25.298828 L 9.2988281 27 L 7.296875 27 L 5 24.703125 L 5 22.701172 L 7 20.701172 z "
|
||||
transform="translate(384.57143,515.798)"
|
||||
id="rect4132" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.9 KiB |
|
@ -1,108 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32"
|
||||
height="32"
|
||||
id="svg5453"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="document-save.svg"
|
||||
viewBox="0 0 32 32">
|
||||
<defs
|
||||
id="defs5455" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="16.33333"
|
||||
inkscape:cx="24.435643"
|
||||
inkscape:cy="11.966458"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="957"
|
||||
inkscape:window-x="-4"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:showpageshadow="false"
|
||||
borderlayer="true"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:object-nodes="true"
|
||||
inkscape:snap-bbox="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4063" />
|
||||
<sodipodi:guide
|
||||
position="4,24"
|
||||
orientation="28,0"
|
||||
id="guide4280" />
|
||||
<sodipodi:guide
|
||||
position="13,4"
|
||||
orientation="0,28"
|
||||
id="guide4282" />
|
||||
<sodipodi:guide
|
||||
position="28,25"
|
||||
orientation="-28,0"
|
||||
id="guide4284" />
|
||||
<sodipodi:guide
|
||||
position="15,28"
|
||||
orientation="0,-28"
|
||||
id="guide4286" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5458">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Capa 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-384.57143,-515.798)">
|
||||
<path
|
||||
style="fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
d="M 4,4 4,28 28,28 28,10 22,4 Z M 5,5 21.585938,5 27,10.414062 27,27 5,27 Z m 18,0 4,4 z"
|
||||
transform="translate(384.57143,515.798)"
|
||||
id="rect4167"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccccccc" />
|
||||
<path
|
||||
style="fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
d="m 9,19 0,9 14,0 0,-9 z m 1,1 12,0 0,7 -12,0 z"
|
||||
transform="translate(384.57143,515.798)"
|
||||
id="rect4219"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccc" />
|
||||
<path
|
||||
style="fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
d="m 10,4 0,9 11,0 0,-9 z m 1,1 6,0 0,7 -6,0 z"
|
||||
transform="translate(384.57143,515.798)"
|
||||
id="rect4253"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccc" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 3.3 KiB |
|
@ -1,76 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="24" height="24" id="svg3869" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="go-next.svg">
|
||||
<defs id="defs3871">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#4d4d4d;
|
||||
}
|
||||
.ColorScheme-Background {
|
||||
color:#eff0f1;
|
||||
}
|
||||
.ColorScheme-Highlight {
|
||||
color:#3daee9;
|
||||
}
|
||||
.ColorScheme-ViewText {
|
||||
color:#31363b;
|
||||
}
|
||||
.ColorScheme-ViewBackground {
|
||||
color:#fcfcfc;
|
||||
}
|
||||
.ColorScheme-ViewHover {
|
||||
color:#93cee9;
|
||||
}
|
||||
.ColorScheme-ViewFocus{
|
||||
color:#3daee9;
|
||||
}
|
||||
.ColorScheme-ButtonText {
|
||||
color:#31363b;
|
||||
}
|
||||
.ColorScheme-ButtonBackground {
|
||||
color:#eff0f1;
|
||||
}
|
||||
.ColorScheme-ButtonHover {
|
||||
color:#93cee9;
|
||||
}
|
||||
.ColorScheme-ButtonFocus{
|
||||
color:#3daee9;
|
||||
}
|
||||
</style>
|
||||
<linearGradient id="linearGradient3257">
|
||||
<stop offset="0" style="stop-color:#a50000;stop-opacity:1" id="stop3259"/>
|
||||
<stop offset="1" style="stop-color:#e73800;stop-opacity:1" id="stop3261"/>
|
||||
</linearGradient>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4210">
|
||||
<rect y="1024.3622" x="-7" height="34" width="34" id="rect4212" style="opacity:1;fill:#0000ff;fill-opacity:0.51376145;stroke:none;stroke-opacity:1"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4160">
|
||||
<rect style="opacity:1;fill:#aade87;fill-opacity:0.47247709;stroke:none;stroke-opacity:1" id="rect4162" width="32" height="32.000015" x="-6" y="1028.3619"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="22.627416" inkscape:cx="5.4926209" inkscape:cy="10.264796" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:window-width="1366" inkscape:window-height="709" inkscape:window-x="-4" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:showpageshadow="false" inkscape:object-nodes="true" inkscape:snap-bbox="true">
|
||||
<inkscape:grid type="xygrid" id="grid4132"/>
|
||||
<sodipodi:guide position="4,18" orientation="18,0" id="guide4138"/>
|
||||
<sodipodi:guide position="5,3" orientation="0,18" id="guide4140"/>
|
||||
<sodipodi:guide position="20,2.0000174" orientation="-18,0" id="guide4142"/>
|
||||
<sodipodi:guide position="2,21" orientation="0,-18" id="guide4144"/>
|
||||
<sodipodi:guide position="3,19.000017" orientation="16,0" id="guide4146"/>
|
||||
<sodipodi:guide position="2,4" orientation="0,16" id="guide4148"/>
|
||||
<sodipodi:guide position="21,20" orientation="-16,0" id="guide4150"/>
|
||||
<sodipodi:guide position="2,20" orientation="0,-16" id="guide4152"/>
|
||||
</sodipodi:namedview>
|
||||
<metadata id="metadata3874">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g inkscape:label="Capa 1" inkscape:groupmode="layer" id="layer1" transform="translate(-326,-532.3622)">
|
||||
<g transform="translate(326,-497)" id="layer1-9" inkscape:label="Capa 1">
|
||||
<path id="rect4176" transform="translate(-5e-7,1030.3622)" d="M 7.7070312,3 7,3.7070312 l 6.125,6.125 L 14.292969,11 13.125,12.167969 7,18.292969 7.7070312,19 13.832031,12.875 15.707031,11 13.832031,9.125 7.7070312,3 Z" style="fill:currentColor;fill-opacity:1;stroke:none" inkscape:connector-curvature="0" class="ColorScheme-Text"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4 KiB |
|
@ -1,127 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="24" height="24" id="svg3869" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="go-previous.svg">
|
||||
<defs id="defs3871">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#4d4d4d;
|
||||
}
|
||||
.ColorScheme-Background {
|
||||
color:#eff0f1;
|
||||
}
|
||||
.ColorScheme-Highlight {
|
||||
color:#3daee9;
|
||||
}
|
||||
.ColorScheme-ViewText {
|
||||
color:#31363b;
|
||||
}
|
||||
.ColorScheme-ViewBackground {
|
||||
color:#fcfcfc;
|
||||
}
|
||||
.ColorScheme-ViewHover {
|
||||
color:#93cee9;
|
||||
}
|
||||
.ColorScheme-ViewFocus{
|
||||
color:#3daee9;
|
||||
}
|
||||
.ColorScheme-ButtonText {
|
||||
color:#31363b;
|
||||
}
|
||||
.ColorScheme-ButtonBackground {
|
||||
color:#eff0f1;
|
||||
}
|
||||
.ColorScheme-ButtonHover {
|
||||
color:#93cee9;
|
||||
}
|
||||
.ColorScheme-ButtonFocus{
|
||||
color:#3daee9;
|
||||
}
|
||||
</style>
|
||||
<linearGradient id="linearGradient3257">
|
||||
<stop offset="0" style="stop-color:#a50000;stop-opacity:1" id="stop3259"/>
|
||||
<stop offset="1" style="stop-color:#e73800;stop-opacity:1" id="stop3261"/>
|
||||
</linearGradient>
|
||||
<inkscape:perspective id="perspective4146-36" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7"/>
|
||||
<inkscape:perspective id="perspective4146-0" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8"/>
|
||||
<inkscape:perspective id="perspective4146-3" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146"/>
|
||||
<inkscape:perspective id="perspective4146-36-7" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7-6"/>
|
||||
<inkscape:perspective id="perspective4146-0-6" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8-7"/>
|
||||
<inkscape:perspective id="perspective4146-3-9" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-2"/>
|
||||
<inkscape:perspective id="perspective4146-36-4" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7-7"/>
|
||||
<inkscape:perspective id="perspective4146-0-0" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8-6"/>
|
||||
<inkscape:perspective id="perspective4146-3-81" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-6"/>
|
||||
<inkscape:perspective id="perspective4146-36-7-2" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7-6-3"/>
|
||||
<inkscape:perspective id="perspective4146-0-6-4" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8-7-6"/>
|
||||
<inkscape:perspective id="perspective4146-3-9-0" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-2-1"/>
|
||||
<inkscape:perspective id="perspective4146-36-8" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7-0"/>
|
||||
<inkscape:perspective id="perspective4146-0-3" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8-78"/>
|
||||
<inkscape:perspective id="perspective4146-3-1" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-05"/>
|
||||
<inkscape:perspective id="perspective4146-36-3" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7-8"/>
|
||||
<inkscape:perspective id="perspective4146-0-9" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8-3"/>
|
||||
<inkscape:perspective id="perspective4146-3-4" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-9"/>
|
||||
<inkscape:perspective id="perspective4146-36-7-6" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-7-6-0"/>
|
||||
<inkscape:perspective id="perspective4146-0-6-7" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-3-8-7-7"/>
|
||||
<inkscape:perspective id="perspective4146-3-9-7" inkscape:persp3d-origin="12 : 8 : 1" inkscape:vp_z="24 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 12 : 1" sodipodi:type="inkscape:persp3d"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 12 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="24 : 12 : 1" inkscape:persp3d-origin="12 : 8 : 1" id="perspective4146-2-13"/>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4210">
|
||||
<rect y="1024.3622" x="-7" height="34" width="34" id="rect4212" style="opacity:1;fill:#0000ff;fill-opacity:0.51376145;stroke:none;stroke-opacity:1"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath4160">
|
||||
<rect style="opacity:1;fill:#aade87;fill-opacity:0.47247709;stroke:none;stroke-opacity:1" id="rect4162" width="32" height="32.000015" x="-6" y="1028.3619"/>
|
||||
</clipPath>
|
||||
<clipPath id="clipPath4160-4" clipPathUnits="userSpaceOnUse">
|
||||
<rect y="1023.3622" x="7" height="1" width="1" id="rect4162-5" style="opacity:1;fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-opacity:1"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath16">
|
||||
<path d="m 0,706.465 1490.926,0 L 1490.926,0 0,0 0,706.465 Z" id="path18"/>
|
||||
</clipPath>
|
||||
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath24">
|
||||
<path d="m 22.1953,686.117 1447.7347,0 0,-667.1902 -1447.7347,0 L 22.1953,686.117 Z" id="path26"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="22.627416" inkscape:cx="5.4926209" inkscape:cy="10.264796" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:window-width="1366" inkscape:window-height="709" inkscape:window-x="-4" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:showpageshadow="false" inkscape:object-nodes="true" inkscape:snap-bbox="true">
|
||||
<inkscape:grid type="xygrid" id="grid4132"/>
|
||||
<sodipodi:guide position="4,18" orientation="18,0" id="guide4138"/>
|
||||
<sodipodi:guide position="5,3" orientation="0,18" id="guide4140"/>
|
||||
<sodipodi:guide position="20,2.0000174" orientation="-18,0" id="guide4142"/>
|
||||
<sodipodi:guide position="2,21" orientation="0,-18" id="guide4144"/>
|
||||
<sodipodi:guide position="3,19.000017" orientation="16,0" id="guide4146"/>
|
||||
<sodipodi:guide position="2,4" orientation="0,16" id="guide4148"/>
|
||||
<sodipodi:guide position="21,20" orientation="-16,0" id="guide4150"/>
|
||||
<sodipodi:guide position="2,20" orientation="0,-16" id="guide4152"/>
|
||||
</sodipodi:namedview>
|
||||
<metadata id="metadata3874">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g inkscape:label="Capa 1" inkscape:groupmode="layer" id="layer1" transform="translate(-326,-532.3622)">
|
||||
<g transform="translate(326.70703,-497)" id="layer1-2" inkscape:label="Capa 1">
|
||||
<path id="rect4176" transform="translate(-5e-7,1030.3622)" d="m 14.292969,3 -6.1250002,6.125 -1.875,1.875 1.875,1.875 L 14.292969,19 15,18.292969 8.875,12.167969 7.7070312,11 8.875,9.8320312 15,3.7070312 14.292969,3 Z" style="fill:currentColor;fill-opacity:1;stroke:none" inkscape:connector-curvature="0" class="ColorScheme-Text"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 13 KiB |
|
@ -1,110 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
height="16"
|
||||
id="svg4183"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="view-readmode.svg">
|
||||
<defs
|
||||
id="defs4185" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="8.5616986"
|
||||
inkscape:cy="7.1492155"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1006"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
showguides="false"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:showpageshadow="false"
|
||||
borderlayer="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4103" />
|
||||
<sodipodi:guide
|
||||
position="2,20.000017"
|
||||
orientation="18,0"
|
||||
id="guide4095" />
|
||||
<sodipodi:guide
|
||||
position="2,2.0000174"
|
||||
orientation="0,18"
|
||||
id="guide4097" />
|
||||
<sodipodi:guide
|
||||
position="20,2.0000174"
|
||||
orientation="-18,0"
|
||||
id="guide4099" />
|
||||
<sodipodi:guide
|
||||
position="20,20.000017"
|
||||
orientation="0,-18"
|
||||
id="guide4101" />
|
||||
<sodipodi:guide
|
||||
position="3,19.000017"
|
||||
orientation="16,0"
|
||||
id="guide4103" />
|
||||
<sodipodi:guide
|
||||
position="3,3.0000174"
|
||||
orientation="0,16"
|
||||
id="guide4105" />
|
||||
<sodipodi:guide
|
||||
position="19,3.0000174"
|
||||
orientation="-1,6.123234e-17"
|
||||
id="guide4107" />
|
||||
<sodipodi:guide
|
||||
position="19,19.000017"
|
||||
orientation="0,-16"
|
||||
id="guide4109" />
|
||||
<sodipodi:guide
|
||||
position="10.292994,3.0001395"
|
||||
orientation="0,1.414012"
|
||||
id="guide4266" />
|
||||
<sodipodi:guide
|
||||
position="10,3.0000174"
|
||||
orientation="0,2"
|
||||
id="guide4137" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata4188">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Capa 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-1036.3622)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect6742"
|
||||
d="m 5,1039.3622 c -2,0 -3.02083,1.5 -4,1.5 -0.9792,0 -1,-0.5 -1,-0.5 l 0,8 c 0,0 -0.0417,0.5 1,0.5 1.04167,0 2,-1.5 4,-1.5 2,0 3,1 3,1 0,0 1,-1 3,-1 2,0 2.89583,1.5 4,1.5 1.10417,0 1,-0.5 1,-0.5 l 0,-7.9375 c -0.0371,0.1406 -0.21875,0.4375 -1,0.4375 -1.04167,0 -2,-1.5 -4,-1.5 -2,0 -3,1 -3,1 0,0 -1,-1 -3,-1 z m 0,1 c 0.83333,0 1.9477275,0.3853 2.28125,0.7188 0.366467,0.2812 1.071033,0.2812 1.4375,0 0.270433,-0.2704 1.44792,-0.7188 2.28125,-0.7188 2,0 2.3125,1.5 4,1.5 l 0,6 c -0.861649,0 -1.855068,-1.5 -4,-1.5 -1.16667,0 -2.410156,0.2227 -3,0.8125 -0.5605,-0.5605 -1.83333,-0.8125 -3,-0.8125 -2.0510194,0 -3.3570144,1.5 -4,1.5 l 0,-6 c 1.53147,0 2,-1.5 4,-1.5 z"
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#4d4d4d;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;enable-background:accumulate"
|
||||
sodipodi:nodetypes="ssccsscssccsscssccsccscsccs" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 3.7 KiB |
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Copyright 2015 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtGraphicalEffects 1.0
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
|
||||
//TODO: This will become a QQC2 Drawer
|
||||
//providing just a dummy api for now
|
||||
Item {
|
||||
id: root
|
||||
anchors.fill: parent
|
||||
z: 9999
|
||||
|
||||
default property alias page: mainPage.data
|
||||
property Item contentItem
|
||||
property bool opened
|
||||
property int edge: Qt.LeftEdge
|
||||
property real position: 0
|
||||
|
||||
function open () { }
|
||||
function close () { }
|
||||
signal clicked
|
||||
|
||||
Item {
|
||||
id: mainPage
|
||||
anchors.fill: parent
|
||||
onChildrenChanged: mainPage.children[0].anchors.fill = mainPage
|
||||
}
|
||||
}
|
||||
|
|
@ -1,192 +0,0 @@
|
|||
/*
|
||||
* Copyright 2015 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
|
||||
MouseArea {
|
||||
id: button
|
||||
property alias iconSource: icon.source
|
||||
property bool checkable: false
|
||||
property bool checked: false
|
||||
//either Action or QAction should work here
|
||||
property QtObject action
|
||||
Layout.minimumWidth: Units.iconSizes.medium
|
||||
Layout.maximumWidth: Layout.minimumWidth
|
||||
implicitWidth: Units.iconSizes.medium
|
||||
implicitHeight: width
|
||||
drag {
|
||||
target: button
|
||||
axis: Drag.XAxis
|
||||
minimumX: parent.width/2 - width/2 - (contextDrawer && contextDrawer.enabled ? contextDrawer.contentItem.width : 0)
|
||||
maximumX: parent.width/2 - width/2 + (globalDrawer && globalDrawer.enabled ? globalDrawer.contentItem.width : 0)
|
||||
}
|
||||
function toggleVisibility() {
|
||||
showAnimation.running = false;
|
||||
if (translateTransform.y < button.height) {
|
||||
showAnimation.to = button.height;
|
||||
} else {
|
||||
showAnimation.to = 0;
|
||||
}
|
||||
showAnimation.running = true;
|
||||
}
|
||||
|
||||
transform: Translate {
|
||||
id: translateTransform
|
||||
}
|
||||
property var downTimestamp;
|
||||
property int startX
|
||||
onPressed: {
|
||||
downTimestamp = (new Date()).getTime();
|
||||
startX = button.x
|
||||
}
|
||||
onReleased: {
|
||||
//pixel/second
|
||||
var speed = ((button.x - startX) / ((new Date()).getTime() - downTimestamp) * 1000);
|
||||
|
||||
//project where it would be a full second in the future
|
||||
if (globalDrawer && x + speed > Math.min(parent.width/4*3, parent.width/2 + globalDrawer.contentItem.width/2)) {
|
||||
globalDrawer.open();
|
||||
contextDrawer.close();
|
||||
} else if (contextDrawer && x + speed < Math.max(parent.width/4, parent.width/2 - contextDrawer.contentItem.width/2)) {
|
||||
if (contextDrawer) {
|
||||
contextDrawer.open();
|
||||
}
|
||||
if (globalDrawer) {
|
||||
globalDrawer.close();
|
||||
}
|
||||
} else {
|
||||
if (globalDrawer) {
|
||||
globalDrawer.close();
|
||||
}
|
||||
if (contextDrawer) {
|
||||
contextDrawer.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
onClicked: {
|
||||
if (checkable) {
|
||||
checked = !checked;
|
||||
}
|
||||
|
||||
//if an action has been assigned, trigger it
|
||||
if (button.action && button.action.trigger) {
|
||||
button.action.trigger();
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: globalDrawer
|
||||
onPositionChanged: {
|
||||
if (!button.pressed) {
|
||||
button.x = globalDrawer.contentItem.width * globalDrawer.position + button.parent.width/2 - button.width/2;
|
||||
}
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: contextDrawer
|
||||
onPositionChanged: {
|
||||
if (!button.pressed) {
|
||||
button.x = button.parent.width/2 - button.width/2 - contextDrawer.contentItem.width * contextDrawer.position;
|
||||
}
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: button.parent
|
||||
onWidthChanged: button.x = button.parent.width/2 - button.width/2
|
||||
}
|
||||
onXChanged: {
|
||||
if (button.pressed) {
|
||||
if (globalDrawer) {
|
||||
globalDrawer.position = Math.min(1, Math.max(0, (x - button.parent.width/2 + button.width/2)/globalDrawer.contentItem.width));
|
||||
}
|
||||
if (contextDrawer) {
|
||||
contextDrawer.position = Math.min(1, Math.max(0, (button.parent.width/2 - button.width/2 - x)/contextDrawer.contentItem.width));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NumberAnimation {
|
||||
id: showAnimation
|
||||
target: translateTransform
|
||||
properties: "y"
|
||||
duration: Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
Item {
|
||||
id: background
|
||||
anchors {
|
||||
fill: parent
|
||||
leftMargin: -Units.gridUnit
|
||||
rightMargin: -Units.gridUnit
|
||||
}
|
||||
Rectangle {
|
||||
radius: width/2
|
||||
anchors.centerIn: parent
|
||||
height: parent.height - Units.smallSpacing*2
|
||||
width: height
|
||||
color: button.pressed || button.checked ? Theme.highlightColor : Theme.backgroundColor
|
||||
Icon {
|
||||
id: icon
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: Units.smallSpacing
|
||||
}
|
||||
}
|
||||
ActionButtonArrow {
|
||||
anchors {
|
||||
right: parent.left
|
||||
rightMargin: Units.smallSpacing
|
||||
}
|
||||
visible: contextDrawer && contextDrawer.enabled
|
||||
inverted: true
|
||||
}
|
||||
ActionButtonArrow {
|
||||
anchors {
|
||||
left: parent.right
|
||||
leftMargin: Units.smallSpacing
|
||||
}
|
||||
visible: globalDrawer && globalDrawer.enabled
|
||||
}
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
Behavior on x {
|
||||
NumberAnimation {
|
||||
duration: Units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
DropShadow {
|
||||
anchors.fill: background
|
||||
horizontalOffset: 0
|
||||
verticalOffset: Units.smallSpacing/3
|
||||
radius: Units.gridUnit / 3.5
|
||||
samples: 16
|
||||
color: button.pressed ? "transparent" : Qt.rgba(0, 0, 0, 0.5)
|
||||
source: background
|
||||
}
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
* Copyright 2015 Marco Martin <mart@kde.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import org.kde.plasma.mobilecomponents 0.2
|
||||
|
||||
Canvas {
|
||||
id: canvas
|
||||
width: Units.gridUnit
|
||||
height: width
|
||||
property bool inverted
|
||||
property color color: parent.color
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
onColorChanged: requestPaint()
|
||||
|
||||
onPaint: {
|
||||
var ctx = canvas.getContext("2d");
|
||||
ctx.fillStyle = canvas.color;
|
||||
ctx.beginPath();
|
||||
if (inverted) {
|
||||
ctx.moveTo(canvas.width, 0);
|
||||
ctx.bezierCurveTo(canvas.width-canvas.width/8, 0,
|
||||
canvas.width-canvas.width/8, canvas.height,
|
||||
canvas.width, canvas.height);
|
||||
ctx.lineTo(0, canvas.height/2);
|
||||
} else {
|
||||
ctx.moveTo(0, 0);
|
||||
ctx.bezierCurveTo(canvas.width/8, 0,
|
||||
canvas.width/8, canvas.height,
|
||||
0, canvas.height);
|
||||
ctx.lineTo(canvas.width, canvas.height/2);
|
||||
//ctx.lineTo(0, canvas.height);
|
||||
}
|
||||
ctx.fill();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,243 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the Qt Components project.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
|
||||
** the names of its contributors may be used to endorse or promote
|
||||
** products derived from this software without specific prior written
|
||||
** permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
// Page stack. Items are page containers.
|
||||
var pageStack = [];
|
||||
|
||||
// Page component cache map. Key is page url, value is page component.
|
||||
var componentCache = {};
|
||||
|
||||
// Returns the page stack depth.
|
||||
function getDepth() {
|
||||
return pageStack.length;
|
||||
}
|
||||
|
||||
// Pushes a page on the stack.
|
||||
function push(page, properties, replace, immediate) {
|
||||
// page order sanity check
|
||||
if ((!replace && page == currentPage)
|
||||
|| (replace && pageStack.length > 1
|
||||
&& page == pageStack[pageStack.length - 2].page)) {
|
||||
throw new Error("Cannot navigate so that the resulting page stack has two consecutive entries of the same page instance.");
|
||||
}
|
||||
|
||||
// figure out if more than one page is being pushed
|
||||
var pages;
|
||||
if (page instanceof Array) {
|
||||
pages = page;
|
||||
page = pages.pop();
|
||||
if (page.createObject === undefined && page.parent === undefined && typeof page != "string") {
|
||||
properties = properties || page.properties;
|
||||
page = page.page;
|
||||
}
|
||||
}
|
||||
|
||||
// get the current container
|
||||
var oldContainer;
|
||||
if (pageStack.length) {
|
||||
oldContainer = pageStack[pageStack.length - 1];
|
||||
}
|
||||
|
||||
// pop the old container off the stack if this is a replace
|
||||
if (oldContainer && replace) {
|
||||
pageStack.pop();
|
||||
}
|
||||
|
||||
// push any extra defined pages onto the stack
|
||||
if (pages) {
|
||||
var i;
|
||||
for (i = 0; i < pages.length; i++) {
|
||||
var tPage = pages[i];
|
||||
var tProps;
|
||||
if (tPage.createObject === undefined && tPage.parent === undefined && typeof tPage != "string") {
|
||||
tProps = tPage.properties;
|
||||
tPage = tPage.page;
|
||||
}
|
||||
pageStack.push(initPage(tPage, tProps));
|
||||
}
|
||||
}
|
||||
|
||||
// initialize the page
|
||||
var container = initPage(page, properties);
|
||||
|
||||
// push the page container onto the stack
|
||||
pageStack.push(container);
|
||||
|
||||
depth = pageStack.length;
|
||||
currentPage = container.page;
|
||||
|
||||
// perform page transition
|
||||
//FIXME: this should be in for PageStack, out for PageRow?
|
||||
//immediate = immediate || !oldContainer;
|
||||
var orientationChange = false;
|
||||
if (oldContainer) {
|
||||
orientationChange = orientationChanges(oldContainer.page, container.page);
|
||||
oldContainer.pushExit(replace, immediate, orientationChange);
|
||||
}
|
||||
|
||||
// sync tool bar
|
||||
var tools = container.page.tools || null;
|
||||
if (toolBar) {
|
||||
toolBar.setTools(tools, immediate ? "set" : replace ? "replace" : "push");
|
||||
}
|
||||
|
||||
container.pushEnter(immediate, orientationChange);
|
||||
return container.page;
|
||||
}
|
||||
|
||||
// Initializes a page and its container.
|
||||
function initPage(page, properties) {
|
||||
var container = containerComponent.createObject(root);
|
||||
|
||||
var pageComp;
|
||||
if (page.createObject) {
|
||||
// page defined as component
|
||||
pageComp = page;
|
||||
} else if (typeof page == "string") {
|
||||
// page defined as string (a url)
|
||||
pageComp = componentCache[page];
|
||||
if (!pageComp) {
|
||||
pageComp = componentCache[page] = Qt.createComponent(page);
|
||||
}
|
||||
}
|
||||
if (pageComp) {
|
||||
if (pageComp.status == Component.Error) {
|
||||
throw new Error("Error while loading page: " + pageComp.errorString());
|
||||
} else {
|
||||
// instantiate page from component
|
||||
page = pageComp.createObject(container.pageParent, properties || {});
|
||||
}
|
||||
} else {
|
||||
// copy properties to the page
|
||||
for (var prop in properties) {
|
||||
if (properties.hasOwnProperty(prop)) {
|
||||
page[prop] = properties[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
container.page = page;
|
||||
if (page.parent == null || page.parent == container.pageParent) {
|
||||
container.owner = container;
|
||||
} else {
|
||||
container.owner = page.parent;
|
||||
}
|
||||
|
||||
// the page has to be reparented if
|
||||
if (page.parent != container.pageParent) {
|
||||
page.parent = container.pageParent;
|
||||
}
|
||||
|
||||
if (page.pageStack !== undefined) {
|
||||
page.pageStack = root;
|
||||
}
|
||||
|
||||
page.anchors.fill = container.pageParent
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
// Pops a page off the stack.
|
||||
function pop(page, immediate) {
|
||||
// make sure there are enough pages in the stack to pop
|
||||
if (pageStack.length > 1) {
|
||||
//unwind to itself means no pop
|
||||
if (page !== undefined && page == pageStack[pageStack.length - 1].page) {
|
||||
return
|
||||
}
|
||||
// pop the current container off the stack and get the next container
|
||||
var oldContainer = pageStack.pop();
|
||||
var container = pageStack[pageStack.length - 1];
|
||||
if (page !== undefined) {
|
||||
// an unwind target has been specified - pop until we find it
|
||||
while (page != container.page && pageStack.length > 1) {
|
||||
pageStack.pop();
|
||||
container.popExit(immediate, false);
|
||||
container = pageStack[pageStack.length - 1];
|
||||
}
|
||||
}
|
||||
|
||||
depth = pageStack.length;
|
||||
currentPage = container.page;
|
||||
|
||||
// perform page transition
|
||||
var orientationChange = orientationChanges(oldContainer.page, container.page);
|
||||
oldContainer.popExit(immediate, orientationChange);
|
||||
container.popEnter(immediate, orientationChange);
|
||||
|
||||
// sync tool bar
|
||||
var tools = container.page.tools || null;
|
||||
if (toolBar) {
|
||||
toolBar.setTools(tools, immediate ? "set" : "pop");
|
||||
}
|
||||
return oldContainer.page;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Checks if the orientation changes between oldPage and newPage
|
||||
function orientationChanges(oldPage, newPage) {
|
||||
return newPage.orientationLock != 0 //PlasmaComponents.PageOrientation.Automatic
|
||||
&& newPage.orientationLock != 3//PlasmaComponents.PageOrientation.LockPrevious
|
||||
&& newPage.orientationLock != oldPage.orientationLock
|
||||
}
|
||||
|
||||
// Clears the page stack.
|
||||
function clear() {
|
||||
var container;
|
||||
while (container = pageStack.pop()) {
|
||||
container.cleanup();
|
||||
}
|
||||
depth = 0;
|
||||
currentPage = null;
|
||||
}
|
||||
|
||||
// Iterates through all pages in the stack (top to bottom) to find a page.
|
||||
function find(func) {
|
||||
for (var i = pageStack.length - 1; i >= 0; i--) {
|
||||
var page = pageStack[i].page;
|
||||
if (func(page)) {
|
||||
return page;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
module org.kde.plasma.mobilecomponents.private
|
||||
#plugin mobilecomponentsprivateplugin
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
module org.kde.plasma.mobilecomponents
|
||||
#plugin mobilecomponentsplugin
|
||||
|
||||
singleton Units 0.2 Units.qml
|
||||
singleton Theme 0.2 Theme.qml
|
||||
|
||||
IconGrid 0.2 IconGrid.qml
|
||||
OverlayDrawer 0.2 OverlayDrawer.qml
|
||||
SplitDrawer 0.2 SplitDrawer.qml
|
||||
ActionGroup 0.2 ActionGroup.qml
|
||||
ApplicationWindow 0.2 ApplicationWindow.qml
|
||||
ContextDrawer 0.2 ContextDrawer.qml
|
||||
GlobalDrawer 0.2 GlobalDrawer.qml
|
||||
Page 0.2 Page.qml
|
||||
Icon 0.2 Icon.qml
|
||||
Label 0.2 Label.qml
|
||||
Heading 0.2 Heading.qml
|
||||
ListItem 0.2 ListItem.qml
|
||||
BasicListItem 0.2 BasicListItem.qml
|
||||
ListItemWithActions 0.2 ListItemWithActions.qml
|
||||
RefreshableScrollView 0.2 RefreshableScrollView.qml
|
|
@ -23,6 +23,11 @@ exec 1> >(tee build.log) 2>&1
|
|||
SRC=$(pwd)
|
||||
PLATFORM=$(uname)
|
||||
|
||||
# to build Subsurface-mobile on the desktop change this to
|
||||
# SUBSURFACE_EXECUTABLE=MobileExecutable
|
||||
SUBSURFACE_EXECUTABLE=DesktopExecutable
|
||||
|
||||
|
||||
if [[ ! -d "subsurface" ]] ; then
|
||||
echo "please start this script from the directory containing the Subsurface source directory"
|
||||
exit 1
|
||||
|
@ -161,6 +166,49 @@ cmake -DCMAKE_BUILD_TYPE=Release \
|
|||
make -j4
|
||||
make install
|
||||
|
||||
# pull the plasma-mobile components from upstream if building Subsurface-mobile
|
||||
if [ "$SUBSURFACE_EXECUTABLE" = "MobileExecutable" ] ; then
|
||||
# now bring in the latest Plasma-mobile mobile components plus a couple of icons that we need
|
||||
# first, get the latest from upstream
|
||||
# yes, this is a bit overkill as we clone a lot of stuff for just a few files, but this way
|
||||
# we stop having to manually merge our code with upstream all the time
|
||||
# as we get closer to shipping a production version we'll likely check out specific tags
|
||||
# or SHAs from upstream
|
||||
cd $SRC
|
||||
if [ ! -d plasma-mobile ] ; then
|
||||
git clone git://github.com/KDE/plasma-mobile
|
||||
fi
|
||||
pushd plasma-mobile
|
||||
git pull
|
||||
popd
|
||||
if [ ! -d breeze-icons ] ; then
|
||||
git clone git://anongit.kde.org/breeze-icons
|
||||
fi
|
||||
pushd breeze-icons
|
||||
git pull
|
||||
popd
|
||||
|
||||
# now copy the components and a couple of icons into plae
|
||||
MC=$SRC/subsurface/qt-mobile/qml/mobilecomponents
|
||||
PMMC=plasma-mobile/components/mobilecomponents
|
||||
BREEZE=breeze-icons
|
||||
|
||||
rm -rf $MC
|
||||
mkdir -p $MC/icons
|
||||
cp -R $PMMC/qml/* $MC/
|
||||
cp $PMMC/fallbacktheme/*qml $MC/
|
||||
|
||||
cp $BREEZE/icons/actions/24/dialog-cancel.svg $MC/icons
|
||||
cp $BREEZE/icons/actions/24/distribute-horizontal-x.svg $MC/icons
|
||||
cp $BREEZE/icons/actions/24/document-edit.svg $MC/icons
|
||||
cp $BREEZE/icons/actions/24/document-save.svg $MC/icons
|
||||
cp $BREEZE/icons/actions/24/go-next.svg $MC/icons
|
||||
cp $BREEZE/icons/actions/24/go-previous.svg $MC/icons
|
||||
cp $BREEZE/icons/actions/16/view-readermode.svg $MC/icons
|
||||
|
||||
echo org.kde.plasma.mobilecomponents synced from upstream
|
||||
fi
|
||||
|
||||
# finally, build Subsurface
|
||||
|
||||
if [ $PLATFORM = Darwin ] ; then
|
||||
|
@ -174,6 +222,7 @@ mkdir -p build
|
|||
cd build
|
||||
export CMAKE_PREFIX_PATH=$INSTALL_ROOT/lib/cmake
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug .. \
|
||||
-DSUBSURFACE_TARGET_EXECUTABLE=$SUBSURFACE_EXECUTABLE \
|
||||
-DLIBGIT2_INCLUDE_DIR=$INSTALL_ROOT/include \
|
||||
-DLIBGIT2_LIBRARIES=$INSTALL_ROOT/lib/libgit2.$SH_LIB_EXT \
|
||||
-DLIBDIVECOMPUTER_INCLUDE_DIR=$INSTALL_ROOT/include \
|
||||
|
|