diff --git a/MainWindow.cs b/MainWindow.cs
index c6274ff..2f541a6 100644
--- a/MainWindow.cs
+++ b/MainWindow.cs
@@ -21,7 +21,7 @@ namespace QuickClaude
readonly TextBlock status = new TextBlock();
readonly TextBlock grip = new TextBlock();
WF.NotifyIcon tray;
- WF.ToolStripMenuItem fontMenu, topItem, blackItem, whiteItem, lookItem, editItem, autoItem, folderItem;
+ WF.ToolStripMenuItem fontMenu, sizeMenu, topItem, blackItem, whiteItem, lookItem, editItem, autoItem, folderItem;
bool lastWasTool;
bool quitting;
@@ -30,14 +30,17 @@ namespace QuickClaude
// The current font (picked from the tray's Font menu). Still called Mono since
// ConfirmWindow and DarkMenu read it when they open.
internal static FontFamily Mono = new FontFamily("Consolas, Courier New");
- // Matches wIRC at its smallest font slider setting (10sp = 10 WPF units)
- internal const double TextSize = 10;
+ // Picked from the tray's Font size menu, 10 to 18 (same units as wIRC's font size
+ // slider: 10sp = 10 WPF units). ConfirmWindow and DarkMenu read it when they open.
+ internal const double MinTextSize = 10, MaxTextSize = 18;
+ internal static double TextSize = 10;
const double ResizeEdge = 6;
public MainWindow()
{
settings = Settings.Load();
Mono = Fonts.Find(settings.Font).Family;
+ TextSize = Math.Clamp(Math.Round(settings.FontSize), MinTextSize, MaxTextSize);
Title = "QuickClaude";
WindowStyle = WindowStyle.None;
@@ -147,6 +150,24 @@ namespace QuickClaude
((Grid)Content).ContextMenu = DarkMenu.Make(null, NewConversation);
}
+ void SetFontSize(double size)
+ {
+ size = Math.Clamp(size, MinTextSize, MaxTextSize);
+ settings.FontSize = size;
+ settings.Save();
+ TextSize = size;
+ FontSize = size;
+ transcript.FontSize = size;
+ input.FontSize = size;
+ status.FontSize = size;
+ grip.FontSize = size;
+ BuildContextMenus();
+ transcript.ScrollToEnd();
+ if (sizeMenu != null)
+ foreach (WF.ToolStripMenuItem item in sizeMenu.DropDownItems)
+ item.Checked = item.Text == size.ToString();
+ }
+
void SetFont(string name)
{
var choice = Fonts.Find(name);
@@ -388,6 +409,14 @@ namespace QuickClaude
}
menu.Items.Add(fontMenu);
+ sizeMenu = new WF.ToolStripMenuItem("Font size");
+ for (int px = (int)MinTextSize; px <= (int)MaxTextSize; px++)
+ {
+ double sz = px;
+ sizeMenu.DropDownItems.Add(new WF.ToolStripMenuItem(px.ToString(), null, (s, e) => SetFontSize(sz)) { Checked = sz == TextSize });
+ }
+ menu.Items.Add(sizeMenu);
+
topItem = new WF.ToolStripMenuItem("Always on top", null, (s, e) =>
{
settings.Topmost = !settings.Topmost; Topmost = settings.Topmost; topItem.Checked = settings.Topmost; settings.Save();
diff --git a/QuickClaude.csproj b/QuickClaude.csproj
index e2e70f1..c41564c 100644
--- a/QuickClaude.csproj
+++ b/QuickClaude.csproj
@@ -10,7 +10,7 @@
disable
QuickClaude
QuickClaude
- 1.1.0
+ 1.2.0
QuickClaude
app.ico
win-x64
diff --git a/Settings.cs b/Settings.cs
index 658dfb0..a1893a0 100644
--- a/Settings.cs
+++ b/Settings.cs
@@ -12,6 +12,7 @@ namespace QuickClaude
public double Height { get; set; } = 380;
public string TextColor { get; set; } = "Black";
public string Font { get; set; } = "Consolas";
+ public double FontSize { get; set; } = 10;
public bool Topmost { get; set; } = false;
public string WorkDir { get; set; } = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
public string Mode { get; set; } = "default";