bUseSmallToolBarIcons

bUseSmallToolBarIcons

#Overview

name: bUseSmallToolBarIcons

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 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bUseSmallToolBarIcons is to control the size of toolbar icons in the Unreal Editor user interface. It determines whether small toolbar icons without labels are used instead of larger ones with labels.

This setting variable is primarily used by the Unreal Editor’s user interface system, specifically within the UnrealEd module. It affects the appearance of toolbars throughout the editor.

The value of this variable is set in the EditorStyleSettings class, which is part of the UnrealEd module. It is defined as a UPROPERTY, making it configurable through the editor’s settings interface and saveable in configuration files.

This variable interacts with the overall UI layout and sizing system of the Unreal Editor. It may affect other UI-related variables and settings, particularly those dealing with toolbar and icon layouts.

Developers should be aware that changing this setting will affect the entire editor’s toolbar appearance. It may impact user experience and workflow, especially for users accustomed to a particular icon size.

Best practices when using this variable include:

  1. Consider the target user base when deciding on the default value.
  2. Provide clear documentation or tooltips explaining the effect of this setting.
  3. Ensure that icon assets are available in both small and large sizes to accommodate this setting.
  4. Test the UI thoroughly with both settings to ensure readability and usability are maintained.
  5. Consider how this setting might interact with accessibility features or user preferences for larger UI elements.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:87, section: [/Script/UnrealEd.EditorStyleSettings]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Tests/EditorTests/Source/EditorTests/Private/UnrealEd/EditorSettingsTests.cpp:278

Scope (from outer to inner):

file
function     bool FEditorSettingsPreferencesTest::RunTest

Source code excerpt:

	FString OldStyleSetting = FEditorPromotionTestUtilities::GetPropertyByName(EditorStyleSettings, TEXT("bUseSmallToolBarIcons"));
	
	FEditorPromotionTestUtilities::SetPropertyByName(EditorStyleSettings, TEXT("bUseSmallToolBarIcons"), TEXT("true"));
	UE_LOG(LogEditorSettingsTests, Display, TEXT("Enabled UseSmallToolBarIcons"));

	//Export the preferences
	const FString TargetPreferenceFile = FString::Printf(TEXT("%s/BuildPromotion/Preferences-%d.ini"), *FPaths::AutomationDir(), FEngineVersion::Current().GetChangelist());
	EditorSettingsTestUtils::ExportEditorSettings(TargetPreferenceFile);

#Loc: <Workspace>/Engine/Plugins/Tests/EditorTests/Source/EditorTests/Private/UnrealEd/EditorSettingsTests.cpp:290

Scope (from outer to inner):

file
function     bool FEditorSettingsPreferencesTest::RunTest

Source code excerpt:


	//Change the setting back
	FEditorPromotionTestUtilities::SetPropertyByName(EditorStyleSettings, TEXT("bUseSmallToolBarIcons"), OldStyleSetting);
	UE_LOG(LogEditorSettingsTests, Display, TEXT("Set UseSmallToolBarIcons to original state"));

	EditorSettingsTestUtils::ImportEditorSettings(TargetOriginalPreferenceFile);
	UE_LOG(LogEditorSettingsTests, Display, TEXT("Reloaded original preferences"));

	return true;

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/EditorStyleSettings.h:97

Scope (from outer to inner):

file
class        class UEditorStyleSettings : public UObject

Source code excerpt:

	/** Whether to use small toolbar icons without labels or not. */
	UPROPERTY(EditAnywhere, config, Category=UserInterface)
	uint32 bUseSmallToolBarIcons:1;

	/** Menus longer than this threshold show their search field by default. Use 0 to always show, or a high number to always hide. When a searchable menu is open but the field is hidden, you can still start a search by typing. */
	UPROPERTY(EditAnywhere, config, Category=UserInterface, meta = (UIMin="0", UIMax="100"))
	uint32 MenuSearchFieldVisibilityThreshold = 10;

	/** If true the material editor and blueprint editor will show a grid on it's background. */

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorEngine.cpp:805

Scope (from outer to inner):

file
function     static bool GetSmallToolBarIcons

Source code excerpt:

static bool GetSmallToolBarIcons()
{
	return GetDefault<UEditorStyleSettings>()->bUseSmallToolBarIcons;
}

static bool GetDisplayMultiboxHooks()
{
	return GetDefault<UEditorPerProjectUserSettings>()->bDisplayUIExtensionPoints;
}