Commit 3088639b authored by Nate Graham's avatar Nate Graham
Browse files

applets/taskmanager: increase spacing in tablet mode

Now that we have the ability to manually configure IOTM task spacing,
let's make use of this feature to automatically set it to its highest
spacing value while in Tablet Mode to improve touchability, just like we
already do for System Tray icons.

As a part of this, the Huge size is removed and the Large size is made
to do the same thing as the Huge size, so that we have fewer options and
those options are 100% consistent with what we show in the System Tray.
parent b82f7964
Pipeline #157745 passed with stage
in 3 minutes and 38 seconds
......@@ -82,27 +82,29 @@ Kirigami.FormLayout {
RadioButton {
id: small
enabled: !Kirigami.Settings.tabletMode
text: i18n("Small")
checked: iconSpacingRadioButtons.iconSpacing === 0
checked: iconSpacingRadioButtons.iconSpacing === 0 && !Kirigami.Settings.tabletMode
onToggled: parent.iconSpacing = 0
}
RadioButton {
enabled: !Kirigami.Settings.tabletMode
text: i18n("Normal")
checked: iconSpacingRadioButtons.iconSpacing === 1
checked: iconSpacingRadioButtons.iconSpacing === 1 && !Kirigami.Settings.tabletMode
onToggled: parent.iconSpacing = 1
}
RadioButton {
enabled: !Kirigami.Settings.tabletMode
text: i18n("Large")
checked: iconSpacingRadioButtons.iconSpacing === 2
onToggled: parent.iconSpacing = 2
  • What will 2 represent?

  • With this change, nothing. I thought that 2 wasn't enough of a difference from enough from 1 to justify its existence. :)

  • I was thinking if it's possible to use the config migrator to change 2 to other value, but it seems the applet config file is very complicated.

Please register or sign in to reply
}
RadioButton {
text: i18n("Huge")
checked: iconSpacingRadioButtons.iconSpacing === 3
checked: iconSpacingRadioButtons.iconSpacing === 3 || Kirigami.Settings.tabletMode
onToggled: parent.iconSpacing = 3
}
Label {
visible: Kirigami.Settings.tabletMode
text: i18nc("@info:usagetip under a set of radio buttons when tablet mode is on", "Automatically set to Large when in tablet mode")
font: Kirigami.Theme.smallFont
}
}
}
......@@ -5,17 +5,18 @@
*/
.import org.kde.plasma.core 2.0 as PlasmaCore
.import org.kde.kirigami 2.19 as Kirigami
const iconMargin = Math.round(PlasmaCore.Units.smallSpacing / 4);
const labelMargin = PlasmaCore.Units.smallSpacing;
function horizontalMargins() {
const spacingAdjustment = (plasmoid.pluginName === "org.kde.plasma.icontasks") ? plasmoid.configuration.iconSpacing : 1
const spacingAdjustment = (plasmoid.pluginName === "org.kde.plasma.icontasks") ? (Kirigami.Settings.tabletMode ? 3 : plasmoid.configuration.iconSpacing) : 1
return (taskFrame.margins.left + taskFrame.margins.right) * spacingAdjustment;
}
function verticalMargins() {
const spacingAdjustment = (plasmoid.pluginName === "org.kde.plasma.icontasks") ? plasmoid.configuration.iconSpacing : 1
const spacingAdjustment = (plasmoid.pluginName === "org.kde.plasma.icontasks") ? (Kirigami.Settings.tabletMode ? 3 : plasmoid.configuration.iconSpacing) : 1
return (taskFrame.margins.top + taskFrame.margins.bottom) * spacingAdjustment;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment