Files
UnrealEngineUWP/Engine/Source/Developer/SourceControl/Public/RevisionControlStyle/RevisionControlStyle.h
aditya ravichandran 28eccf9aa0 Revision Control Iconography Update:
Update the default set of revision control icons
Create FRevisionControlStyleManager to manage the currently active revision control style and add a default style that is used by all providers
#rb lauren.barnes, brooke.hubert
#preflight 639364ee67018b14b5fb9891

[CL 23466976 by aditya ravichandran in ue5-main branch]
2022-12-09 14:18:01 -05:00

61 lines
1.8 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Styling/SlateStyle.h"
/**
* The style manager that is used to access the currently active revision control style.
* Use FRevisionControlStyleManager::Get() to access and use any revision control icons/styles
*/
class SOURCECONTROL_API FRevisionControlStyleManager
{
public:
/** reloads textures used by slate renderer */
static void ReloadTextures();
/** @return The current revision control style being used */
static const ISlateStyle& Get();
/** @return The name of the current revision control style being used */
static FName GetStyleSetName();
/** Set the active revision control style to the input style name */
static void SetActiveRevisionControlStyle(FName InNewActiveRevisionControlStyleName);
/** Set the active revision control style to the default style */
static void ResetToDefaultRevisionControlStyle();
private:
// The default revision control style instance
static TSharedPtr< class ISlateStyle > DefaultRevisionControlStyleInstance;
// The currently active revision control style
static FName CurrentRevisionControlStyleName;
};
/**
* The default revision control style the editor ships with. Inherit from this to create a custom revision controls style
* Use FRevisionControlStyleManager::SetActiveRevisionControlStyle to change the currently active revision control style
* Edit the defaults in the constructor here to change any revision control icons in the editor
*/
class FDefaultRevisionControlStyle : public FSlateStyleSet
{
public:
FDefaultRevisionControlStyle();
virtual ~FDefaultRevisionControlStyle() override;
virtual const FName& GetStyleSetName() const override;
protected:
/** The specific color we use for all the "Branched" icons */
FLinearColor BranchedColor;
private:
static FName StyleName;
};