|
Bugzilla – Full Text Bug Listing |
| Summary: | Truncated labels in qt and ncurses | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE Linux 10.1 | Reporter: | Martin Vidner <mvidner> |
| Component: | YaST2 | Assignee: | Stefan Hundhammer <shundhammer> |
| Status: | VERIFIED MOVED | QA Contact: | Klaus Kämpf <kkaempf> |
| Severity: | Normal | ||
| Priority: | P3 - Medium | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
Screenshot in qt
Screenshot in ncurses |
||
|
Description
Martin Vidner
2001-08-28 15:55:49 UTC
Created attachment 8931 [details]
Screenshot in qt
Created attachment 8932 [details]
Screenshot in ncurses
You are talking about the "table" widget, not the SelectionBox, right? This is what is used in this code example. Oops, of course, the lower one is a table. This is a layout problem, not an UI problem: Since the table itself does not have a caption above it (it has column headers instead), you are using a Label widget to simulate that. The label widget, however, does NOT resize itself when its label (its value) is changed, so it sticks to its initial size. You can either make the label large enough when you create it (specify `opt(`hstretch) should do the trick) or put it inside a ReplacePoint and then replace the entire widget rather than change its label. ReplaceWidget() unlike ChangeWidget() causes a re-layout of the dialog. BTW this is a feature, not a bug: Geometry management is expensive, so we don't do that upon every single ChangeWidget() call. OK, hstretch worked. Please mention this in the layout tutorial, the difference between ChangeWidget and ReplaceWidget as well as the trick with reserving enough space beforehand. By the way, the original code reserved a fixed-width space which did not work because the space shrunk as the label got a new shorter value. Not the way to go. (found in SL 7.3 pre, moving just to make it public) UI::RecalcLayout now exists for such situations |