Bug 359016 - Setting annotation opacity lower than 100% results in 0% opacity
Summary: Setting annotation opacity lower than 100% results in 0% opacity
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.24.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-05 10:56 UTC by opensuse.lietuviu.kalba
Modified: 2016-02-07 23:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description opensuse.lietuviu.kalba 2016-02-05 10:56:31 UTC
Editing default opacity of annotation, results to creating invisible anotations, if opacity is not equal 100%.

Reproducible: Always

Steps to Reproduce:
1. Open Okular
2. Press F6 to show annotations bar
3. rigth-click annotations bar to configure it
4. Edit some item by changing opacity value, e.g. set 30%
5. Save changes
6. Try use edited annotation by highlighting some text

Actual Results:  
Annotation is invisible, but if you rigth-click in text, you can edit anotation. You see 0% value for opacity.

Expected Results:  
Opacity value is same as defined (e.g. 30%)

If I open ~/.kde4/share/config/okularpartrc
I see strange opacity="0\\,3" value:

[Reviews]
AnnotationTools=<tool type="strikeout" id="13"><engine type="TextSelector" color="#ff0000"><annotation opacity="0\\,3" type="StrikeOut" color="#ff0000"/></engine></tool>

But the correct one should be:
[Reviews]
AnnotationTools=<tool type="strikeout" id="13"><engine type="TextSelector" color="#ff0000"><annotation opacity="0.3" type="StrikeOut" color="#ff0000"/></engine></tool>
Comment 1 opensuse.lietuviu.kalba 2016-02-05 11:05:32 UTC
Originally bug found in Okular 0.21.3 + KDE 4.14

I can reproduce bug in latest Okular 0.24.0 + KDE Framewoks 18.0 + KDE Plasma 5.5.4 + Qt 5.5.1
Comment 2 Albert Astals Cid 2016-02-07 23:27:42 UTC
Git commit 41006445a9d8369d3891ea1feed7c977a3d0f1a5 by Albert Astals Cid.
Committed on 07/02/2016 at 23:27.
Pushed by aacid into branch 'Applications/15.12'.

setAttribute with doubles is evil as it uses the current locale and we don't want that, use QString::number

M  +5    -5    conf/widgetannottools.cpp

http://commits.kde.org/okular/41006445a9d8369d3891ea1feed7c977a3d0f1a5