-
Notifications
You must be signed in to change notification settings - Fork 1
Collapsible text at third markdown list indent
This page gives an example on how to put a collapsible text thing into a list at the third indent and still have it work without breaking the rest of the page. If you wish to view it as raw text, append .md
to the page's address.
There are many changes to the theme engine in this pr, and I'm really glad this is finally ready to be merged.
Added:
- Apps using PortableThemeEngine can specify multiple things before having it apply a theme as detailed below:
-
Property
ThemeEngine.UseSafeColorValidation()
: Boolean; defaults toTrue
. Determines whether fast or safe color validation is performed when assigning theme colors.- Fast color validation:
UseSafeColorValidation() = False
. Works like TE1.x where invalid colors rely on a Try...Catch block to be set to the default in case they're invalid. This tends to be really fast (often around 10 ms [depending on the amount of forms to theme] or less to re-apply) if the colors are valid, but it can be a lot slower than safe color validation if a color or multiple colors are invalid (up to 100 ms or more). - Safe color validation:
UseSafeColorValidation() = True
. Default in TE2.x/PortableThemeEngine. Checks whether the color is a valid HTML color, and if it's not a valid HTML color, then it checks if it's in the systems colors list, before assigning the theme colors. If it's neither a valid HTML color nor a valid system color, the default color will be used instead. Tends to be about the same speed whether a color is valid or not (often around 40 ms depending on the number of forms to apply it to). - Description from source:
Click to show
' ' libportablethemeengine.vb: ' ' Safe color validation uses regex to make sure the color ' that's being applied to a given control is a valid HTML color. ' If it's not a valid HTML color, it's looked up in the system colors ' list. Disabling safe color validation enables fast color validation, ' which relies on an exception handler to make sure colors are valid like TE1.x. ' See more details in TE2DotXLoader.GetThemeColor. ' ' ' TE2DotXLoader.vb: ' ' GetThemeColor() function ' ' When safe color validation is enabled: ' ' If the calling application wants to use safe color ' validation, then we'll use it. ' During testing, it seemed to generally be around ' 20-40 ms to re-apply a theme, and somewhere between ' 60-90 ms (rarely as high as 140 ms or more) to apply ' a theme on startup. These numbers are based on ' UXL Launcher version 3.3, and it was temporarily ' redirected to use PortableThemeEngine instead ' of the built-in one. These numbers can vary ' depending on the theme. For example, the Default ' theme generally seemed to be around 20-30 ms to re-apply. ' ' ' If the color in the theme isn't "LiteralNothing" and the ' ' color is valid whether as an HTML color or as a system color: ' ' If the color is a valid HTML or system color ' and it's not LiteralNothing, return the color. ' One situation where this could be confusing is ' if the theme has something like #3 instead of ' #363636. In this case, a color with alpha ' transparency will be returned, and it might be ' confusing. May be a good idea to make sure it has ' a length of 3 numbers or 6 numbers. ' ' ' When it's disabled: ' ' If the calling application wants to use fast ' color validation, rely on a try...catch block. ' Generally fast color validation is around 10 ms to ' re-apply a theme, and about 40 ms to apply a theme ' for the first time. These numbers are from testing ' PortableThemeEngine with UXL Launcher version 3.3. ' Themes with colors that are invalid (such as ones ' using "LiteralNothing" like the Default theme) ' will take a lot longer to re-apply, sometimes upwards ' of 60 ms or more. This is due to running into the ' exception handler. ' Themes that run into the exception handler can take ' over 100 ms to apply on startup, sometimes taking more ' than 140 ms.
- test
- Fast color validation:
-
Property
ThemeEngine.UseFullTE1DotXCompatibilityMode()
: Boolean; defaults toFalse
. Determines whether theme files that say they support TE1.x/UXL Launcher Theme Engine (or don't say what they support, if theUseThemeEngineVersion
node is missing) will be applied in a way that UXL Launcher Theme Engine would expect. For example, if the theme file doesn't support TE1.03 or greater, theme files won't be applied to forms other than ones namedaaformMainWindow
. Please don't set this toTrue
or unexpected problems may occur if your application isn't UXL Launcher.- Description from source:
' Enabling TE1.x full compatibility mode causes forms not named "aaformMainWindow" ' to not be themed if the theme file doesn't support TE1.03 or greater. ' Default colors will be applied to forms of other names. ' Other TE1.x-related features that UXL Launcher relied on will also be enabled, ' but as of April 14, 2020, this is the only one. ' This is to allow TE2.x to eventually replace TE1.x in UXL Launcher. ' Please don't enable this unless you absolutely have to. ' The default is loose compatibility mode. ' Loose compatibility mode will have theme colors ' applied to any forms passed into the TE1.x shim and is what's ' recommended for most applications.
-