mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-13 04:42:12 +03:00
Fix a bug when changing themes (some properties where not updated due to cached properties).
Fix a bug when displaying sub-menus, it was sometimes incorrectly positioned.
This commit is contained in:
@@ -35,7 +35,8 @@ class EE_API StyleSheetProperty {
|
||||
StyleSheetProperty();
|
||||
|
||||
explicit StyleSheetProperty( const PropertyDefinition* definition, const std::string& value,
|
||||
const Uint32& index = 0, bool trimValue = true );
|
||||
const Uint32& index = 0, bool trimValue = true,
|
||||
bool cachedProperty = false );
|
||||
|
||||
explicit StyleSheetProperty( const std::string& name, const std::string& value,
|
||||
const bool& trimValue = true, const Uint32& specificity = 0,
|
||||
@@ -177,6 +178,10 @@ class EE_API StyleSheetProperty {
|
||||
|
||||
const std::vector<VariableFunctionCache>& getVarCache() const;
|
||||
|
||||
StyleSheetProperty& setCachedProperty( bool cached );
|
||||
|
||||
bool isCachedProperty() const;
|
||||
|
||||
protected:
|
||||
std::string mName;
|
||||
String::HashType mNameHash;
|
||||
@@ -187,6 +192,7 @@ class EE_API StyleSheetProperty {
|
||||
bool mVolatile;
|
||||
bool mImportant;
|
||||
bool mIsVarValue;
|
||||
bool mCachedProperty{ false };
|
||||
const PropertyDefinition* mPropertyDefinition;
|
||||
const ShorthandDefinition* mShorthandDefinition;
|
||||
std::vector<StyleSheetProperty> mIndexedProperty;
|
||||
|
||||
@@ -39,6 +39,8 @@ class EE_API StyleSheetStyle {
|
||||
|
||||
void clearProperties();
|
||||
|
||||
void clearCachedProperties();
|
||||
|
||||
bool hasProperties() const;
|
||||
|
||||
bool hasProperty( PropertyId id ) const;
|
||||
|
||||
@@ -157,7 +157,8 @@ class EE_API UISceneNode : public SceneNode {
|
||||
|
||||
void nodeToWorldTranslation( Vector2f& Pos ) const;
|
||||
|
||||
void reloadStyle( bool disableAnimations = false, bool forceReApplyProperties = false );
|
||||
void reloadStyle( bool disableAnimations = false, bool forceReApplyProperties = false,
|
||||
bool resetPropertiesCache = false );
|
||||
|
||||
bool hasThreadPool() const;
|
||||
|
||||
|
||||
@@ -77,6 +77,8 @@ class EE_API UIStyle : public UIState {
|
||||
|
||||
void resetGlobalDefinition();
|
||||
|
||||
void resetCachedProperties();
|
||||
|
||||
protected:
|
||||
UIWidget* mWidget;
|
||||
std::shared_ptr<CSS::StyleSheetStyle> mElementStyle;
|
||||
|
||||
@@ -197,9 +197,9 @@ class EE_API UIWidget : public UINode {
|
||||
|
||||
UIStyle* getUIStyle() const;
|
||||
|
||||
void reloadStyle( const bool& reloadChilds = true, const bool& disableAnimations = false,
|
||||
const bool& reportStateChange = true,
|
||||
const bool& forceReApplyProperties = false );
|
||||
void reloadStyle( bool reloadChilds = true, bool disableAnimations = false,
|
||||
bool reportStateChange = true, bool forceReApplyProperties = false,
|
||||
bool resetPropertyCache = false );
|
||||
|
||||
void beginAttributesTransaction();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user