https://bugs.kde.org/show_bug.cgi?id=385715

            Bug ID: 385715
           Summary: KStatusBar insertFixedItem does not fix size (issue in
                    kmplot KStatusBar)
           Product: frameworks-kdelibs4support
           Version: unspecified
          Platform: Other
                OS: FreeBSD
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kdelibs-b...@kde.org
          Reporter: tcber...@freebsd.org
  Target Milestone: ---

Created attachment 108338
  --> https://bugs.kde.org/attachment.cgi?id=108338&action=edit
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

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

Reply via email to