diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2015-02-18 21:35:00 +0100 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2015-02-21 15:14:24 +0100 |
commit | 21ff02a69331fbcd53dc93a1af9a93618225b4bf (patch) | |
tree | 623fe5a07a506362b91a16b34d62a875b3d45c32 /gui/fill.cpp | |
parent | gui: make kinetic scrolling deceleration more awesome (diff) | |
download | android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.gz android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.bz2 android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.lz android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.xz android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.zst android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.zip |
Diffstat (limited to 'gui/fill.cpp')
-rw-r--r-- | gui/fill.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/gui/fill.cpp b/gui/fill.cpp index 1ddefaa9b..b315cd08a 100644 --- a/gui/fill.cpp +++ b/gui/fill.cpp @@ -27,23 +27,15 @@ extern "C" { GUIFill::GUIFill(xml_node<>* node) : GUIObject(node) { - xml_attribute<>* attr; - xml_node<>* child; - - if (!node) - return; - - attr = node->first_attribute("color"); - if (!attr) { + bool has_color = false; + mColor = LoadAttrColor(node, "color", &has_color); + if (!has_color) { LOGERR("No color specified for fill\n"); return; } - std::string color = attr->value(); - ConvertStrToColor(color, &mColor); - // Load the placement - LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH); + LoadPlacement(FindNode(node, "placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH); return; } |