MinorGridColor

MinorGridColor

#Overview

name: MinorGridColor

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 13 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of MinorGridColor is to define the color of minor grid lines in various visual elements within Unreal Engine 5, particularly in curve editors and waveform editors.

This setting variable is primarily used in the following Unreal Engine subsystems and plugins:

  1. WaveformEditor plugin
  2. WaveTable plugin
  3. CurveEditor module

The value of this variable is typically set in the following ways:

  1. As a default value in the UWaveformEditorWidgetsSettings class constructor
  2. Through config files, as indicated by the UPROPERTY(config) attribute
  3. Dynamically in code, often derived from a major grid color with reduced opacity

MinorGridColor often interacts with other variables such as:

  1. MajorGridColor
  2. GridLineTint
  3. Other visual style-related variables in the respective editor settings

Developers should be aware of the following when using this variable:

  1. It’s often used in conjunction with MajorGridColor to create visual hierarchy in grid displays
  2. The color is typically set with reduced opacity compared to the major grid lines
  3. Changes to this variable may affect the readability and visual appeal of editor interfaces

Best practices when using this variable include:

  1. Ensuring sufficient contrast between minor grid lines and the background
  2. Maintaining a clear visual distinction between major and minor grid lines
  3. Considering accessibility and readability when choosing colors
  4. Using the config attribute to allow users to customize the color if needed
  5. Updating related visual elements when changing this color to maintain consistency in the UI

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Config/BaseWaveformEditor.ini:6, section: [/Script/WaveformEditorWidgets.WaveformEditorWidgetsSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorStyle.cpp:99

Scope (from outer to inner):

file
function     void FWaveformEditorStyle::OnWidgetSettingsUpdated

Source code excerpt:

		CreateWaveformViewerStyleFromSettings(*Settings);
	}
	else if (PropertyName == GET_MEMBER_NAME_CHECKED(UWaveformEditorWidgetsSettings, MinorGridColor))
	{
		CreateWaveformViewerStyleFromSettings(*Settings);
	}
	else if (PropertyName == GET_MEMBER_NAME_CHECKED(UWaveformEditorWidgetsSettings, ZeroCrossingLineThickness))
	{
		CreateWaveformViewerStyleFromSettings(*Settings);

#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorStyle.cpp:156

Scope (from outer to inner):

file
function     FSampledSequenceViewerStyle FWaveformEditorStyle::CreateWaveformViewerStyleFromSettings

Source code excerpt:

		.SetSampleMarkersSize(InSettings.SampleMarkersSize)
		.SetMajorGridLineColor(InSettings.MajorGridColor)
		.SetMinorGridLineColor(InSettings.MinorGridColor)
		.SetZeroCrossingLineColor(InSettings.LoudnessGridColor)
		.SetZeroCrossingLineThickness(InSettings.ZeroCrossingLineThickness);

	OnNewWaveformViewerStyle.Broadcast(WaveViewerStyle);

	return WaveViewerStyle;

#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorWidgetsSettings.cpp:11

Scope (from outer to inner):

file
function     UWaveformEditorWidgetsSettings::UWaveformEditorWidgetsSettings

Source code excerpt:

	, ZeroCrossingLineThickness(1.f)
	, MajorGridColor(FLinearColor::Black)
	, MinorGridColor(FLinearColor(0.f, 0.f, 0.f, 0.5f))
	, RulerBackgroundColor(FLinearColor::Black)
	, RulerTicksColor(FLinearColor(1.f, 1.f, 1.f, 0.9f))
	, RulerTextColor(FLinearColor(1.f, 1.f, 1.f, 0.9f))
	, RulerFontSize(10.f)
	, ShowLoudnessGrid(true)
	, ShowLoudnessGridDecibelValues(true)

#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorWidgetsSettings.h:54

Scope (from outer to inner):

file
class        class UWaveformEditorWidgetsSettings : public UDeveloperSettings

Source code excerpt:

	
	UPROPERTY(config, EditAnywhere, Category = "Waveform Viewer")
	FLinearColor MinorGridColor;

	UPROPERTY(config, EditAnywhere, Category = "Ruler")
	FLinearColor RulerBackgroundColor;

	UPROPERTY(config, EditAnywhere, Category = "Ruler")
	FLinearColor RulerTicksColor;

#Loc: <Workspace>/Engine/Plugins/Runtime/WaveTable/Source/WaveTableEditor/Private/WaveTableCurveEditorViewStacked.cpp:651

Scope (from outer to inner):

file
namespace    WaveTable
namespace    Editor
function     SViewStacked::FGridDrawInfo::FGridDrawInfo

Source code excerpt:


			MajorGridColor = InGridColor;
			MinorGridColor = InGridColor.CopyWithNewOpacity(InGridColor.A * 0.5f);

			PaintGeometry = InAllottedGeometry->ToPaintGeometry();

			LabelFormat.SetMaximumFractionalDigits(2);
		}

#Loc: <Workspace>/Engine/Plugins/Runtime/WaveTable/Source/WaveTableEditor/Private/WaveTableCurveEditorViewStacked.cpp:698

