mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
[ColorPicker]Custom color formats (#22141)
* [ColorPicker] Development: custom color formats, first steps * ColorPicker development of custom format handling. * Custom color format developmnet. Added common helper class for format string Fixed settings loading Added numbering if default name exists (My format (1)) * Custom color format implementation. Extended the colorPicker settings with the format string Updated the color to string conversion * Custom color format in color picker, development. Adding edit, delete buttons. Implement functionality Re-arranging settings panel (newly created formats at the top) Implementing details (valid parameters, more format elements, more types) * Minor commit * Development color picker custom formats. "Last" steps. Replacing hard coded english strings with resources, polishing. * Adding help to the format edit dialog. * Undoing changes unwillingly commited in Host module * Fixing bug unable to delete a custom format after renaming it - use the colorformat object as reference (and not the name) Modifying the default custom formula Removing unnecessary using directives * Udating the default user defined color format * Removing unnecessary using directive * ColorPicker Implementing custom color formats: adding custom formats to the default format selection (dropdown box). * Fix binding of name and example * Custom color formats, implemented steps: vorwarts compatibility loading settings. Fixed UI as requested (removed one settings panel, added button to the first panel) * Minor change in the UI: description modified * ColorPicker Custom Color Formats develepoment. Added conversion from old predefined formats to customizable formats. Extended default settings (in case settings file is deleted/corrupted). Minor fixes. * Fixing color format parameters. Implementing 3 different Saturation calculations, 2 Hue calculations and 2 Lightness calculations (depending color format) * Color Picker: New/Edit Color format. Fixing bug when cancelling addition/edit * ColorPicker. Updating help section, available parameters * Fix spellchecker * Remove the MinWidth so that scrollviewers can be drawn * ColorPicker bugfix: Not allowing to delete the last color format.
This commit is contained in:
288
src/common/ManagedCommon/CommonResources.resx
Normal file
288
src/common/ManagedCommon/CommonResources.resx
Normal file
@@ -0,0 +1,288 @@
|
||||
<?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>
|
||||
<data name="TEXT_COLOR_WHITE" xml:space="preserve">
|
||||
<value>White</value>
|
||||
<comment>White color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_BLACK" xml:space="preserve">
|
||||
<value>Black</value>
|
||||
<comment>Black color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_LIGHTGRAY" xml:space="preserve">
|
||||
<value>Light gray</value>
|
||||
<comment>Light gray color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_GRAY" xml:space="preserve">
|
||||
<value>Gray</value>
|
||||
<comment>Gray color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_DARKGRAY" xml:space="preserve">
|
||||
<value>Dark gray</value>
|
||||
<comment>Dark gray color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_CORAL" xml:space="preserve">
|
||||
<value>Coral</value>
|
||||
<comment>Coral color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_ROSE" xml:space="preserve">
|
||||
<value>Rose</value>
|
||||
<comment>Rose color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_LIGHTORANGE" xml:space="preserve">
|
||||
<value>Light orange</value>
|
||||
<comment>Light orange color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_TAN" xml:space="preserve">
|
||||
<value>Tan</value>
|
||||
<comment>Tan color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_LIGHTYELLOW" xml:space="preserve">
|
||||
<value>Light yellow</value>
|
||||
<comment>Light yellow color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_LIGHTGREEN" xml:space="preserve">
|
||||
<value>Light green</value>
|
||||
<comment>Light green color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_LIME" xml:space="preserve">
|
||||
<value>Lime</value>
|
||||
<comment>Lime color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_AQUA" xml:space="preserve">
|
||||
<value>Aqua</value>
|
||||
<comment>Aqua color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_SKYBLUE" xml:space="preserve">
|
||||
<value>Sky blue</value>
|
||||
<comment>Sky blue color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_LIGHTTURQUOISE" xml:space="preserve">
|
||||
<value>Light turquoise</value>
|
||||
<comment>Light turquoise color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_PALEBLUE" xml:space="preserve">
|
||||
<value>Pale blue</value>
|
||||
<comment>Pale blue color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_LIGHTBLUE" xml:space="preserve">
|
||||
<value>Light blue</value>
|
||||
<comment>Light blue color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_ICEBLUE" xml:space="preserve">
|
||||
<value>Ice blue</value>
|
||||
<comment>Ice blue color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_PERIWINKLE" xml:space="preserve">
|
||||
<value>Periwinkle</value>
|
||||
<comment>Periwinkle color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_LAVENDER" xml:space="preserve">
|
||||
<value>Lavender</value>
|
||||
<comment>Lavender color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_PINK" xml:space="preserve">
|
||||
<value>Pink</value>
|
||||
<comment>Pink color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_RED" xml:space="preserve">
|
||||
<value>Red</value>
|
||||
<comment>Red color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_ORANGE" xml:space="preserve">
|
||||
<value>Orange</value>
|
||||
<comment>Orange color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_BROWN" xml:space="preserve">
|
||||
<value>Brown</value>
|
||||
<comment>Brown color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_GOLD" xml:space="preserve">
|
||||
<value>Gold</value>
|
||||
<comment>Gold color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_YELLOW" xml:space="preserve">
|
||||
<value>Yellow</value>
|
||||
<comment>Yellow color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_OLIVEGREEN" xml:space="preserve">
|
||||
<value>Olive green</value>
|
||||
<comment>Olive green color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_GREEN" xml:space="preserve">
|
||||
<value>Green</value>
|
||||
<comment>Green color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_BRIGHTGREEN" xml:space="preserve">
|
||||
<value>Bright green</value>
|
||||
<comment>Rose color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_TEAL" xml:space="preserve">
|
||||
<value>Teal</value>
|
||||
<comment>Teal color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_TURQUOISE" xml:space="preserve">
|
||||
<value>Turquoise</value>
|
||||
<comment>Turquoise color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_BLUE" xml:space="preserve">
|
||||
<value>Blue</value>
|
||||
<comment>Blue color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_BLUEGRAY" xml:space="preserve">
|
||||
<value>Blue gray</value>
|
||||
<comment>Blue gray color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_INDIGO" xml:space="preserve">
|
||||
<value>Indigo</value>
|
||||
<comment>Indigo color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_PURPLE" xml:space="preserve">
|
||||
<value>Purple</value>
|
||||
<comment>Purple color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_DARKRED" xml:space="preserve">
|
||||
<value>Dark red</value>
|
||||
<comment>Dark red color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_DARKYELLOW" xml:space="preserve">
|
||||
<value>Dark yellow</value>
|
||||
<comment>Dark yellow color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_DARKGREEN" xml:space="preserve">
|
||||
<value>Dark green</value>
|
||||
<comment>Dark green color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_DARKTEAL" xml:space="preserve">
|
||||
<value>Dark teal</value>
|
||||
<comment>Dark teal color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_DARKBLUE" xml:space="preserve">
|
||||
<value>Dark blue</value>
|
||||
<comment>Dark blue color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_DARKPURPLE" xml:space="preserve">
|
||||
<value>Dark purple</value>
|
||||
<comment>Dark purple color</comment>
|
||||
</data>
|
||||
<data name="TEXT_COLOR_PLUM" xml:space="preserve">
|
||||
<value>Plum</value>
|
||||
<comment>Plum color</comment>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user