UI Slice 2: Settings-Fenster Scaling-Fix + OpenRouter-Key konfigurierbar
Scaling-Bug behoben (war 'teilweise unbenutzbar'): - General Settings: toolStrip2 war NICHT gedockt (floatete), propertyGrid war Dock=Bottom mit fixer Hoehe -> jetzt toolStrip2 Dock=Top, propertyGrid Dock=Fill (Controls-Reihenfolge korrigiert). - Accounts: toolStripAccounts Dock=Top (war floatend); Grid Left + PropertyGrid Fill bleiben. - Form: tabControl1 Dock=Fill statt Anchor mit falscher Groesse; leere toolStrip1 entfernt; ueberhohe ClientSize (1523) korrigiert. Skaliert jetzt sauber mit der Fenstergroesse. Fehlende Einstellung ergaenzt: - Button 'OpenRouter-Key setzen …' (General Settings, via Designer): maskierte Eingabe, schreibt in die gitignorierte openrouter.key (genau das liest der OpenRouterClient) - KEIN Secret im Klartext in server_settings.xml. Leer = entfernen. Hinweis auf Spend-Limit. Build 0 Fehler, --smoke-ui gruen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
0725a81dbd
commit
936144c318
Generated
+23
-26
@@ -18,13 +18,13 @@ namespace PolyTraderSharp.Ui.Views
|
||||
private void InitializeComponent()
|
||||
{
|
||||
propertyGrid = new PropertyGrid();
|
||||
toolStrip1 = new ToolStrip();
|
||||
tabControl1 = new TabControl();
|
||||
tabPage1 = new TabPage();
|
||||
toolStrip2 = new ToolStrip();
|
||||
btn_save = new ToolStripButton();
|
||||
btn_loadsettings = new ToolStripButton();
|
||||
btnGenMasterKey = new ToolStripButton();
|
||||
btnSetOpenRouterKey = new ToolStripButton();
|
||||
tabPage2 = new TabPage();
|
||||
pgAccount = new PropertyGrid();
|
||||
dgvAccounts = new DataGridView();
|
||||
@@ -41,37 +41,25 @@ namespace PolyTraderSharp.Ui.Views
|
||||
//
|
||||
// propertyGrid
|
||||
//
|
||||
propertyGrid.Dock = DockStyle.Bottom;
|
||||
propertyGrid.Location = new Point(3, 610);
|
||||
propertyGrid.Margin = new Padding(4, 25, 4, 5);
|
||||
propertyGrid.Dock = DockStyle.Fill;
|
||||
propertyGrid.Name = "propertyGrid";
|
||||
propertyGrid.Size = new Size(1171, 274);
|
||||
propertyGrid.TabIndex = 1;
|
||||
//
|
||||
// toolStrip1
|
||||
//
|
||||
toolStrip1.ImageScalingSize = new Size(24, 24);
|
||||
toolStrip1.Location = new Point(0, 0);
|
||||
toolStrip1.Name = "toolStrip1";
|
||||
toolStrip1.Size = new Size(1185, 25);
|
||||
toolStrip1.TabIndex = 2;
|
||||
toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
tabControl1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
//
|
||||
tabControl1.Controls.Add(tabPage1);
|
||||
tabControl1.Controls.Add(tabPage2);
|
||||
tabControl1.Location = new Point(0, 24);
|
||||
tabControl1.Dock = DockStyle.Fill;
|
||||
tabControl1.Location = new Point(0, 0);
|
||||
tabControl1.Name = "tabControl1";
|
||||
tabControl1.SelectedIndex = 0;
|
||||
tabControl1.Size = new Size(1185, 925);
|
||||
tabControl1.Size = new Size(1185, 800);
|
||||
tabControl1.TabIndex = 3;
|
||||
//
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
tabPage1.Controls.Add(toolStrip2);
|
||||
//
|
||||
tabPage1.Controls.Add(propertyGrid);
|
||||
tabPage1.Controls.Add(toolStrip2);
|
||||
tabPage1.Location = new Point(4, 34);
|
||||
tabPage1.Name = "tabPage1";
|
||||
tabPage1.Padding = new Padding(3);
|
||||
@@ -82,8 +70,9 @@ namespace PolyTraderSharp.Ui.Views
|
||||
//
|
||||
// toolStrip2
|
||||
//
|
||||
toolStrip2.Dock = DockStyle.Top;
|
||||
toolStrip2.ImageScalingSize = new Size(24, 24);
|
||||
toolStrip2.Items.AddRange(new ToolStripItem[] { btn_save, btn_loadsettings, btnGenMasterKey });
|
||||
toolStrip2.Items.AddRange(new ToolStripItem[] { btn_save, btn_loadsettings, btnGenMasterKey, btnSetOpenRouterKey });
|
||||
toolStrip2.Location = new Point(3, 3);
|
||||
toolStrip2.Name = "toolStrip2";
|
||||
toolStrip2.Size = new Size(1171, 34);
|
||||
@@ -114,6 +103,14 @@ namespace PolyTraderSharp.Ui.Views
|
||||
btnGenMasterKey.Text = "Master-Key erzeugen";
|
||||
btnGenMasterKey.ToolTipText = "Erzeugt einen zufälligen AES-Master-Key (nur wenn noch keiner existiert).";
|
||||
//
|
||||
// btnSetOpenRouterKey
|
||||
//
|
||||
btnSetOpenRouterKey.DisplayStyle = ToolStripItemDisplayStyle.Text;
|
||||
btnSetOpenRouterKey.Name = "btnSetOpenRouterKey";
|
||||
btnSetOpenRouterKey.Size = new Size(200, 29);
|
||||
btnSetOpenRouterKey.Text = "OpenRouter-Key setzen …";
|
||||
btnSetOpenRouterKey.ToolTipText = "Speichert den OpenRouter-API-Key für den Supervisor (gitignorierte Datei openrouter.key).";
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
tabPage2.Controls.Add(pgAccount);
|
||||
@@ -153,6 +150,7 @@ namespace PolyTraderSharp.Ui.Views
|
||||
//
|
||||
// toolStripAccounts
|
||||
//
|
||||
toolStripAccounts.Dock = DockStyle.Top;
|
||||
toolStripAccounts.ImageScalingSize = new Size(24, 24);
|
||||
toolStripAccounts.Items.AddRange(new ToolStripItem[] { btnAccNew, btnAccDelete });
|
||||
toolStripAccounts.Location = new Point(3, 3);
|
||||
@@ -178,9 +176,8 @@ namespace PolyTraderSharp.Ui.Views
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(10F, 25F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1185, 1523);
|
||||
ClientSize = new Size(1185, 820);
|
||||
Controls.Add(tabControl1);
|
||||
Controls.Add(toolStrip1);
|
||||
Margin = new Padding(4, 5, 4, 5);
|
||||
Name = "SettingsView";
|
||||
Text = "Server Settings";
|
||||
@@ -201,7 +198,6 @@ namespace PolyTraderSharp.Ui.Views
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PropertyGrid propertyGrid;
|
||||
private ToolStrip toolStrip1;
|
||||
private TabControl tabControl1;
|
||||
private TabPage tabPage1;
|
||||
private ToolStrip toolStrip2;
|
||||
@@ -209,6 +205,7 @@ namespace PolyTraderSharp.Ui.Views
|
||||
private ToolStripButton btn_save;
|
||||
private ToolStripButton btn_loadsettings;
|
||||
private ToolStripButton btnGenMasterKey;
|
||||
private ToolStripButton btnSetOpenRouterKey;
|
||||
private ToolStrip toolStripAccounts;
|
||||
private ToolStripButton btnAccNew;
|
||||
private ToolStripButton btnAccDelete;
|
||||
|
||||
Reference in New Issue
Block a user