The International Simutrans Forum

 

Author Topic: The position of buttons are not appropriate in private gate sign window  (Read 682 times)

0 Members and 1 Guest are viewing this topic.

Offline THLeaderH jp

  • Coder/patcher
  • Devotee
  • *
  • Posts: 340
  • Languages: JP,EN
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.


Offline danivenk

  • *
  • Posts: 96
  • Languages: EN, NL, JP
I have the same problem, after some tests I could conclude that even in maps made and run in r8756 have this problem....

Offline danivenk

  • *
  • Posts: 96
  • Languages: EN, NL, JP
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

Offline shingoushori

  • *
  • Posts: 18
  • Languages: JP
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 ...
« Last Edit: June 29, 2019, 12:24:04 PM by shingoushori »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4620
  • Languages: EN, DE, AT
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.

Offline danivenk

  • *
  • Posts: 96
  • Languages: EN, NL, JP
When do you think r8776 will come out?

Offline THLeaderH jp

  • Coder/patcher
  • Devotee
  • *
  • Posts: 340
  • Languages: JP,EN
Dwachs, thank you. I confirmed that the problem was solved  ;D