From fafb0c541bb4b24515c57251a44d87825eec90fb Mon Sep 17 00:00:00 2001 From: Vojtech Bocek Date: Thu, 25 Jul 2013 22:53:02 +0200 Subject: Unify indentation and little clean-up in TWRP files Signed-off-by: Vojtech Bocek --- gui/listbox.cpp | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'gui/listbox.cpp') diff --git a/gui/listbox.cpp b/gui/listbox.cpp index 3af40ed5b..a4976f4e1 100644 --- a/gui/listbox.cpp +++ b/gui/listbox.cpp @@ -191,12 +191,12 @@ GUIListBox::GUIListBox(xml_node<>* node) attr = child->first_attribute("highlightcolor"); memset(&mFontHighlightColor, 0, sizeof(COLOR)); - if (attr) - { - std::string color = attr->value(); + if (attr) + { + std::string color = attr->value(); ConvertStrToColor(color, &mFontHighlightColor); hasFontHighlightColor = true; - } + } } // Load the separator if it exists @@ -323,15 +323,15 @@ GUIListBox::GUIListBox(xml_node<>* node) // Get the data for the list child = node->first_node("listitem"); - if (!child) return; + if (!child) return; while (child) - { - ListData data; + { + ListData data; attr = child->first_attribute("name"); - if (!attr) return; - data.displayName = attr->value(); + if (!attr) return; + data.displayName = attr->value(); data.variableValue = child->value(); if (child->value() == currentValue) { @@ -340,10 +340,10 @@ GUIListBox::GUIListBox(xml_node<>* node) data.selected = 0; } - mList.push_back(data); + mList.push_back(data); - child = child->next_sibling("listitem"); - } + child = child->next_sibling("listitem"); + } } GUIListBox::~GUIListBox() @@ -430,21 +430,21 @@ int GUIListBox::Render(void) } if (mList.at(line + mStart).selected != 0) - { - icon = mIconSelected; + { + icon = mIconSelected; currentIconHeight = mSelectedIconHeight; currentIconWidth = mSelectedIconWidth; currentIconOffsetY = SelectedIconOffsetY; currentIconOffsetX = SelectedIconOffsetX; - } - else - { - icon = mIconUnselected; + } + else + { + icon = mIconUnselected; currentIconHeight = mSelectedIconHeight; currentIconWidth = mSelectedIconWidth; currentIconOffsetY = SelectedIconOffsetY; currentIconOffsetX = SelectedIconOffsetX; - } + } if (icon && icon->GetResource()) { @@ -758,8 +758,8 @@ int GUIListBox::NotifyVarChange(std::string varName, std::string value) } } if (varName == mVariable) - { - int i, listSize = mList.size(), selected_index = 0; + { + int i, listSize = mList.size(), selected_index = 0; currentValue = value; @@ -783,8 +783,8 @@ int GUIListBox::NotifyVarChange(std::string varName, std::string value) } mUpdate = 1; - return 0; - } + return 0; + } return 0; } -- cgit v1.2.3