Skip to content

Kirigami Addons 1.7.0

Thursday, 16 January 2025 | Carl Schwan

Kirigami Addons is a collection of additional components for Kirigami applications. 1.7.0 is a relatively big release bringing a new convergent component for context menus as well as various quality of life APIs to existing components.

ConvergentContextMenu

This release bring a new component which wraps the tradional context menu Controls.Menu provided by Qt and on mobile will instead displays a BottomDrawer with the list of actions.

Using it, is really easy:

import QtQuick.Controls as Controls
import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.components as Components
import org.kde.kirigamiaddons.formcard as FormCard

Components.ConvergentContextMenu {
 id: root

 // Only visible on mobile to show a bit of information about the selected element
 headerContentItem: RowLayout {
 spacing: Kirigami.Units.smallSpacing

 Kirigami.Avatar { ... }

 Kirigami.Heading {
 level: 2
 text: "Room Name"
 }
 }

 Controls.Action {
 text: i18nc("@action:inmenu", "Simple Action")
 }

 Kirigami.Action {
 text: i18nc("@action:inmenu", "Nested Action")

 Controls.Action { ... }

 Controls.Action { ... }

 Controls.Action { ... }
 }

 Kirigami.Action {
 text: i18nc("@action:inmenu", "Nested Action with Multiple Choices")

 Kirigami.Action {
 text: i18nc("@action:inmenu", "Follow Global Settings")
 checkable: true
 autoExclusive: true // Since KF 6.10
 }

 Kirigami.Action {
 text: i18nc("@action:inmenu", "Enabled")
 checkable: true
 autoExclusive: true // Since KF 6.10
 }

 Kirigami.Action {
 text: i18nc("@action:inmenu", "Disabled")
 checkable: true
 autoExclusive: true // Since KF 6.10
 }
 }

 // custom FormCard delegate only supported on mobile
 Kirigami.Action {
 visible: Kirigami.Settings.isMobile
 displayComponent: FormCard.FormButtonDelegate { ... }
 }
}

Icons on Android

Kirigami Addons components are using some breeze icons which needs to be packaged manually on android by calling kirigami_package_breeze_icons with the icons used. Now Kirigami Addons, provides a Cmake variable KIRIGAMI_ADDONS_ICONS listing all the icons used by Kirigami Addons, simplifying the maintainance work of applications to keep the list of icons used up-to-date.

kirigami_package_breeze_icons(ICONS
 ${KIRIGAMI_ADDONS_ICONS}

 // own icons
 ...
)

Shortcut Editor

Kirigami Addons’ shortcut editor can now be embedded in normal ConfigurationView via a new ConfigurationModule: ShortcutsConfigurationModule.

import org.kde.kirigamiaddons.settings as KirigamiSettings

KirigamiSettings.ConfigurationView {
 id: root

 required property TokodonApplication application

 modules: [
 ...
 KirigamiSettings.ShortcutsConfigurationModule {
 application: root.application
 },
 ]
}

 

FormCard

The FormCardPage now uses a slighly less grey to get more contrasts with the sidebar.

 

We cleaned up FormComboBoxDelegate to not relly on the applicationWindow() hack from Kirigami anymore. This fixes using FormComboBoxDelegate in Plasma Settings. Unfortunately some areas of Kirigami Addons still implicitely rely on applicationWindow() to set the parent of popups (Kirigami has a similar issue). If you are using dialogs or popup in your code, make sure to explicitely pass a valid Controls.Overlay.overlay as parent to them instead of rellying on applicationWindow() being valid all the time.

The FormCard.AboutPage now show the KDE Frameworks version in use rather than the one we built against. We are also using in the AboutKDEPage component, the same bug address as in the AboutPage component. And we fixed various other small issues with the about pages. Thanks Volker and Joshua!

Other

We now use clang-format automatically and various clang-tidy warnings were fixed. Thanks Alex!

Avatar are now loaded asynchronously which should make NeoChat, Tokodon and Merkuro list views smoother. Thank Kai! Addionally the text fallback is now only rendered as plain text, which should also be sligly faster.

The RadioSelector now uses the style from Marknote.

 

We updated the templates provided by Kirigami Addons to the latest version of the flatpak runtimes and some other minor improvements like using the new KLocalizedQmlContext.

AlbumMaximizeComponent now expose not only the currentItem from the internal view, but also the currentIndex.

The IndicatorItemDelegate and RoundedItemDelegate components are now easier to use with drag and drop interaction. You can see that in effect in last week update of Merkuro Mail.

MessageDialog now behaves better on mobile.

Packager Section

You can find the package on download.kde.org and it has been signed with my GPG key.