News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

The position of buttons are not appropriate in private gate sign window

Started by THLeaderH, June 23, 2019, 10:54:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

In r8773, the buttons in the private gate sign window is not correctly positioned like the image below.



This phenomenon occurs only when the window is opened for the first time. If I opened the window twice or more, the position of the buttons are correct like this.


danivenk

I have the same problem, after some tests I could conclude that even in maps made and run in r8756 have this problem....

danivenk

Today I tried some more, the bug doesn't happen in the simutrans 120.4.1 (r8600) version. But it does happen in the oldest nightly version I could find (r8750)

https://www.dropbox.com/s/rrsqo3yjemhuhkp/simscr23.png?dl=0
https://www.dropbox.com/s/l4bm4tfjgbv0s8o/simscr22.png?dl=0

shingoushori

fill_buffer() on obj_infowin_t::obj_infowin_t(const obj_t* obj)  seems to be obstacle, at least about private gate sign window.
so 2 plans for repairing are, I've made.

plan_minimum.diff : This is minimal. Only effective with privatesign_info_t. It is very ad hoc.
It have left the possibility of the same problem occurring elsewhere.

plan_objinfowin.diff : It is simple. However, the possibility of occurring elsewhere has been resolved.
To be worried about, It affects _info_t which has no tab. Only for a moment, the display size is small.

but There may be more essential solutions ...

Dwachs

Thanks for the report, it should be fixed in r8776.

@shingoushori: thanks for the patches, but the problem was more fundamental: in simwin.cc:730 a resize-event is sent to the window, the old base-info::infowin_event method set the view-element to visible, then the size calculations treated the view element as if it were positioned below the text-area. Hence the gap. I fixed this by introducing a new helper class that takes care of the combination of text-area and view element.
Parsley, sage, rosemary, and maggikraut.


THLeaderH