UI bug fixes and minor changes.

--HG--
branch : dev-css
This commit is contained in:
Martín Lucas Golini
2019-05-22 00:35:01 -03:00
parent e972e4f27e
commit c3b368ee76
14 changed files with 62 additions and 27 deletions

View File

@@ -26,6 +26,8 @@ class StyleSheetSelectorRule {
};
enum SpecificityVal {
SpecificityImportant = UINT32_MAX,
SpecificityInline = UINT32_MAX - 1,
SpecificityId = 1000000,
SpecificityClass = 100000,
SpecificityTag = 10000,

View File

@@ -44,8 +44,12 @@ class EE_API UISceneNode : public SceneNode {
void setStyleSheet( const CSS::StyleSheet& styleSheet );
void setStyleSheet( const std::string& inlineStyleSheet );
void combineStyleSheet( const CSS::StyleSheet& styleSheet );
void combineStyleSheet( const std::string& inlineStyleSheet );
CSS::StyleSheet& getStyleSheet();
bool hasStyleSheet();

View File

@@ -38,7 +38,7 @@ class EE_API UIScrollView : public UITouchDragableWidget {
UIScrollBar * getHorizontalScrollBar() const;
UINode * getContainer() const;
UIWidget * getContainer() const;
virtual bool setAttribute( const NodeAttribute& attribute, const Uint32& state = UIState::StateFlagNormal );
protected:
@@ -47,7 +47,7 @@ class EE_API UIScrollView : public UITouchDragableWidget {
UI_SCROLLBAR_MODE mHScrollMode;
UIScrollBar * mVScroll;
UIScrollBar * mHScroll;
UINode * mContainer;
UIWidget * mContainer;
Node * mScrollView;
Uint32 mSizeChangeCb;

View File

@@ -61,9 +61,9 @@ class EE_API UIStyle : public UIState {
NodeAttribute getNodeAttribute(const std::string& attributeName ) const;
void addStyleSheetProperties( const CSS::StyleSheetProperties& properties );
void setStyleSheetProperties( const CSS::StyleSheetProperties& properties );
void addStyleSheetProperty( const CSS::StyleSheetProperty& property );
void setStyleSheetProperty( const CSS::StyleSheetProperty& property );
bool hasTransition( const std::string& propertyName );

View File

@@ -92,7 +92,7 @@ class EE_API UIWidget : public UINode, public CSS::StyleSheetElement {
void notifyLayoutAttrChangeParent();
bool setAttribute( const std::string& name, const std::string& value, const Uint32& state = UIState::StateFlagNormal );
void setStyleSheetProperty( const std::string& name, const std::string& value, const Uint32& specificity = UINT32_MAX - 1/*SpecificityInline*/ );
virtual bool setAttribute( const NodeAttribute& attribute, const Uint32& state = UIState::StateFlagNormal );