diff options
author | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2013-02-21 20:23:40 +0000 |
---|---|---|
committer | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2013-02-21 20:23:40 +0000 |
commit | 1d38577d338d6337cd9b4fea4bb4b9d2a88e8848 (patch) | |
tree | 12c71438431b642af6065f039a6338130653a5d1 /src/screens | |
parent | 251544d4fce0fcea343f9f64b67e8e981064c020 (diff) | |
download | usdx-1d38577d338d6337cd9b4fea4bb4b9d2a88e8848.tar.gz usdx-1d38577d338d6337cd9b4fea4bb4b9d2a88e8848.tar.xz usdx-1d38577d338d6337cd9b4fea4bb4b9d2a88e8848.zip |
Do some semi-automatic text size adjustment. Fixes Gaelic button texts.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2941 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/screens')
-rw-r--r-- | src/screens/UScreenStatMain.pas | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/screens/UScreenStatMain.pas b/src/screens/UScreenStatMain.pas index 204f40cd..ef756a43 100644 --- a/src/screens/UScreenStatMain.pas +++ b/src/screens/UScreenStatMain.pas @@ -149,6 +149,17 @@ begin if (Length(Button[1].Text)=0) then AddButtonText(14, 20, Theme.StatDetail.Description[1]); +// This fixes the size of the button texts for gaelic +// Maybe other languages, too. +// Could probably be extended for an automatic text size adjustment +// It simply takes the number of characters, neglecting the actual width. +// The actual width came back as 0. Maybe, it is not properly calculated. + + if (Length(Button[1].Text[0].Text) > 13) then + Button[1].Text[0].Size := 21; + if (Length(Button[1].Text[0].Text) > 22) then + Button[1].Text[0].Size := 19; + AddButton(Theme.StatMain.ButtonSongs); if (Length(Button[2].Text)=0) then AddButtonText(14, 20, Theme.StatDetail.Description[2]); @@ -157,6 +168,9 @@ begin if (Length(Button[3].Text)=0) then AddButtonText(14, 20, Theme.StatDetail.Description[3]); + if (Length(Button[3].Text[0].Text) > 22) then + Button[3].Text[0].Size := 19; + AddButton(Theme.StatMain.ButtonExit); if (Length(Button[4].Text)=0) then AddButtonText(14, 20, Theme.Options.Description[4]); |