Opened 12 years ago

Closed 11 years ago

Last modified 7 years ago

#319 closed defect (fixed)

Buttons in SAI information window are not visible

Reported by: aboeckma Owned by: devel
Priority: major Milestone:
Component: Library (GUI) Version: gtkport
Keywords: Cc:

Description

  • click SAI → Manage SAIs
  • notice that the buttons on the right side are nearly completely hidden by the list window.

Change History (8)

comment:1 Changed 11 years ago by westram

  • Priority changed from normal to major
  • Summary changed from Buttons in SAI Infromation window are not visible to Buttons in SAI information window are not visible

comment:2 Changed 11 years ago by westram

  • Milestone set to gtkmerge

comment:3 follow-up: Changed 11 years ago by epruesse

  • Resolution set to fixed
  • Status changed from new to closed

fixed by r10694 … sort of

The underlying issue is that widgets may be wider in GTK, depending on e.g. font size. In the case at hand, a width of at least 40 columns was requested for the selection widget, which therefore overlapped with the buttons. The width request overrides the xfig width because some buttons would be unreadable otherwise.

To fix this the xfig handling in AW_at and AW_at_layout would have to be extended to become completely dynamic. I.e. shift everything down/right if a widget is added that needs more space. Since glade type definition of windows, instead of xfig, is more flexible and the ulterior goal anyway, I vote for accepting that some things just don't look right until the optics can be fixed after the merge.

comment:4 in reply to: ↑ 3 ; follow-up: Changed 11 years ago by westram

Replying to epruesse:

The underlying issue is that widgets may be wider in GTK, depending on e.g. font size. In the case at hand, a width of at least 40 columns was requested for the selection widget, which therefore overlapped with the buttons.

The width of 40 requested should only be used if no width is specified by xfig. It's a fallback value for SAI selection lists (with similar defaults for other selection lists).

The size of most selection lists in ARB is specified via xfig $tag and $to:tag labels.

The width request overrides the xfig width because some buttons would be unreadable otherwise.

I dont understand why setting a specific width for the selection list affects any of the buttons!?

comment:5 Changed 11 years ago by westram

To test I have reverted [10694] and changed the default width in ALL calls to AW_window::create_selection_list() to '3'. Doing that renders the SAI window perfectly (and very similar to motif layout) - so there is no general problem: gtk-version just should ignore default width/height if they are overridden by xfig

comment:6 Changed 11 years ago by westram

[10694] has been reverted by [11078]

comment:7 in reply to: ↑ 4 Changed 11 years ago by epruesse

I dont understand why setting a specific width for the selection list affects any of the buttons!?

Because it's handled by the same code path.

There are two ways of specifying the width of a widget. Either a width in characters is given by the code (label width for buttons or columns for selection lists), or a width in pixels is given by the xfig.

The current code uses whichever is bigger. For buttons, the xfig width will often be too small as buttons in GTK have a wider border. If I make xfig priority, many of them will become unreadable.

Yes, this could be fixed by adding code. Either by having different code paths for selection lists (where the xfig has priority? always?) or by shifting the at positions given by the xfig to resolve conflicts.

My preferred solution would be to switch the affected windows to a flexible window layout using glade-xml. That needs to be done anyway and fixes the issue neatly.

comment:8 Changed 7 years ago by westram

  • Milestone gtkmerge deleted

Ticket retargeted after milestone deleted

Note: See TracTickets for help on using tickets.