News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

combobox inside the tab

Started by RESTRICTED ACCOUNT, November 11, 2020, 10:48:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RESTRICTED ACCOUNT

I'm sorry but, I wonder if this is a bug that comes from standard code. (´・ω・`)

Extended has used a combo box instead of a toggle button.

It doesn't seem to work properly if the combobox is inside a tab.
Older GUI engines never opened it upwards. Yes, there is something wrong with the display when it opens upwards.


Behaves like this when in the gui_aligned_container.



If not gui_aligned_container


Combo boxes with errors have in common that they are in tabs. But unfortunately no similar arrangement is seen in standard.
If I suspect I'm making a mistake, I'd appreciate it if you could give me some hints on how to resolve it.

prissi

Comboboxes are hackish, since they require careful tracking of the focus. But without the source code I suspect the second example text is drawn in ::draw after a gui_frame_t::draw() call and not a a gui_xxx element. This mixing of drawing does not work. You have to have you custom dran element inside a gui_componenet_t or gui_container_t and overide the draw method then.

I the first example it may help to enlarge the contaienr to the actual dialog bottom (either by setting the maximize flags or adding a fill component). It might be also an error.

Dwachs

There is some clipping involved. That list is clipped. I suspect at gui/components/gui_scrollpane.cc line 264. A possible fix(hackish) would be to temporarily reset the clipping in gui_combobox_t::draw.
Parsley, sage, rosemary, and maggikraut.

RESTRICTED ACCOUNT

Thank you for your advice and the correction work.
It seems that a recent fix only fixed the overlapping with tab labels.


This was previously pointed out by james, but mousehole operations seem to prioritize tab scrolling when it is in an aligned container.

When a tab has a scroll bar, the combo box inside the tab cannot be scrolled with the mouse. But if the tab doesn't have a scrollbar, you can scroll it with the mouse.


Works fine with older GUI.




However, if you open it upwards, the click and mouse wheel will be disabled above the red line.
The button is shown at the bottom, but the button has priority for the action. The same is true for tab labels.