The International Simutrans Forum

 

Author Topic: theme support  (Read 827 times)

0 Members and 1 Guest are viewing this topic.

Offline Andarix

  • *
  • Posts: 336
  • Languages: de
theme support
« on: October 16, 2021, 07:37:13 AM »
For the height of input fields there is the parameter gui_edit_height.

Which parameter sets the height of selection fields?

« Last Edit: November 25, 2021, 07:09:44 AM by Andarix »

Online Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4930
  • Languages: EN, DE, AT
Re: r10154 - theme support
« Reply #1 on: October 16, 2021, 10:31:23 AM »
This setting was ignored mostly. Fixed it in r10158. Note that gui_edit_height is not used anywhere.

Offline Andarix

  • *
  • Posts: 336
  • Languages: de
Re: r10154 - theme support
« Reply #2 on: October 16, 2021, 11:58:46 AM »
https://simutrans-germany.com/wiki/wiki/en_ThemeDef#Sizes

Which of the parameters are still missing?

Offline Andarix

  • *
  • Posts: 336
  • Languages: de
Re: r10154 - theme support
« Reply #3 on: October 16, 2021, 03:02:26 PM »
r10164

Now the input field is again smaller than the selection field.

How do you get the same height for both fields?


Online Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4930
  • Languages: EN, DE, AT
Re: r10154 - theme support
« Reply #4 on: October 16, 2021, 04:19:21 PM »
The height of the selection field also depends on the heights of the arrow-graphics. If they are large then the selection field maybe higher than the input.

What theme is this? I cannot reproduce it.


Quote
https://simutrans-germany.com/wiki/wiki/en_ThemeDef#Sizes

Which of the parameters are still missing?

No idea. There is a long list of theme related variables in the code, but it is hard to track down, which of the are used somewhere. See gui/gui_theme.h and .cc.

Offline Andarix

  • *
  • Posts: 336
  • Languages: de
Re: r10154 - theme support
« Reply #5 on: October 16, 2021, 06:28:34 PM »
The height of the selection field also depends on the heights of the arrow-graphics. If they are large then the selection field maybe higher than the input.

What theme is this? I cannot reproduce it.
...

themes.zip

Online Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4930
  • Languages: EN, DE, AT
Re: r10154 - theme support
« Reply #6 on: October 17, 2021, 10:17:28 AM »
You set the gui-arrow-left to a very large value, which is used for the height of the select-box.

Offline Andarix

  • *
  • Posts: 336
  • Languages: de
Re: r10154 - theme support
« Reply #7 on: October 17, 2021, 10:50:16 AM »
You set the gui-arrow-left to a very large value, which is used for the height of the select-box.

I don't set anything there. The graphic is 32 x 24 pixels. And that is not very large on the television with 3840 x 2160 pixels resolution used at the time.

Online Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4930
  • Languages: EN, DE, AT
Re: r10154 - theme support
« Reply #8 on: October 17, 2021, 11:12:17 AM »
This line in the tab file is the reason:

gui_horizontal_arrow_height = 36

If this setting would not be there, the size of the graphics would be used instaed.

Offline Andarix

  • *
  • Posts: 336
  • Languages: de
theme support
« Reply #9 on: November 25, 2021, 06:32:24 AM »
Is it possible to insert a zoom parameter for themes that enlarges the vehicles in the depot and in the other dialogs?
« Last Edit: November 25, 2021, 07:10:16 AM by Andarix »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10976
  • Languages: De,EN,JP
Re: theme support
« Reply #10 on: November 25, 2021, 01:24:20 PM »
Since the menu buttons can be displayed zoomed but non-darknend with player colors, this should be possible without too much effort for vehicles as well.

Offline Andarix

  • *
  • Posts: 336
  • Languages: de
Re: r10154 - theme support
« Reply #11 on: November 26, 2021, 08:14:36 AM »
This line in the tab file is the reason:

gui_horizontal_arrow_height = 36

If this setting would not be there, the size of the graphics would be used instaed.

It is desirable that the fields have a uniform size behavior.


Online Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4930
  • Languages: EN, DE, AT
Re: theme support
« Reply #12 on: November 26, 2021, 12:32:13 PM »
Yes. But size also depends on font size. Also the depot window is a bad example, this is one (if not the last) that is still not converted to the 'new' scalable gui system.