Bug 389998 - Color bar painting failures in statistics main window
Summary: Color bar painting failures in statistics main window
Status: RESOLVED FIXED
Alias: None
Product: parley
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: parley bug tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-07 10:36 UTC by Hartmut Riesenbeck
Modified: 2018-11-15 19:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Statistics Window With Marked Failures (80.87 KB, image/png)
2018-02-07 10:36 UTC, Hartmut Riesenbeck
Details
Detail View of Bar Length Failure (2.84 KB, image/png)
2018-02-07 10:38 UTC, Hartmut Riesenbeck
Details
Detail View of Border Line Failure in Bar Chart (2.75 KB, image/png)
2018-02-07 10:39 UTC, Hartmut Riesenbeck
Details
Detail View of Border Line Failure in Chart Legend (4.40 KB, image/png)
2018-02-07 10:39 UTC, Hartmut Riesenbeck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hartmut Riesenbeck 2018-02-07 10:36:32 UTC
Created attachment 110390 [details]
Statistics Window With Marked Failures

Some color bars of the lesson statistics bar chart in the lesson practice window are not drawn to its full length. Furthermore sometimes the border line between two bar segments was not drawn. See attached screenshots.

Steps to Reproduce:
1) Open a file with vocables of different practice levels in dashboard window.
2) Now statistics main window with its bar chart is displayed.
3) If no paint failure is seen. You can change the window width or open a different file with another amount of vocables.

Actual Results:
Some of the color bars are not drawn to the end of the chart. Some black border lines between the color bar segments are not drawn. See attached screenshots.

Expected Results:
All color bars should be drawn to the end of the chart and should have rounded edges on the right and left side. All color bar segments should be separated by black lines (not gray).

Version:
Build from latest source code from git repository.
origin/Applications/17.12
Comment 1 Hartmut Riesenbeck 2018-02-07 10:38:02 UTC
Created attachment 110391 [details]
Detail View of Bar Length Failure
Comment 2 Hartmut Riesenbeck 2018-02-07 10:39:05 UTC
Created attachment 110392 [details]
Detail View of Border Line Failure in Bar Chart
Comment 3 Hartmut Riesenbeck 2018-02-07 10:39:37 UTC
Created attachment 110393 [details]
Detail View of Border Line Failure in Chart Legend
Comment 4 Hartmut Riesenbeck 2018-11-15 19:30:52 UTC
Git commit d3fc379d415b955012f2c2a0d3de1ec2a0727bb5 by Hartmut Riesenbeck.
Committed on 15/11/2018 at 19:30.
Pushed by hriesenbeck into branch 'master'.

Fix color bar painting failures in statistics main window

Summary:
Some color bars of the bar chart in LessonStatisticsView are not drawn
to its full length. The reason are rounding errors in bar segment length
calculation. To fix this, all integer values were replaced by floating
point variables.

Furthermore sometimes the border line between two bar segments was not
drawn when constructed with QPainterPath. The relevant QPainterPath
operation were replaced by direct drawing operations to the QPainter
object.

Reviewers: #kde_edu, tcanabrava

Reviewed By: #kde_edu, tcanabrava

Subscribers: kde-edu, tcanabrava

Tags: #kde_edu

Differential Revision: https://phabricator.kde.org/D10367

M  +17   -17   src/utils.cpp

https://commits.kde.org/parley/d3fc379d415b955012f2c2a0d3de1ec2a0727bb5