Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85817394
D357.1792897141.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D357.1792897141.diff
View Options
diff --git a/src/contents/ui/shortcuts/ActionSettings.qml b/src/contents/ui/shortcuts/ActionSettings.qml
--- a/src/contents/ui/shortcuts/ActionSettings.qml
+++ b/src/contents/ui/shortcuts/ActionSettings.qml
@@ -20,19 +20,42 @@
/// }
property var shortcutsConfig
- model: actionsGrouped
+ readonly property var displayModel: {
+ const res = [];
+ let prevGroup;
+ for (const entry of actionsGrouped) {
+ if (entry.group !== prevGroup) {
+ res.push({ isHeader: true, name: entry.group });
+ prevGroup = entry.group;
+ }
+ res.push({ isHeader: false, action: entry.action });
+ }
+ return res;
+ }
- delegate: KazvShortcuts.ActionItem {
+ model: displayModel
+
+ delegate: Loader {
+ id: actionDelegate
+ required property var modelData
width: actionSettings.width
- action: actions[index]
- }
+ sourceComponent: modelData.isHeader ? headerComponent : actionComponent
- section.property: 'group'
- section.delegate: Kirigami.ListSectionHeader {
- width: ListView.view.width
+ Component {
+ id: headerComponent
+ Kirigami.ListSectionHeader {
+ width: actionDelegate.width
+ text: actionDelegate.modelData.name
+ }
+ }
- required property string section
- label: section
+ Component {
+ id: actionComponent
+ KazvShortcuts.ActionItem {
+ width: actionDelegate.width
+ action: actionDelegate.modelData.action
+ }
+ }
}
function shortcutToSequence(str) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 24, 7:59 PM (22 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1793610
Default Alt Text
D357.1792897141.diff (1 KB)
Attached To
Mode
D357: Fix configure shortcuts page show wrong section header text
Attached
Detach File
Event Timeline