Scope (from outer to inner):

file
namespace    WaveTable
namespace    Editor
function     FLinearColor SViewStacked::FGridDrawInfo::GetMinorGridColor

Source code excerpt:

		FLinearColor SViewStacked::FGridDrawInfo::GetMinorGridColor() const
		{
			return MinorGridColor;
		}

		double SViewStacked::FGridDrawInfo::GetPixelBottom() const
		{
			return PixelBottom;
		}

#Loc: <Workspace>/Engine/Plugins/Runtime/WaveTable/Source/WaveTableEditor/Public/WaveTableCurveEditorViewStacked.h:118

Scope (from outer to inner):

file
namespace    WaveTable
namespace    Editor
class        class SViewStacked : public SCurveEditorViewStacked

Source code excerpt:

			private:
				FLinearColor MajorGridColor;
				FLinearColor MinorGridColor;

				int32 BaseLayerId = INDEX_NONE;

				const FCurveModel* CurveModel = nullptr;

				double LowerValue = 0.0;

#Loc: <Workspace>/Engine/Source/Editor/CurveEditor/Private/Views/SCurveEditorViewStacked.cpp:132

Scope (from outer to inner):

file
function     void SCurveEditorViewStacked::DrawViewGrids

Source code excerpt:

	const float          Height = AllottedGeometry.GetLocalSize().Y;
	const FLinearColor   MajorGridColor = CurveEditor->GetPanel()->GetGridLineTint();
	const FLinearColor   MinorGridColor = MajorGridColor.CopyWithNewOpacity(MajorGridColor.A * .5f);
	const FPaintGeometry PaintGeometry = AllottedGeometry.ToPaintGeometry();
	const FSlateBrush*   WhiteBrush = FAppStyle::GetBrush("WhiteBrush");

	TArray<float> MajorGridLines, MinorGridLines;
	TArray<FText> MajorGridLabels;

#Loc: <Workspace>/Engine/Source/Editor/CurveEditor/Private/Views/SCurveEditorViewStacked.cpp:200

Scope (from outer to inner):

file
function     void SCurveEditorViewStacked::DrawViewGrids

Source code excerpt:

			{
				LinePoints[0].Y = LinePoints[1].Y = GridLineVal;
				FSlateDrawElement::MakeLines(OutDrawElements, GridLineLayerId, PaintGeometry, LinePoints, DrawEffects, MinorGridColor, false);
			}
		}

		// Vertical grid lines
		{
			const float RoundedWidth = FMath::RoundToFloat(Width);

#Loc: <Workspace>/Engine/Source/Editor/CurveEditor/Private/Views/SCurveEditorViewStacked.cpp:229

Scope (from outer to inner):

file
function     void SCurveEditorViewStacked::DrawViewGrids

Source code excerpt:

				{
					LinePoints[0].X = LinePoints[1].X = VerticalLine;
					FSlateDrawElement::MakeLines(OutDrawElements, GridLineLayerId, PaintGeometry, LinePoints, DrawEffects, MinorGridColor, false);
				}
			}
		}
	}
}

#Loc: <Workspace>/Engine/Source/Editor/CurveEditor/Private/Views/SInteractiveCurveEditorView.cpp:289

Scope (from outer to inner):

file
function     void SInteractiveCurveEditorView::DrawGridLines

Source code excerpt:

	const float          RoundedHeight = FMath::RoundToFloat(Height);
	const FLinearColor   MajorGridColor = CurveEditor->GetPanel()->GetGridLineTint();
	const FLinearColor   MinorGridColor = MajorGridColor.CopyWithNewOpacity(MajorGridColor.A * .5f);
	const FPaintGeometry PaintGeometry = AllottedGeometry.ToPaintGeometry();
	const FLinearColor	 LabelColor = FLinearColor::White.CopyWithNewOpacity(0.65f);
	const FSlateFontInfo FontInfo = FCoreStyle::Get().GetFontStyle("ToolTip.LargerFont");

	// Get our viewing range bounds. We go through the GetBounds() interface on the curve editor because it's more aware of what our range is than the original widget is.
	double InputValueMin, InputValueMax;

#Loc: <Workspace>/Engine/Source/Editor/CurveEditor/Private/Views/SInteractiveCurveEditorView.cpp:376

Scope (from outer to inner):

file
function     void SInteractiveCurveEditorView::DrawGridLines

Source code excerpt:

			LinePoints,
			DrawEffects,
			MinorGridColor,
			false
		);
	}

	MajorGridLines.Reset();
	MinorGridLines.Reset();

#Loc: <Workspace>/Engine/Source/Editor/CurveEditor/Private/Views/SInteractiveCurveEditorView.cpp:456

Scope (from outer to inner):

file
function     void SInteractiveCurveEditorView::DrawGridLines

Source code excerpt:

			LinePoints,
			DrawEffects,
			MinorGridColor,
			false
		);
	}
}

void SInteractiveCurveEditorView::DrawCurves(TSharedRef<FCurveEditor> CurveEditor, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 BaseLayerId, const FWidgetStyle& InWidgetStyle, ESlateDrawEffect DrawEffects) const