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

2020-02-29 Thread Nathaniel Graham
This revision was automatically updated to reflect the committed changes.
Closed by commit R120:9e0711ac408d: Make the icon hitboxes for the System Tray 
Plasmoid larger when Kirigami Tablet… (authored by The-Feren-OS-Dev, committed 
by ngraham).

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D27465?vs=75911=76686

REVISION DETAIL
  https://phabricator.kde.org/D27465

AFFECTED FILES
  applets/systemtray/package/contents/ui/main.qml

To: The-Feren-OS-Dev, ngraham, #vdg, #plasma, niccolove
Cc: davidre, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


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

2020-02-18 Thread Nathaniel Graham
ngraham accepted this revision.
ngraham added a reviewer: Plasma.
ngraham added a comment.
This revision is now accepted and ready to land.


  LGTM. #plasma  folks, is this all 
technically correct?

REPOSITORY
  R120 Plasma Workspace

BRANCH
  D27465 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D27465

To: The-Feren-OS-Dev, ngraham, #vdg, #plasma
Cc: davidre, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
ahiemstra, mart


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

2020-02-18 Thread Dominic Hayes
The-Feren-OS-Dev updated this revision to Diff 75911.
The-Feren-OS-Dev marked an inline comment as done.
The-Feren-OS-Dev added a comment.


  Moved baseSize declaration and changed it to a standard variable

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D27465?vs=75869=75911

BRANCH
  D27465 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D27465

AFFECTED FILES
  applets/systemtray/package/contents/ui/main.qml

To: The-Feren-OS-Dev, ngraham, #vdg
Cc: davidre, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
ahiemstra, mart


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

2020-02-17 Thread Nathaniel Graham
ngraham added inline comments.

INLINE COMMENTS

> main.qml:44
>  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 baseSize: 
> units.roundToIconSize(Math.min(Math.min(width, height), 
> units.iconSizes[iconSizes[Math.min(iconSizes.length-1, iconSize)]]))
> +readonly property int itemSize: {

this doesn't need to be a property; just make it a variable (`var baseSize = 
...`) inside the new inline function itself.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D27465

To: The-Feren-OS-Dev, ngraham, #vdg
Cc: davidre, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
ahiemstra, mart


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

2020-02-17 Thread Dominic Hayes
The-Feren-OS-Dev updated this revision to Diff 75869.
The-Feren-OS-Dev added a comment.


  Tidied up code a bit and introduced new baseSize variable  - Slightly 
increase system tray icon hitboxes in Non Tablet Mode Plasma

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D27465?vs=75863=75869

BRANCH
  D27465 (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D27465

AFFECTED FILES
  applets/systemtray/package/contents/ui/main.qml

To: The-Feren-OS-Dev, ngraham, #vdg
Cc: davidre, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
ahiemstra, mart


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

2020-02-17 Thread Nathaniel Graham
ngraham added inline comments.

INLINE COMMENTS

> main.qml:47
> +// Set the tray items' clickable areas on the panel to be bigger 
> than normal to allow for easier touchability
> +return units.roundToIconSize(Math.min(Math.min(width, height), 
> units.iconSizes[iconSizes[Math.min(iconSizes.length-1, iconSize)]])) + 
> units.smallSpacing;
> +} else {

Rather than repeating this long calculation twice, assign it to a variable 
called `baseSize` or something and then vary it in the return statements:

  if (Kirigami.Settings.tabletMode) {
  return baseSize + units.smallSpacing;
  } else {
  return baseSize;
  }

Also keep in mind that adding `units.smallSpacing` once will result in half 
that value amount being added to all sides. If you want to add 
`units.smallSpacing` to all sides, you'll need to add `units.smallSpacing * 2`

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D27465

To: The-Feren-OS-Dev, ngraham, #vdg
Cc: davidre, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
ahiemstra, mart


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

2020-02-17 Thread Dominic Hayes
The-Feren-OS-Dev updated this revision to Diff 75863.
The-Feren-OS-Dev added a comment.


  Got rid of unnecessary rounding of smallSpacing at the end of the Tablet Mode 
padding addition

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D27465?vs=75862=75863

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D27465

AFFECTED FILES
  applets/systemtray/package/contents/ui/main.qml

To: The-Feren-OS-Dev, ngraham, #vdg
Cc: davidre, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, 
ahiemstra, mart