Bug 430050 - plasma panel "+" and "-" size buttons are reversed for horizontal panel at top
Summary: plasma panel "+" and "-" size buttons are reversed for horizontal panel at top
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: master
Platform: Other Linux
: VHI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 430531 430871 430955 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-12-05 17:45 UTC by Alexandre Pereira
Modified: 2021-05-09 13:05 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.20.5


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Pereira 2020-12-05 17:45:04 UTC
SUMMARY
So i am using opensuse git packages ( up to date daily master branch ).

I have a horizontal panel at top. If i press the "plus" sign for making the panel size bigger, it actually gets reduced. The inverse also happens, the "minus" sign makes the panel bigger.


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2020-12-06 15:14:29 UTC
Caused by the fix I made for Bug 429063.

Darn, this is in the stable branch, so it's a regression. :(
Comment 2 Nate Graham 2020-12-11 21:16:03 UTC
David, I'm feeling stumped regarding how to fix this without either regressing the original fix for Bug 429063, or adding new API to the PlasmaCompoents3 SpinBox. Do you think you could help me come up with something?
Comment 3 David Edmundson 2020-12-14 00:06:03 UTC
Was PC3's drag handler added purely for this panel use case? It seems weird for anything else, and it's adding functionality into the style.
Comment 4 Nate Graham 2020-12-14 02:53:16 UTC
It was added specifically for this feature, but the intent was do implement it in the component itself because the drag-to-change-the-value behavior was deemed generally desirable. We'd like to put this in the Breeze desktop spinbox too.
Comment 5 David Edmundson 2020-12-18 12:14:59 UTC
*** Bug 430531 has been marked as a duplicate of this bug. ***
Comment 6 David Edmundson 2020-12-22 10:50:00 UTC
> We'd like to put this in the Breeze desktop spinbox too.

Styles are for styling. New features are best served with a decorator pattern or subclasses. We don't have this situation then.
Comment 7 David Edmundson 2020-12-22 16:37:29 UTC
In terms of moving forward and options within the current code.

Option 1:
Go with your original patch in frameworks. This must remain an exception and not a rule.

Guard usage on the client side with

` 
Component.onCompleted: if (self.hasOwnProperty("reverseDragAndScrollDirections")) {
self.reverseDragAndScrollDirections = true;
}
`
so it's backportable and won't break when we move to generic styles.
and drop the stepSize change

Option 2:
Same but in reverse. Have the style query `control.hasOwnProperty("reverseDragAndScrollDirections") && control.reverseDragAndScrollDirections`

Then declare that as a new property in the panel's spinbox.
It'd be closer to how Breeze does additional things from widget controls

Option3:
Spinbox.down.indicator is public API, we can re-implement the relevant FrameSVG code, but swap the +/-
and keep the current negative stepsize

Option4:
override contentItem inside the panel
and keep the current negative stepsize
Comment 8 Nate Graham 2020-12-26 15:25:34 UTC
Git commit 3a0ce695fd09b1b1094c8fbdd991d9e32ae399e2 by Nate Graham, on behalf of Srevin Saju.
Committed on 26/12/2020 at 15:25.
Pushed by ngraham into branch 'master'.

revert: bf7d64b3 . Fixes panel height adjusting fails when the panel is on top / left

M  +1    -4    desktoppackage/contents/configuration/panelconfiguration/ToolBar.qml

https://invent.kde.org/plasma/plasma-desktop/commit/3a0ce695fd09b1b1094c8fbdd991d9e32ae399e2
Comment 9 Nate Graham 2020-12-26 15:26:09 UTC
Git commit 687935970717d9bb57b364ee95baae57d7f1b266 by Nate Graham, on behalf of Srevin Saju.
Committed on 26/12/2020 at 15:26.
Pushed by ngraham into branch 'Plasma/5.20'.

revert: bf7d64b3 . Fixes panel height adjusting fails when the panel is on top / left


(cherry picked from commit 3a0ce695fd09b1b1094c8fbdd991d9e32ae399e2)

M  +1    -4    desktoppackage/contents/configuration/panelconfiguration/ToolBar.qml

https://invent.kde.org/plasma/plasma-desktop/commit/687935970717d9bb57b364ee95baae57d7f1b266
Comment 10 Nate Graham 2020-12-28 15:16:09 UTC
*** Bug 430871 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2021-05-09 13:05:47 UTC
*** Bug 430955 has been marked as a duplicate of this bug. ***