2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-01 16:33:43 -04:00

[Core] Settings improvements: Grouping w/labels, support for doubles (#137)

* [Core] Settings improvements: Grouping w/labels, support for doubles

Layout improvements:
* Plugins can set `[SettingSuggestedColumnWidth(123)]` on a settings class to adjust the settings view column width to make it wider or narrower to fit things nicely.
* Plugins can set `[SettingNewGroup("label")]` on any setting property to force a "new paragraph", or group, of settings. If "label" is also provided, a grouping header with that text will also be created.
* A double precision up/down numeric control has been added. In support of this, there is now a precision value on the existing `[SettingNumericBounds]` attribute to specify the number of digits of precision the control displays/allows.

Plugins:
* The above have been applied/demonstrated on the Botanist and Explorer plugin settings.
This commit is contained in:
F K
2024-01-29 15:37:00 -05:00
committed by GitHub
parent a555c86083
commit 351dcdb732
5 changed files with 227 additions and 28 deletions

View File

@ -7,11 +7,12 @@ using System.Threading.Tasks;
namespace Observatory.Botanist
{
[SettingSuggestedColumnWidth(450)]
class BotanistSettings
{
[SettingDisplayName("Enable Sampler Status Overlay")]
public bool OverlayEnabled { get; set; }
[SettingDisplayName("Sampler Status Overlay is sticky until sampling complete (if enabled)")]
[SettingDisplayName("Status Overlay is sticky until sampling is complete")]
public bool OverlayIsSticky { get; set; }
}
}