feat(window): restore the title-bar, hide-button, and 24-hour-clock toggles

Re-wires four 1.5.6 settings that survived the v1.6.0 rewrite as dormant config
fields but lost their UI + consumers:
- ShowTitleBar / ShowPopOutTitleBar: gate ImGuiWindowFlags.NoTitleBar on the main
  window (ResolveFlags) and pop-out windows (new PreDraw). Inverted logic matches
  1.5.6 (flag set only when the toggle is off).
- ShowHideButton: gate the input-bar hide button on the toggle.
- Use24HourClock: add the toggle (MessageList already consumes the field).
New 'Window style' section in WindowTab; Use24HourClock in ChatTab display modes.
MainWindowFlagsStep extended with the NoTitleBar fresh-base contract.
This commit is contained in:
2026-06-15 20:19:59 +02:00
parent 6813b80d58
commit b397591ba4
6 changed files with 90 additions and 21 deletions
+14 -8
View File
@@ -77,19 +77,21 @@ internal sealed class MainWindow : Window
internal float ResolveBgAlpha(bool isFocused) =>
isFocused ? Plugin.Config.WindowOpacity : Plugin.Config.WindowOpacityInactive;
// B1-2: rebuild flags from a fresh base every frame so toggling CanMove/
// CanResize back on actually CLEARS NoMove/NoResize (not accumulating).
// Move/resize toggle logic as 1.5.6 (ChatLogWindow.PreOpenCheck
// 1d3b429:703-707); base flags = today's MainWindow set (NoScrollbar|
// NoScrollWithMouse — the message list owns its own scroll; 1.5.6's
// NoFocusOnAppearing/NoTitleBar are deliberately not restored).
internal static ImGuiWindowFlags ResolveFlags(bool canMove, bool canResize)
// B1-2 / P7: rebuild flags from a fresh base every frame so toggling
// CanMove/CanResize/ShowTitleBar back on actually CLEARS NoMove/NoResize/
// NoTitleBar (not accumulating). Move/resize/title-bar logic as 1.5.6
// (ChatLogWindow.PreOpenCheck 1d3b429:703-710); base flags = today's
// MainWindow set (NoScrollbar|NoScrollWithMouse — the message list owns its
// own scroll; 1.5.6's NoFocusOnAppearing is deliberately not restored).
internal static ImGuiWindowFlags ResolveFlags(bool canMove, bool canResize, bool showTitleBar)
{
var flags = ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse;
if (!canMove)
flags |= ImGuiWindowFlags.NoMove;
if (!canResize)
flags |= ImGuiWindowFlags.NoResize;
if (!showTitleBar)
flags |= ImGuiWindowFlags.NoTitleBar;
return flags;
}
@@ -114,7 +116,11 @@ internal sealed class MainWindow : Window
BgAlpha = null;
}
Flags = ResolveFlags(Plugin.Config.CanMove, Plugin.Config.CanResize);
Flags = ResolveFlags(
Plugin.Config.CanMove,
Plugin.Config.CanResize,
Plugin.Config.ShowTitleBar
);
}
public Tab? ActiveTab => _activeTab;