mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-04-05 18:25:52 +02:00
Move MaxTextLen initialization to menu init
This commit is contained in:
parent
84f7f87a53
commit
1f991d348e
@ -1559,7 +1559,7 @@ VOID REFIT_MENU_SCREEN::GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *Pa
|
||||
UINTN OldChosenItem = ~(UINTN)0;
|
||||
INTN TitleLen = 0;
|
||||
INTN ScaledWidth = (INTN)(ThemeX.CharWidth * ThemeX.Scale);
|
||||
UINTN MaxTextLen = (UINTN)(MenuWidth / ScaledWidth);
|
||||
UINTN MaxTextLen;
|
||||
|
||||
// clovy
|
||||
INTN ctrlX, ctrlY, ctrlTextX;
|
||||
@ -1597,7 +1597,6 @@ VOID REFIT_MENU_SCREEN::GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *Pa
|
||||
//MenuWidth = 80; // minimum
|
||||
MenuWidth = (int)(LAYOUT_TEXT_WIDTH * ThemeX.Scale); //500
|
||||
|
||||
|
||||
if (!TitleImage.isEmpty()) {
|
||||
if (MenuWidth > (INTN)(UGAWidth - (int)(TITLEICON_SPACING * ThemeX.Scale) - TitleImage.GetWidth())) {
|
||||
MenuWidth = UGAWidth - (int)(TITLEICON_SPACING * ThemeX.Scale) - TitleImage.GetWidth() - 2;
|
||||
@ -1611,6 +1610,8 @@ VOID REFIT_MENU_SCREEN::GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *Pa
|
||||
}
|
||||
TimeoutPosY = EntriesPosY + (Entries.size() + 1) * ThemeX.TextHeight;
|
||||
|
||||
MaxTextLen = (UINTN)(MenuWidth / ScaledWidth);
|
||||
|
||||
// initial painting
|
||||
ThemeX.MeasureText(Title, &ItemWidth, NULL);
|
||||
if (!(ThemeX.HideUIFlags & HIDEUI_FLAG_MENU_TITLE)) {
|
||||
|
Loading…
Reference in New Issue
Block a user