News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

The delete save button displays "..." in some fonts

Started by Ranran(retired), October 27, 2020, 09:20:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

The delete save button displays the character "X", which may be omitted depending on the font and become "...".


This is because the button has a fixed width, but depending on the font, the width of the character "X" may exceed that fixed width. And some themes have offsets.
I noticed this issue because extended defaults to show_delete_buttons = 1. (However, the image above is a standard's screen. And I think the above font and theme combinations may be relatively popular.)

The corresponding code is here:
https://github.com/aburch/simutrans/blob/98d9a3f51c6b71e071a2c52e6ae154049f1a1709/gui/savegame_frame.cc#L31

I think it can be fixed by doing the following.

scr_size get_min_size() const OVERRIDE { return scr_size(proportional_string_width("X")+ gui_theme_t::gui_button_text_offset.w*2, D_BUTTON_HEIGHT); }
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Dwachs

Parsley, sage, rosemary, and maggikraut.

Ranran(retired)

Apologies for my previous incomplete report.  :-[
One of the causes of this bug was that the modern theme had padding.
With the fix of r9345, the buttons are too thin because there is no padding on the left and right of "X" in the theme that does not have padding.
I submit a patch to fix this. please confirm.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Ranran(retired)

I also remembered that there is a similar issue in the player color dialog.
I apologize for failing to report. I didn't care about that at the time.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Dwachs

Quote from: Ranran on November 02, 2020, 11:33:45 AM
With the fix of r9345, the buttons are too thin because there is no padding on the left and right of "X" in the theme that does not have padding.
Which theme has this problem?
Parsley, sage, rosemary, and maggikraut.

Dwachs

Parsley, sage, rosemary, and maggikraut.

Ranran(retired)

I've confirmed that this has been fixed. Thank you very much.  :)
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)