mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-01 11:06:30 +03:00
Widget "background" attribute fix.
--HG-- branch : dev
This commit is contained in:
@@ -36,11 +36,11 @@
|
||||
<PushButton layout_width="wrap_content" layout_height="wrap_content" text="testing padding" layout_gravity="bottom|right" gravity="center" padding="8dp" layout_to_top_of="tmp" />
|
||||
<PushButton id="pbut" text="OK!" textSize="16dp" icon="ok" layout_gravity="left|bottom" gravity="center" layout_width="wrap_content" layout_height="wrap_content" layout_marginBottom="8dp" padding="8dp" layout_to_top_of="tm" />
|
||||
|
||||
<Slider id="slider" orientation="horizontal" halfslider="true" layout_width="200dp" layout_height="wrap_content" padding="32dp" background="#555" layout_to_bottom_of="el1" />
|
||||
<Slider id="slider" orientation="horizontal" halfslider="true" layout_width="200dp" layout_height="wrap_content" padding="32dp" backgroundColor="#555" layout_to_bottom_of="el1" />
|
||||
|
||||
<ScrollBar id="scrollbar" orientation="horizontal" layout_width="200dp" layout_height="wrap_content" padding="8dp" background="#12345666" layout_to_bottom_of="slider" />
|
||||
<ScrollBar id="scrollbar" orientation="horizontal" layout_width="200dp" layout_height="wrap_content" padding="8dp" backgroundColor="#12345666" layout_to_bottom_of="slider" />
|
||||
|
||||
<SpinBox id="spinbox" layout_width="200dp" layout_height="wrap_content" padding="8dp" background="#54345666" layout_to_bottom_of="scrollbar" />
|
||||
<SpinBox id="spinbox" layout_width="200dp" layout_height="wrap_content" padding="8dp" backgroundColor="#54345666" layout_to_bottom_of="scrollbar" />
|
||||
|
||||
<TextEdit layout_width="200dp" layout_height="50dp" layout_gravity="bottom|center_horizontal" padding="16dp" layout_marginBottom="140dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -700,7 +700,7 @@ bool UIWidget::setAttribute( const NodeAttribute& attribute, const Uint32& state
|
||||
} else if ( "background" == name ) {
|
||||
Drawable * res = NULL;
|
||||
|
||||
if ( String::startsWith( name, "#" ) ) {
|
||||
if ( String::startsWith( attribute.getValue(), "#" ) ) {
|
||||
setAttribute( NodeAttribute( "backgroundcolor", attribute.getValue() ) );
|
||||
} else if ( NULL != ( res = DrawableSearcher::searchByName( name ) ) ) {
|
||||
setBackgroundDrawable( state, res, res->getDrawableType() == Drawable::SPRITE );
|
||||
@@ -764,7 +764,7 @@ bool UIWidget::setAttribute( const NodeAttribute& attribute, const Uint32& state
|
||||
} else if ( "foreground" == name ) {
|
||||
Drawable * res = NULL;
|
||||
|
||||
if ( String::startsWith( name, "#" ) ) {
|
||||
if ( String::startsWith( attribute.getValue(), "#" ) ) {
|
||||
setAttribute( NodeAttribute( "foregroundcolor", attribute.getValue() ) );
|
||||
} else if ( NULL != ( res = DrawableSearcher::searchByName( attribute.getValue() ) ) ) {
|
||||
setForegroundDrawable( state, res, res->getDrawableType() == Drawable::SPRITE );
|
||||
|
||||
Reference in New Issue
Block a user