diff options
Diffstat (limited to 'ShiftOS.WinForms')
| -rw-r--r-- | ShiftOS.WinForms/ShiftOS.WinForms.csproj | 3 | ||||
| -rw-r--r-- | ShiftOS.WinForms/Tools/ShiftOSMenuRenderer.cs | 23 | ||||
| -rw-r--r-- | ShiftOS.WinForms/WinformsDesktop.Designer.cs | 32 | ||||
| -rw-r--r-- | ShiftOS.WinForms/WinformsDesktop.resx | 123 |
4 files changed, 161 insertions, 20 deletions
diff --git a/ShiftOS.WinForms/ShiftOS.WinForms.csproj b/ShiftOS.WinForms/ShiftOS.WinForms.csproj index 266728a..f566870 100644 --- a/ShiftOS.WinForms/ShiftOS.WinForms.csproj +++ b/ShiftOS.WinForms/ShiftOS.WinForms.csproj @@ -305,6 +305,9 @@ <EmbeddedResource Include="WindowBorder.resx"> <DependentUpon>WindowBorder.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="WinformsDesktop.resx"> + <DependentUpon>WinformsDesktop.cs</DependentUpon> + </EmbeddedResource> <None Include="packages.config" /> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> diff --git a/ShiftOS.WinForms/Tools/ShiftOSMenuRenderer.cs b/ShiftOS.WinForms/Tools/ShiftOSMenuRenderer.cs index 8a730ad..f4765e3 100644 --- a/ShiftOS.WinForms/Tools/ShiftOSMenuRenderer.cs +++ b/ShiftOS.WinForms/Tools/ShiftOSMenuRenderer.cs @@ -47,14 +47,29 @@ namespace ShiftOS.WinForms.Tools protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e) { - e.TextFont = LoadedSkin.MainFont; - if (e.Item.Selected == true) + if (e.Item.Tag?.ToString() == "applauncherbutton") { - e.TextColor = LoadedSkin.Menu_SelectedTextColor; + e.TextFont = LoadedSkin.AppLauncherFont; + if(e.Item.Selected == true) + { + e.TextColor = LoadedSkin.AppLauncherSelectedTextColor; + } + else + { + e.TextColor = LoadedSkin.AppLauncherTextColor; + } } else { - e.TextColor = LoadedSkin.Menu_TextColor; + e.TextFont = LoadedSkin.MainFont; + if (e.Item.Selected == true) + { + e.TextColor = LoadedSkin.Menu_SelectedTextColor; + } + else + { + e.TextColor = LoadedSkin.Menu_TextColor; + } } base.OnRenderItemText(e); } diff --git a/ShiftOS.WinForms/WinformsDesktop.Designer.cs b/ShiftOS.WinForms/WinformsDesktop.Designer.cs index 2d9d5d3..23f4665 100644 --- a/ShiftOS.WinForms/WinformsDesktop.Designer.cs +++ b/ShiftOS.WinForms/WinformsDesktop.Designer.cs @@ -52,13 +52,12 @@ namespace ShiftOS.WinForms /// </summary> private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WinformsDesktop)); this.desktoppanel = new System.Windows.Forms.Panel(); + this.lbtime = new System.Windows.Forms.Label(); this.panelbuttonholder = new System.Windows.Forms.FlowLayoutPanel(); this.sysmenuholder = new System.Windows.Forms.Panel(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.apps = new System.Windows.Forms.ToolStripMenuItem(); - this.lbtime = new System.Windows.Forms.Label(); this.desktoppanel.SuspendLayout(); this.sysmenuholder.SuspendLayout(); this.menuStrip1.SuspendLayout(); @@ -76,6 +75,18 @@ namespace ShiftOS.WinForms this.desktoppanel.Size = new System.Drawing.Size(1296, 24); this.desktoppanel.TabIndex = 0; // + // lbtime + // + this.lbtime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbtime.AutoSize = true; + this.lbtime.Location = new System.Drawing.Point(3, 0); + this.lbtime.Name = "lbtime"; + this.lbtime.Size = new System.Drawing.Size(49, 14); + this.lbtime.TabIndex = 0; + this.lbtime.Text = "label1"; + this.lbtime.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // // panelbuttonholder // this.panelbuttonholder.AutoSize = true; @@ -111,21 +122,10 @@ namespace ShiftOS.WinForms this.apps.Name = "apps"; this.apps.Padding = new System.Windows.Forms.Padding(0); this.apps.Size = new System.Drawing.Size(58, 20); + this.apps.Tag = "applauncherbutton"; this.apps.Text = "ShiftOS"; // - // lbtime - // - this.lbtime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbtime.AutoSize = true; - this.lbtime.Location = new System.Drawing.Point(3, 0); - this.lbtime.Name = "lbtime"; - this.lbtime.Size = new System.Drawing.Size(49, 14); - this.lbtime.TabIndex = 0; - this.lbtime.Text = "label1"; - this.lbtime.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // Desktop + // WinformsDesktop // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; @@ -135,7 +135,7 @@ namespace ShiftOS.WinForms this.Font = new System.Drawing.Font("Consolas", 9F); this.ForeColor = System.Drawing.Color.LightGreen; this.MainMenuStrip = this.menuStrip1; - this.Name = "Desktop"; + this.Name = "WinformsDesktop"; this.Text = "Desktop"; this.Load += new System.EventHandler(this.Desktop_Load); this.desktoppanel.ResumeLayout(false); diff --git a/ShiftOS.WinForms/WinformsDesktop.resx b/ShiftOS.WinForms/WinformsDesktop.resx new file mode 100644 index 0000000..d5494e3 --- /dev/null +++ b/ShiftOS.WinForms/WinformsDesktop.resx @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root>
\ No newline at end of file |
