Skip to content

Commit

Permalink
imp - Made Calendar TUI partially transparent
Browse files Browse the repository at this point in the history
---

We've made the calendar TUI partially transparent because we have to remove the CalendarTuiBinding class in favor of Terminaux's Keybinding.

---

Type: imp
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Sep 7, 2024
1 parent 514682b commit 1a3dc49
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ private static void RenderStatus(ref Screen screen)
{
var builder = new StringBuilder();
builder.Append(
$"{KernelColorTools.GetColor(KernelColorType.TuiForeground).VTSequenceForeground}" +
$"{KernelColorTools.GetColor(KernelColorType.Background).VTSequenceBackground}" +
$"{ColorTools.RenderSetConsoleColor(KernelColorTools.GetColor(KernelColorType.TuiForeground))}" +
$"{ColorTools.RenderSetConsoleColor(KernelColorTools.GetColor(KernelColorType.Background), true)}" +
$"{TextWriterWhereColor.RenderWhere(status + ConsoleClearing.GetClearLineToRightSequence(), 0, 0)}"
);
return builder.ToString();
Expand All @@ -197,8 +197,8 @@ private static void RenderViewBox(ref Screen screen)
// Render the box
builder.Append(
$"{KernelColorTools.GetColor(KernelColorType.TuiPaneSeparator).VTSequenceForeground}" +
$"{KernelColorTools.GetColor(KernelColorType.Background).VTSequenceBackground}" +
$"{ColorTools.RenderSetConsoleColor(KernelColorTools.GetColor(KernelColorType.TuiPaneSeparator))}" +
$"{ColorTools.RenderSetConsoleColor(KernelColorTools.GetColor(KernelColorType.Background), true)}" +
$"{BorderColor.RenderBorderPlain(0, SeparatorMinimumHeight, SeparatorConsoleWidthInterior, SeparatorMaximumHeightInterior)}"
);
return builder.ToString();
Expand Down Expand Up @@ -311,8 +311,8 @@ private static void RenderCalendar((int Year, int Month, int Day, CalendarTypes
CurrentDayMark = $"{markStart}{CurrentDay}{markEnd}";
builder.Append(
CsiSequences.GenerateCsiCursorPosition(dayPosX + 1, dayPosY + 1) +
$"{foreground.VTSequenceForeground}" +
$"{background.VTSequenceBackground}" +
$"{ColorTools.RenderSetConsoleColor(foreground)}" +
$"{ColorTools.RenderSetConsoleColor(background, true)}" +
CurrentDayMark
);
}
Expand All @@ -326,8 +326,8 @@ private static void RenderCalendar((int Year, int Month, int Day, CalendarTypes
char dayChar = char.ToUpper(dayName[0]);
builder.Append(
CsiSequences.GenerateCsiCursorPosition(dayIndicatorPosX + (6 * i) + 2, dayIndicatorPosY + 1) +
$"{boxForeground.VTSequenceForeground}" +
$"{background.VTSequenceBackground}" +
$"{ColorTools.RenderSetConsoleColor(boxForeground)}" +
$"{ColorTools.RenderSetConsoleColor(background, true)}" +
dayChar
);
}
Expand Down Expand Up @@ -433,8 +433,8 @@ private static void RenderCalendar((int Year, int Month, int Day, CalendarTypes
// Finalize everything
builder.Append(
$"{KernelColorTools.GetColor(KernelColorType.TuiForeground).VTSequenceForeground}" +
$"{background.VTSequenceBackground}"
$"{ColorTools.RenderSetConsoleColor(KernelColorTools.GetColor(KernelColorType.TuiForeground))}" +
$"{ColorTools.RenderSetConsoleColor(background, true)}"
);
return builder.ToString();
});
Expand Down

0 comments on commit 1a3dc49

Please sign in to comment.