Added titles to hotkey info label
This commit is contained in:
parent
9a92490f91
commit
f4f29f911a
@ -337,5 +337,12 @@ namespace ShareX.HelpersLib
|
||||
{
|
||||
return text.FromBase(from, digits).ToBase(to, digits);
|
||||
}
|
||||
|
||||
public static string PadCenter(this string str, int totalWidth, char paddingChar = ' ')
|
||||
{
|
||||
int padding = totalWidth - str.Length;
|
||||
int padLeft = (padding / 2) + str.Length;
|
||||
return str.PadLeft(padLeft, paddingChar).PadRight(totalWidth, paddingChar);
|
||||
}
|
||||
}
|
||||
}
|
@ -455,7 +455,8 @@ namespace ShareX
|
||||
int maxHotkeyLength = hotkeys.Max(x => x.HotkeyInfo.ToString().Length);
|
||||
int maxDescriptionLength = hotkeys.Max(x => x.TaskSettings.ToString().Length);
|
||||
|
||||
sb.AppendFormat("┌{0}┬{1}┐\r\n", new string('─', maxHotkeyLength + 2), new string('─', maxDescriptionLength + 2));
|
||||
// TODO: Translate
|
||||
sb.AppendFormat("┌{0}┬{1}┐\r\n", "Hotkey".PadCenter(maxHotkeyLength + 2, '─'), "Description".PadCenter(maxDescriptionLength + 2, '─'));
|
||||
|
||||
for (int i = 0; i < hotkeys.Count; i++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user