mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
added in gradient top bar to winclassic
This commit is contained in:
parent
3f03fdb36c
commit
6a100bc879
4 changed files with 20 additions and 1 deletions
1
Histacom2.Engine/Template/WinClassic.Designer.cs
generated
1
Histacom2.Engine/Template/WinClassic.Designer.cs
generated
|
@ -105,6 +105,7 @@ private void InitializeComponent()
|
||||||
this.programtopbar.Size = new System.Drawing.Size(292, 18);
|
this.programtopbar.Size = new System.Drawing.Size(292, 18);
|
||||||
this.programtopbar.TabIndex = 0;
|
this.programtopbar.TabIndex = 0;
|
||||||
this.programtopbar.Tag = "";
|
this.programtopbar.Tag = "";
|
||||||
|
this.programtopbar.Paint += new System.Windows.Forms.PaintEventHandler(this.programtopbar_Paint);
|
||||||
this.programtopbar.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Programtopbar_drag);
|
this.programtopbar.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Programtopbar_drag);
|
||||||
//
|
//
|
||||||
// programIcon
|
// programIcon
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
@ -335,6 +336,21 @@ private void minimizebutton_Click(object sender, EventArgs e)
|
||||||
Hide();
|
Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void programtopbar_Paint(object sender, PaintEventArgs e)
|
||||||
|
{
|
||||||
|
var gfx = e.Graphics;
|
||||||
|
if (isActive)
|
||||||
|
{
|
||||||
|
if (SaveSystem.currentTheme.activeTitleBarColor2 == null) return;
|
||||||
|
gfx.FillRectangle(new LinearGradientBrush(programtopbar.ClientRectangle, SaveSystem.currentTheme.activeTitleBarColor, SaveSystem.currentTheme.activeTitleBarColor2, 0.0), programtopbar.ClientRectangle);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (SaveSystem.currentTheme.inactiveTitleBarColor2 == null) return;
|
||||||
|
gfx.FillRectangle(new LinearGradientBrush(programtopbar.ClientRectangle, SaveSystem.currentTheme.inactiveTitleBarColor, SaveSystem.currentTheme.inactiveTitleBarColor2, 0.0), programtopbar.ClientRectangle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Size prevSize;
|
public Size prevSize;
|
||||||
public Point prevPoint;
|
public Point prevPoint;
|
||||||
private void maximizebutton_Click(object sender, EventArgs e)
|
private void maximizebutton_Click(object sender, EventArgs e)
|
||||||
|
|
|
@ -27,8 +27,10 @@ public class Theme
|
||||||
public Color windowColor { get; set; }
|
public Color windowColor { get; set; }
|
||||||
|
|
||||||
public Color activeTitleBarColor { get; set; }
|
public Color activeTitleBarColor { get; set; }
|
||||||
|
public Color activeTitleBarColor2 { get; set; }
|
||||||
public Color activeTitleTextColor { get; set; }
|
public Color activeTitleTextColor { get; set; }
|
||||||
public Color inactiveTitleBarColor { get; set; }
|
public Color inactiveTitleBarColor { get; set; }
|
||||||
|
public Color inactiveTitleBarColor2 { get; set; }
|
||||||
public Color inactiveTitleTextColor { get; set; }
|
public Color inactiveTitleTextColor { get; set; }
|
||||||
|
|
||||||
public Color selectedBackColor { get; set; }
|
public Color selectedBackColor { get; set; }
|
||||||
|
|
|
@ -38,7 +38,7 @@ private void aboutNotepadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
WindowManager wm = new WindowManager();
|
WindowManager wm = new WindowManager();
|
||||||
if (SaveSystem.CurrentSave.CurrentOS == "95") wm.StartAboutBox95("Notepad", "Microsoft Notepad", Properties.Resources.WinClassicNotepad);
|
if (SaveSystem.CurrentSave.CurrentOS == "95") wm.StartAboutBox95("Notepad", "Microsoft Notepad", Properties.Resources.WinClassicNotepad);
|
||||||
else wm.StartAboutBox98("Notepad", "Microsoft Notepad", Properties.Resources.WinClassicNotepad);
|
else wm.StartAboutBox98("Notepad", "Microsoft (R) Notepad", Properties.Resources.WinClassicNotepad);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void wordWrapToolStripMenuItem_Click(object sender, EventArgs e)
|
private void wordWrapToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
|
Loading…
Reference in a new issue