Warning, /graphics/krita/libs/libqml/plugins/components/RecentFilesList.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 
0010 Item {
0011     id: base;
0012     signal clicked(string file);
0013 
0014     RecentImagesModel {
0015         id: recentImagesModel;
0016         recentFileManager: RecentFileManager;
0017     }
0018 
0019     ListView {
0020         id: view;
0021         anchors.left: parent.left;
0022         anchors.right: parent.right;
0023         anchors.top: parent.top;
0024 
0025         height: parent.height - Constants.GridHeight * 2;
0026 
0027         clip: true;
0028 
0029         delegate: ListItem {
0030             width: ListView.view.width;
0031 
0032             title: model.text;
0033             description: model.url;
0034 
0035             image.source: model.image;
0036             image.smooth: true;
0037             image.fillMode: Image.PreserveAspectCrop;
0038             imageShadow: true;
0039 
0040             gradient: Gradient {
0041                 GradientStop { position: 0; color: Settings.theme.color("components/recentFilesList/start") }
0042                 GradientStop { position: 0.4; color: Settings.theme.color("components/recentFilesList/stop"); }
0043             }
0044 
0045             onClicked: {
0046                 base.clicked(model.url);
0047             }
0048         }
0049 
0050         model: recentImagesModel;
0051 
0052         ScrollDecorator { }
0053     }
0054 
0055     ListItem {
0056         anchors.top: view.bottom;
0057 
0058         title: "Open Image";
0059         image.source: Settings.theme.icon("fileopen-black");
0060         image.asynchronous: false;
0061 
0062         gradient: Gradient {
0063             GradientStop { position: 0; color: Settings.theme.color("components/recentFilesList/start") }
0064             GradientStop { position: 0.4; color: Settings.theme.color("components/recentFilesList/stop"); }
0065         }
0066 
0067         onClicked: base.clicked("");
0068     }
0069 }