Changing CSS + adding themes

This commit is contained in:
Swee 2024-09-02 21:13:27 -07:00
parent 69855b14fd
commit 4a3eedd8c6
2 changed files with 45 additions and 8 deletions

42
Form1.Designer.cs generated
View file

@ -50,6 +50,10 @@
groupBox3 = new GroupBox(); groupBox3 = new GroupBox();
button2 = new Button(); button2 = new Button();
textBox2 = new TextBox(); textBox2 = new TextBox();
colorThemeToolStripMenuItem = new ToolStripMenuItem();
systemToolStripMenuItem = new ToolStripMenuItem();
lightToolStripMenuItem = new ToolStripMenuItem();
darkToolStripMenuItem = new ToolStripMenuItem();
menuStrip1.SuspendLayout(); menuStrip1.SuspendLayout();
groupBox4.SuspendLayout(); groupBox4.SuspendLayout();
groupBox3.SuspendLayout(); groupBox3.SuspendLayout();
@ -104,7 +108,7 @@
// //
// renderToolStripMenuItem // renderToolStripMenuItem
// //
renderToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { fontFamilyToolStripMenuItem }); renderToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { fontFamilyToolStripMenuItem, colorThemeToolStripMenuItem });
renderToolStripMenuItem.Name = "renderToolStripMenuItem"; renderToolStripMenuItem.Name = "renderToolStripMenuItem";
renderToolStripMenuItem.Size = new Size(56, 20); renderToolStripMenuItem.Size = new Size(56, 20);
renderToolStripMenuItem.Text = "Render"; renderToolStripMenuItem.Text = "Render";
@ -113,7 +117,7 @@
// //
fontFamilyToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { serifToolStripMenuItem, sansSerifToolStripMenuItem, forceMonospaceToolStripMenuItem }); fontFamilyToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { serifToolStripMenuItem, sansSerifToolStripMenuItem, forceMonospaceToolStripMenuItem });
fontFamilyToolStripMenuItem.Name = "fontFamilyToolStripMenuItem"; fontFamilyToolStripMenuItem.Name = "fontFamilyToolStripMenuItem";
fontFamilyToolStripMenuItem.Size = new Size(136, 22); fontFamilyToolStripMenuItem.Size = new Size(180, 22);
fontFamilyToolStripMenuItem.Text = "Font Family"; fontFamilyToolStripMenuItem.Text = "Font Family";
// //
// serifToolStripMenuItem // serifToolStripMenuItem
@ -249,6 +253,36 @@
textBox2.TabIndex = 2; textBox2.TabIndex = 2;
textBox2.TextChanged += textBox2_TextChanged; textBox2.TextChanged += textBox2_TextChanged;
// //
// colorThemeToolStripMenuItem
//
colorThemeToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { systemToolStripMenuItem, lightToolStripMenuItem, darkToolStripMenuItem });
colorThemeToolStripMenuItem.Name = "colorThemeToolStripMenuItem";
colorThemeToolStripMenuItem.Size = new Size(180, 22);
colorThemeToolStripMenuItem.Text = "Color theme";
//
// systemToolStripMenuItem
//
systemToolStripMenuItem.BackColor = SystemColors.Control;
systemToolStripMenuItem.Checked = true;
systemToolStripMenuItem.CheckState = CheckState.Checked;
systemToolStripMenuItem.ForeColor = SystemColors.ControlText;
systemToolStripMenuItem.Name = "systemToolStripMenuItem";
systemToolStripMenuItem.Size = new Size(161, 22);
systemToolStripMenuItem.Text = "System (Default)";
systemToolStripMenuItem.Click += systemToolStripMenuItem_Click;
//
// lightToolStripMenuItem
//
lightToolStripMenuItem.Name = "lightToolStripMenuItem";
lightToolStripMenuItem.Size = new Size(161, 22);
lightToolStripMenuItem.Text = "Light";
//
// darkToolStripMenuItem
//
darkToolStripMenuItem.Name = "darkToolStripMenuItem";
darkToolStripMenuItem.Size = new Size(161, 22);
darkToolStripMenuItem.Text = "Dark";
//
// Form1 // Form1
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(7F, 15F);
@ -296,5 +330,9 @@
private Button button2; private Button button2;
private TextBox textBox2; private TextBox textBox2;
private CefSharp.WinForms.ChromiumWebBrowser chromiumWebBrowser1; private CefSharp.WinForms.ChromiumWebBrowser chromiumWebBrowser1;
private ToolStripMenuItem colorThemeToolStripMenuItem;
private ToolStripMenuItem systemToolStripMenuItem;
private ToolStripMenuItem lightToolStripMenuItem;
private ToolStripMenuItem darkToolStripMenuItem;
} }
} }

View file

@ -11,12 +11,6 @@ namespace MintHTML
string markfile; string markfile;
string htmlfile = "<h1>Welcome to MintHTML</h1><p>Open a markdown file and press \"Render preview\" to see the output here.</p>"; string htmlfile = "<h1>Welcome to MintHTML</h1><p>Open a markdown file and press \"Render preview\" to see the output here.</p>";
string csssuffix = @" string csssuffix = @"
div{
font-family: monospace;
background-color: #F3F3F3;
border: solid;
border-width: 1px
}
</style> </style>
<ul style=""list-style-type:circle;"">"; <ul style=""list-style-type:circle;"">";
string logo = @"<svg string logo = @"<svg
@ -333,5 +327,10 @@ font-family: monospace
{ {
Application.Exit(); Application.Exit();
} }
private void systemToolStripMenuItem_Click(object sender, EventArgs e)
{
}
} }
} }