feat: rebuild the interface after Haruna
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
54ad4eecf3
commit
614a31db1b
45 files changed
+3818
-798
No files matched your search
@@ -0,0 +1,43 @@
|
||||
// SPDX-FileCopyrightText: 2020 George Florea Bănuș <georgefb899@gmail.com>
|
||||
// SPDX-FileCopyrightText: 2026 Tri Vo Khac
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import org.kde.ki18n
|
||||
|
||||
Menu {
|
||||
id: root
|
||||
|
||||
required property Actions actions
|
||||
|
||||
title: KI18n.i18nc("@title:menu", "Recent Files")
|
||||
enabled: RecentFilesModel.count > 0
|
||||
|
||||
Instantiator {
|
||||
model: RecentFilesModel
|
||||
delegate: MenuItem {
|
||||
required property url url
|
||||
required property string name
|
||||
required property string path
|
||||
text: name
|
||||
onTriggered: root.actions.fileOpenRequested(url)
|
||||
|
||||
ToolTip.text: path
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.delay: 1000
|
||||
}
|
||||
onObjectAdded: (index, object) => root.insertItem(index, object)
|
||||
onObjectRemoved: (index, object) => root.removeItem(object)
|
||||
}
|
||||
|
||||
MenuSeparator {}
|
||||
|
||||
MenuItem {
|
||||
text: KI18n.i18nc("@action:inmenu", "Clear List")
|
||||
icon.name: "edit-clear-history"
|
||||
onTriggered: RecentFilesModel.clear()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user