mirror of
https://github.com/allankoechke/foodrescue-app.git
synced 2026-11-30 10:17:37 +00:00
These are undocumented pieces of work made as experiments during development. Perhaps they might be useful to somebody later.
32 lines
993 B
QML
32 lines
993 B
QML
import QtQuick 2.12
|
|
import QtQuick.Controls 2.12
|
|
import QtQuick.Layouts 1.2
|
|
import org.kde.kirigami 2.10 as Kirigami
|
|
|
|
// Demonstrates the Kirigami 2.10 bug that custom icons are not shown for page actions.
|
|
//
|
|
// Page actions work with theme icons (see "rightAction:"), but not with custom icons
|
|
// (see "leftAction:"). Even when using the exact same action that successfully displays the custom
|
|
// icon on a button (see "ToolButton").
|
|
Kirigami.ApplicationWindow {
|
|
pageStack.initialPage: Kirigami.Page {
|
|
title: "Icon Problem Demo"
|
|
|
|
Kirigami.Action {
|
|
id: action1
|
|
text: "Action 1"
|
|
iconSource: "file:/home/matthias/Projects/Fairdirect.Food_Rescue_App/Repo.foodrescue-app/src/images/barcode-64x64.png"
|
|
}
|
|
|
|
Kirigami.Action {
|
|
id: action2
|
|
text: "Action 2"
|
|
iconName: "camera-web"
|
|
}
|
|
|
|
leftAction: action1
|
|
rightAction: action2
|
|
ToolButton { action: action1 }
|
|
}
|
|
}
|