Archived
WIP: clean-up + icons
This commit is contained in:
1 parent
c770265283
commit
c00d42a7d8
20 files changed
+1223
-642
No files matched your search
@@ -0,0 +1,59 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
using RyzStudio.Drawing;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
public partial class TMemoBox : RyzStudio.Windows.ThemedForms.TUserControl
|
||||
{
|
||||
protected readonly Padding textboxPadding = new Padding(6, 6, 0, 6);
|
||||
|
||||
public TMemoBox() : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.Margin = new Padding(10, 6, 10, 6);
|
||||
}
|
||||
|
||||
//protected override void OnResize(EventArgs e)
|
||||
//{
|
||||
// base.OnResize(e);
|
||||
|
||||
// int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
|
||||
|
||||
// this.Height = textBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom);
|
||||
//}
|
||||
|
||||
protected override void OnGotFocus(EventArgs e)
|
||||
{
|
||||
base.OnGotFocus(e);
|
||||
|
||||
textBox1.Focus();
|
||||
}
|
||||
|
||||
[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
[Category("Appearance")]
|
||||
public System.Windows.Forms.TextBox InnerTextBox { get => textBox1; set => textBox1 = value; }
|
||||
|
||||
[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
[Category("Appearance")]
|
||||
public new string Text { get => textBox1.Text; set => textBox1.Text = value; }
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public new Padding Margin { get { return base.Margin; } set { base.Margin = value; } }
|
||||
|
||||
protected override void updateBackground(Graphics g, ThemeStyle style)
|
||||
{
|
||||
int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
|
||||
|
||||
this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom));
|
||||
|
||||
Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth);
|
||||
g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath());
|
||||
g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
partial class TMemoBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.AcceptsReturn = true;
|
||||
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.textBox1.HideSelection = false;
|
||||
this.textBox1.Location = new System.Drawing.Point(4, 4);
|
||||
this.textBox1.Multiline = true;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.textBox1.Size = new System.Drawing.Size(121, 25);
|
||||
this.textBox1.TabIndex = 0;
|
||||
//
|
||||
// MemoBox
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Name = "MemoBox";
|
||||
this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
|
||||
this.Size = new System.Drawing.Size(128, 32);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
}
|
||||
}
|
||||
@@ -112,6 +112,12 @@
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public new Padding Margin { get => base.Margin; set => base.Margin = value; }
|
||||
|
||||
|
||||
public void SetTooltipText(ToolTip toolTip, string text)
|
||||
{
|
||||
toolTip.SetToolTip(imageBox1, text);
|
||||
}
|
||||
|
||||
protected override void updateBackground(Graphics g, ThemeStyle style)
|
||||
{
|
||||
int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
|
||||
|
||||
Reference in new issue
Block a user