Commit 9e0711ac authored by Dominic Hayes's avatar Dominic Hayes Committed by Nate Graham

Make the icon hitboxes for the System Tray Plasmoid larger when Kirigami Tablet Mode is enabled

@ngraham recommended that I split up into three patches:

1. The foundation code to get landed first so that the other two patches can be done as patches that change two separate lines instead of just one

2. Tablet Mode increases tray icon spacing

3. Increase tray icon spacing slightly on Non-Tablet Mode (half of the amount it increases by in Tablet Mode)

This patch integrates both patch 1 and 2 of what ngraham recommended to make system tray icon click areas larger when Kirigami's Tablet Mode setting is true than they normally are.

Test Plan:
1. Test that System Tray still works after these changes have been made

2. Check that when Kirigami.Settings.tabletMode is enabled the system tray icon click areas become slightly larger in size

Reviewers: ngraham, #vdg, #plasma, niccolove

Reviewed By: ngraham, #vdg, niccolove

Subscribers: davidre, plasma-devel

Tags: #plasma

Differential Revision:
parent 731a1908
......@@ -41,7 +41,15 @@ MouseArea {
property int iconSize: plasmoid.configuration.iconSize + (Kirigami.Settings.tabletMode ? 1 : 0)
property bool vertical: plasmoid.formFactor === PlasmaCore.Types.Vertical
readonly property int itemSize: units.roundToIconSize(Math.min(Math.min(width, height), units.iconSizes[iconSizes[Math.min(iconSizes.length-1, iconSize)]]))
readonly property int itemSize: {
var baseSize = units.roundToIconSize(Math.min(Math.min(width, height), units.iconSizes[iconSizes[Math.min(iconSizes.length-1, iconSize)]]));
if (Kirigami.Settings.tabletMode) {
// Set the tray items' clickable areas on the panel to be bigger than normal to allow for easier touchability
return baseSize + units.smallSpacing;
} else {
return baseSize;
property int hiddenItemSize: units.iconSizes.smallMedium
property alias expanded: dialog.visible
property Item activeApplet
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment