Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c09e56982 |
+32
-3
@@ -21,7 +21,7 @@ namespace QuickClaude
|
|||||||
readonly TextBlock status = new TextBlock();
|
readonly TextBlock status = new TextBlock();
|
||||||
readonly TextBlock grip = new TextBlock();
|
readonly TextBlock grip = new TextBlock();
|
||||||
WF.NotifyIcon tray;
|
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 lastWasTool;
|
||||||
bool quitting;
|
bool quitting;
|
||||||
|
|
||||||
@@ -30,14 +30,17 @@ namespace QuickClaude
|
|||||||
// The current font (picked from the tray's Font menu). Still called Mono since
|
// The current font (picked from the tray's Font menu). Still called Mono since
|
||||||
// ConfirmWindow and DarkMenu read it when they open.
|
// ConfirmWindow and DarkMenu read it when they open.
|
||||||
internal static FontFamily Mono = new FontFamily("Consolas, Courier New");
|
internal static FontFamily Mono = new FontFamily("Consolas, Courier New");
|
||||||
// Matches wIRC at its smallest font slider setting (10sp = 10 WPF units)
|
// Picked from the tray's Font size menu, 10 to 18 (same units as wIRC's font size
|
||||||
internal const double TextSize = 10;
|
// 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;
|
const double ResizeEdge = 6;
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
settings = Settings.Load();
|
settings = Settings.Load();
|
||||||
Mono = Fonts.Find(settings.Font).Family;
|
Mono = Fonts.Find(settings.Font).Family;
|
||||||
|
TextSize = Math.Clamp(Math.Round(settings.FontSize), MinTextSize, MaxTextSize);
|
||||||
|
|
||||||
Title = "QuickClaude";
|
Title = "QuickClaude";
|
||||||
WindowStyle = WindowStyle.None;
|
WindowStyle = WindowStyle.None;
|
||||||
@@ -147,6 +150,24 @@ namespace QuickClaude
|
|||||||
((Grid)Content).ContextMenu = DarkMenu.Make(null, NewConversation);
|
((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)
|
void SetFont(string name)
|
||||||
{
|
{
|
||||||
var choice = Fonts.Find(name);
|
var choice = Fonts.Find(name);
|
||||||
@@ -388,6 +409,14 @@ namespace QuickClaude
|
|||||||
}
|
}
|
||||||
menu.Items.Add(fontMenu);
|
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) =>
|
topItem = new WF.ToolStripMenuItem("Always on top", null, (s, e) =>
|
||||||
{
|
{
|
||||||
settings.Topmost = !settings.Topmost; Topmost = settings.Topmost; topItem.Checked = settings.Topmost; settings.Save();
|
settings.Topmost = !settings.Topmost; Topmost = settings.Topmost; topItem.Checked = settings.Topmost; settings.Save();
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
<Nullable>disable</Nullable>
|
<Nullable>disable</Nullable>
|
||||||
<AssemblyName>QuickClaude</AssemblyName>
|
<AssemblyName>QuickClaude</AssemblyName>
|
||||||
<RootNamespace>QuickClaude</RootNamespace>
|
<RootNamespace>QuickClaude</RootNamespace>
|
||||||
<Version>1.1.0</Version>
|
<Version>1.2.0</Version>
|
||||||
<Product>QuickClaude</Product>
|
<Product>QuickClaude</Product>
|
||||||
<ApplicationIcon>app.ico</ApplicationIcon>
|
<ApplicationIcon>app.ico</ApplicationIcon>
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ namespace QuickClaude
|
|||||||
public double Height { get; set; } = 380;
|
public double Height { get; set; } = 380;
|
||||||
public string TextColor { get; set; } = "Black";
|
public string TextColor { get; set; } = "Black";
|
||||||
public string Font { get; set; } = "Consolas";
|
public string Font { get; set; } = "Consolas";
|
||||||
|
public double FontSize { get; set; } = 10;
|
||||||
public bool Topmost { get; set; } = false;
|
public bool Topmost { get; set; } = false;
|
||||||
public string WorkDir { get; set; } = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
public string WorkDir { get; set; } = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||||
public string Mode { get; set; } = "default";
|
public string Mode { get; set; } = "default";
|
||||||
|
|||||||
Reference in New Issue
Block a user