https://git.reactos.org/?p=reactos.git;a=commitdiff;h=183a81ee828ec41044618…
commit 183a81ee828ec4104461837a86838f9d09d17e45
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Wed Oct 23 14:54:33 2019 +0300
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Oct 23 13:54:33 2019 +0200
[FREELDR] MiniTui: Fix progress bar width on custom resolutions (#1964)
+ Sync with the "direct-UI" i.e. with less bugs.
Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
---
boot/freeldr/freeldr/ui/minitui.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/boot/freeldr/freeldr/ui/minitui.c b/boot/freeldr/freeldr/ui/minitui.c
index 97a0e2857b0..1cd5aff7163 100644
--- a/boot/freeldr/freeldr/ui/minitui.c
+++ b/boot/freeldr/freeldr/ui/minitui.c
@@ -4,7 +4,7 @@
* FILE: boot/freeldr/freeldr/ui/minitui.c
* PURPOSE: Mini Text UI interface
* PROGRAMMERS: Brian Palmer <brianp(a)sginet.com>
- * Herv� Poussineau
+ * Hervé Poussineau
*/
#ifndef _M_ARM
#include <freeldr.h>
@@ -31,23 +31,24 @@ VOID MiniTuiDrawStatusText(PCSTR StatusText)
VOID MiniTuiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressText)
{
- ULONG Left, Top, Right, Bottom;
- ULONG Width = 50; // Allow for 50 "bars"
- ULONG Height = 2;
+ ULONG Left, Top, Right, Bottom, Width, Height;
- Width = 80;
+ /* Build the coordinates and sizes */
+ Height = 2;
+ Width = UiScreenWidth;
Left = 0;
- Right = Left + Width;
+ Right = (Left + Width) - 1;
Top = UiScreenHeight - Height - 4;
Bottom = Top + Height + 1;
+ /* Draw the progress bar */
MiniTuiDrawProgressBar(Left, Top, Right, Bottom, Position, Range, ProgressText);
}
VOID MiniTuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG
Position, ULONG Range, PCHAR ProgressText)
{
ULONG i;
- ULONG ProgressBarWidth = (Right - Left) - 4;
+ ULONG ProgressBarWidth = (Right - Left) - 3;
// First make sure the progress bar text fits
UiTruncateStringEllipsis(ProgressText, ProgressBarWidth - 4);