Bug 385715

Summary: KStatusBar insertFixedItem does not fix size (issue in kmplot KStatusBar)
Product: [Frameworks and Libraries] frameworks-kdelibs4support Reporter: Tobias C. Berner <tcberner>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: yurchor
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: FreeBSD   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Example work around for kmplot.

Description Tobias C. Berner 2017-10-13 20:26:09 UTC
Created attachment 108338 [details]
Example work around for kmplot.

In kmplot's statusbar the coordinate display is truncated to "x...12 y...34".

It seems to be that the label in the KStatusBar does not have the appropriate with. 

kmplot create the labels intially with a long string "1234567890123456" [1]
however, when looking at the with caluclation in kdelibs4supports setItemFixed() the calculated value for the with is only '82':
   KStatusBar::setItemFixed to w= 82  for text ' "12…56" '.
note that it uses an elided form of the string to set the value. 

When querying fontMetrics in kmplot.cpp and setting the labels permanent with manually works around the issue [see attachment]. 


[1] https://github.com/KDE/kmplot/blob/master/kmplot/kmplot.cpp#L259
[2] https://github.com/KDE/kdelibs4support/blob/master/src/kdeui/kstatusbar.cpp#L178
Comment 1 Christoph Feck 2017-10-25 19:46:39 UTC
KmPlot should be ported aways from kdelibs4support. I think the bug that you cannot hide the statusbar is related to still using KStatusBar.
Comment 2 Yuri Chornoivan 2018-10-19 11:34:42 UTC
Now, when the porting from kdelibs4support is complete in git/master can you test if the problem is solved?

Thanks in advance for testing and reporting back.
Comment 3 Yuri Chornoivan 2018-11-16 13:22:08 UTC
Switching status as I cannot reproduce the bug anymore with KmPlot 1.2.2.
Comment 4 Bug Janitor Service 2018-12-01 03:44:52 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2018-12-16 03:44:35 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!