Warning, /graphics/krita/libs/libqml/qml/panels/OpenImagePanel.qml is written in an unsupported language. File is not indexed.
0001 /* This file is part of the KDE project
0002 * SPDX-FileCopyrightText: 2012 Arjen Hiemstra <ahiemstra@heimr.nl>
0003 *
0004 * SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006
0007 import QtQuick 2.3
0008 import org.krita.sketch 1.0
0009 import org.krita.sketch.components 1.0
0010
0011 Item {
0012 id: base;
0013 property bool collapsed: true;
0014
0015 enabled: !collapsed;
0016
0017 signal clicked(string file);
0018
0019 Rectangle {
0020 id: panel;
0021 width: parent.width;
0022 height: parent.height;
0023 color: Settings.theme.color("panels/openImage/background");
0024 clip: true;
0025 radius: Constants.DefaultMargin;
0026
0027 Rectangle {
0028 id: header;
0029 height: Constants.GridHeight;
0030 width: parent.width;
0031 z: 2;
0032 radius: Constants.DefaultMargin;
0033
0034 gradient: Gradient {
0035 GradientStop {
0036 position: 0
0037 color: Settings.theme.color("panels/openImage/header/start");
0038 }
0039
0040
0041 GradientStop {
0042 position: 1
0043 color: Settings.theme.color("panels/openImage/header/stop");
0044 }
0045 }
0046
0047 Rectangle {
0048 anchors.bottom: parent.bottom;
0049 anchors.left: parent.left;
0050 anchors.right: parent.right;
0051 height: Constants.DefaultMargin;
0052 color: Settings.theme.color("panels/openImage/header/stop");
0053 }
0054
0055 Shadow { width: parent.width; height: Constants.GridHeight / 8; anchors.top: parent.bottom;}
0056
0057 Label {
0058 anchors {
0059 left: parent.left;
0060 leftMargin: Constants.DefaultMargin;
0061 verticalCenter: parent.verticalCenter;
0062 }
0063 text: "Open Image";
0064 font.pixelSize: Constants.LargeFontSize;
0065 color: Settings.theme.color("panels/openImage/header/text");
0066 }
0067 }
0068
0069 RecentFilesList {
0070 anchors.top: header.bottom;
0071 anchors.topMargin: -Constants.GridHeight * 0.25;
0072 width: parent.width;
0073 height: Constants.GridHeight * 10.5 + 8;
0074
0075 onClicked: base.clicked(file);
0076 }
0077 }
0078
0079 states: State {
0080 name: "collapsed";
0081 when: base.collapsed;
0082 PropertyChanges { target: panel; x: -base.width; opacity: 0; }
0083 }
0084
0085 transitions: Transition {
0086 NumberAnimation { properties: "x,opacity"; }
0087 }
0088 }