Warning, /graphics/krita/libs/libqml/qml/panels/NewImagePanel.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(variant options);
0018 
0019     Rectangle {
0020         id: panel;
0021         width: parent.width;
0022         height: parent.height;
0023         color: Settings.theme.color("panels/newImage/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/newImage/header/start");
0038                 }
0039 
0040 
0041                 GradientStop {
0042                     position: 1
0043                     color: Settings.theme.color("panels/newImage/header/stop");
0044                 }
0045             }
0046 
0047             Rectangle {
0048                 anchors {
0049                     bottom: parent.bottom;
0050                     left: parent.left;
0051                     right: parent.right;
0052                 }
0053                 height: Constants.DefaultMargin;
0054                 color: Settings.theme.color("panels/newImage/header/stop");
0055             }
0056 
0057 
0058             Shadow { width: parent.width; height: Constants.GridHeight / 8; anchors.top: parent.bottom;}
0059 
0060             Label {
0061                 anchors {
0062                     left: parent.left;
0063                     leftMargin: Constants.DefaultMargin;
0064                     verticalCenter: parent.verticalCenter;
0065                 }
0066                 text: "Create New";
0067                 font: Settings.theme.font("panelHeader");
0068                 color: Settings.theme.color("panels/newImage/header/text");
0069             }
0070         }
0071 
0072         NewImageList {
0073             anchors.top: header.bottom;
0074             width: parent.width;
0075             height: Constants.GridHeight * 9;
0076 
0077             onClicked: base.clicked(options);
0078         }
0079     }
0080 
0081     states: State {
0082         name: "collapsed";
0083         when: base.collapsed;
0084         PropertyChanges { target: panel; x: -base.width; opacity: 0; }
0085     }
0086 
0087     transitions: Transition {
0088         NumberAnimation { properties: "x,opacity"; }
0089     }
0090 }