[plasmashell] [Bug 416294] Setting a numeric OSD label outside range 0-100 breaks OSD progressbar

2020-07-24 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=416294

Nate Graham  changed:

   What|Removed |Added

   Version Fixed In||5.20

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 416294] Setting a numeric OSD label outside range 0-100 breaks OSD progressbar

2020-07-24 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=416294

Nate Graham  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|CONFIRMED   |RESOLVED

--- Comment #8 from Nate Graham  ---
No longer an issue with the latest OSD design as it can accept higher numbers
now

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 416294] Setting a numeric OSD label outside range 0-100 breaks OSD progressbar

2020-01-18 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=416294

--- Comment #7 from i.hin.hu...@gmail.com ---
(In reply to Kai Uwe Broulik from comment #2)
> I can't reproduce. I tried various combinations of:
> 
> qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.showText
> dialog-information "Some stupid long text which will cause problems"
> qdbus org.kde.plasmashell /org/kde/osdService
> org.kde.osdService.volumeChanged 200
> qdbus org.kde.plasmashell /org/kde/osdService
> org.kde.osdService.volumeChanged 25
> qdbus org.kde.plasmashell /org/kde/osdService
> org.kde.osdService.volumeChanged -50

No problem with "proper" strings or strings that can be parsed into numbers
inside 0-100 range, these two commands don't trigger the bug:
qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.showText
dialog-information "Some stupid long text which will cause problems"
qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.showText
dialog-information "50"

Steps to reproduce:
qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.showText
dialog-information "-1"   # triggers the bug
qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.volumeChanged
25   # progressbar stuck to 0% no matter the number entered

# restart plasma here, and everything works again

qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.showText
dialog-information "101"   # triggers the bug
qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.volumeChanged
25# progressbar stuck to 100% no matter the number entered

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 416294] Setting a numeric OSD label outside range 0-100 breaks OSD progressbar

2020-01-16 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=416294

--- Comment #6 from i.hin.hu...@gmail.com ---
typo: the command run on screenshot 2 was "qdbus org.kde.plasmashell
/org/kde/osdService org.kde.osdService.brightnessChanged 50", not the
volumeChanged one I mistakenly copy-pasted in comment 5 (which shows the exact
same problem, btw).

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 416294] Setting a numeric OSD label outside range 0-100 breaks OSD progressbar

2020-01-16 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=416294

--- Comment #5 from i.hin.hu...@gmail.com ---
Sorry, just some bad wording from my part. The issue arises because the
notification of the audio output change (see schreenshot 1 - my headphones are
unfortunately labeled as "40337" by the bluetooth stack, and I had neved
bothered changing that). This string is passed down to this section inside
"/usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/osd/OsdItem.qml":

 PlasmaComponents.ProgressBar {
id: progressBar

anchors {
bottom: parent.bottom
left: parent.left
right: parent.right
margins: Math.floor(units.smallSpacing / 2)
}

visible: rootItem.showingProgress
minimumValue: 0
maximumValue: 100

value: Number(rootItem.osdValue)   < problem happens here!
}


This snippet of code smartly hides the progressbar if there is no useful value
to display, still passes the actual string tho the highlined line. If
rootItem.osdValue happens to be a regular string, PlasmaComponents.ProgressBar
works as intended (i think due to Number() passing down some NaN or something
like that, I haven't researched), and in fact if I change name to my device
(something like "Headphones" instead of "40337"), everything indeed works fine.
The bug arises when osdValue actually contains some string that can be parsed
as a number (like my unlucky "40337"). In this case,
PlasmaComponents.ProgressBar's value gets set to a value outside the intended
0-100 range and triggers the bug (see screenshot 2, taken after running qdbus
org.kde.plasmashell /org/kde/osdService org.kde.osdService.volumeChanged 50).
This persists until a plasma restart. As a quick hack I changed that code line
to:

value: Number(rootItem.osdValue) <= 100 ? Number(rootItem.osdValue) : 0

which in my case solved the issue as well. However, this is not a complete
solution (negative numbers still trigger the bug), it's just a crude hack and
frankly I don't have the experience to tell if it's actually better to fix this
behaviour inside the ProgressBar component. It's a really minor issue, so sorry
for the wall of text, but I reported this because it could trigger some hard to
investigate bugs (sure this one was for me!)

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 416294] Setting a numeric OSD label outside range 0-100 breaks OSD progressbar

2020-01-16 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=416294

--- Comment #4 from i.hin.hu...@gmail.com ---
Created attachment 125186
  --> https://bugs.kde.org/attachment.cgi?id=125186=edit
Screenshot 2 - after setting brightness to 50% via qdbus

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 416294] Setting a numeric OSD label outside range 0-100 breaks OSD progressbar

2020-01-16 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=416294

--- Comment #3 from i.hin.hu...@gmail.com ---
Created attachment 125185
  --> https://bugs.kde.org/attachment.cgi?id=125185=edit
screenshot 1 - bug triggering message

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 416294] Setting a numeric OSD label outside range 0-100 breaks OSD progressbar

2020-01-16 Thread Kai Uwe Broulik
https://bugs.kde.org/show_bug.cgi?id=416294

Kai Uwe Broulik  changed:

   What|Removed |Added

 CC||k...@privat.broulik.de

--- Comment #2 from Kai Uwe Broulik  ---
I can't reproduce. I tried various combinations of:

qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.showText
dialog-information "Some stupid long text which will cause problems"
qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.volumeChanged
200
qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.volumeChanged
25
qdbus org.kde.plasmashell /org/kde/osdService org.kde.osdService.volumeChanged
-50

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 416294] Setting a numeric OSD label outside range 0-100 breaks OSD progressbar

2020-01-16 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=416294

David Edmundson  changed:

   What|Removed |Added

 CC||k...@davidedmundson.co.uk

--- Comment #1 from David Edmundson  ---
Can you give steps to reproduce with a list of calls to:

qdbus org.kde.plasmashell /org/kde/osdService
org.kde.osdService.brightnessChanged 

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 416294] Setting a numeric OSD label outside range 0-100 breaks OSD progressbar

2020-01-16 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=416294

Nate Graham  changed:

   What|Removed |Added

   Assignee|plasma-b...@kde.org |visual-des...@kde.org
  Component|general |Theme - Breeze
   Target Milestone|--- |1.0
Product|Breeze  |plasmashell
 CC||n...@kde.org,
   ||plasma-b...@kde.org

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 416294] Setting a numeric OSD label outside range 0-100 breaks OSD progressbar

2020-01-16 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=416294

Nate Graham  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|REPORTED|CONFIRMED

-- 
You are receiving this mail because:
You are watching all bug changes.