mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-02-02 22:51:28 +01:00
Correct wrong text size length with proportional font, and hang with SVG in some cases
This commit is contained in:
parent
ce9538bb4e
commit
4d89b2d976
@ -1681,7 +1681,7 @@ VOID REFIT_MENU_SCREEN::GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *Pa
|
||||
for (INTN i = ScrollState.FirstVisible, j = 0; i <= ScrollState.LastVisible; i++, j++) {
|
||||
REFIT_ABSTRACT_MENU_ENTRY *Entry = &Entries[i];
|
||||
ResultString = Entry->Title; //create a copy to modify later
|
||||
if (!ThemeX.TypeSVG && ResultString.length() > MenuMaxTextLen) {
|
||||
if (!ThemeX.TypeSVG && !ThemeX.Proportional && ResultString.length() > MenuMaxTextLen) {
|
||||
ResultString = ResultString.subString(0,MenuMaxTextLen-3) + L".."_XSW;
|
||||
}
|
||||
TitleLen = ResultString.length();
|
||||
@ -1764,7 +1764,7 @@ VOID REFIT_MENU_SCREEN::GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *Pa
|
||||
REFIT_ABSTRACT_MENU_ENTRY *EntryC = &Entries[ScrollState.CurrentSelection];
|
||||
|
||||
ResultString = EntryL->Title;
|
||||
if (!ThemeX.TypeSVG && ResultString.length() > MenuMaxTextLen) {
|
||||
if (!ThemeX.TypeSVG && !ThemeX.Proportional && ResultString.length() > MenuMaxTextLen) {
|
||||
ResultString = ResultString.subString(0,MenuMaxTextLen-3) + L".."_XSW;
|
||||
}
|
||||
TitleLen = ResultString.length();
|
||||
@ -1826,7 +1826,7 @@ VOID REFIT_MENU_SCREEN::GraphicsMenuStyle(IN UINTN Function, IN CONST CHAR16 *Pa
|
||||
|
||||
// current selection
|
||||
ResultString = EntryC->Title;
|
||||
if (!ThemeX.TypeSVG && ResultString.length() > MenuMaxTextLen) {
|
||||
if (!ThemeX.TypeSVG && !ThemeX.Proportional && ResultString.length() > MenuMaxTextLen) {
|
||||
ResultString = ResultString.subString(0,MenuMaxTextLen-3) + L".."_XSW;
|
||||
}
|
||||
TitleLen = ResultString.length();
|
||||
|
@ -840,6 +840,15 @@ void XTheme::InitBar()
|
||||
ScrollEndImage.LoadXImage(ThemeDir, "scrollbar\\scroll_end");
|
||||
UpButtonImage.LoadXImage(ThemeDir, "scrollbar\\up_button");
|
||||
DownButtonImage.LoadXImage(ThemeDir, "scrollbar\\down_button");
|
||||
} else {
|
||||
ScrollbarBackgroundImage.setEmpty();
|
||||
BarStartImage.setEmpty();
|
||||
BarEndImage.setEmpty();
|
||||
ScrollbarImage.setEmpty();
|
||||
ScrollStartImage.setEmpty();
|
||||
ScrollEndImage.setEmpty();
|
||||
UpButtonImage.setEmpty();
|
||||
DownButtonImage.setEmpty();
|
||||
}
|
||||
|
||||
//some help with embedded scroll
|
||||
|
Loading…
Reference in New Issue
Block a user