summaryrefslogtreecommitdiffstats
path: root/gui/fileselector.cpp
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2013-07-25 22:53:02 +0200
committerGerrit Code Review <gerrit@198.50.184.117>2013-08-24 14:56:48 +0200
commitfafb0c541bb4b24515c57251a44d87825eec90fb (patch)
tree9cddb55ceef8912c8fafe618c98147ff6df19ef6 /gui/fileselector.cpp
parentClean-up in partitions.hpp (diff)
downloadandroid_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.gz
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.bz2
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.lz
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.xz
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.zst
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.zip
Diffstat (limited to 'gui/fileselector.cpp')
-rw-r--r--gui/fileselector.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/gui/fileselector.cpp b/gui/fileselector.cpp
index 539bba096..0f8d903a3 100644
--- a/gui/fileselector.cpp
+++ b/gui/fileselector.cpp
@@ -198,12 +198,12 @@ GUIFileSelector::GUIFileSelector(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
@@ -408,11 +408,10 @@ int GUIFileSelector::Render(void)
if (updateFileList) {
string value;
DataManager::GetValue(mPathVar, value);
- if (GetFileList(value) == 0) {
+ if (GetFileList(value) == 0)
updateFileList = false;
- } else {
+ else
return 0;
- }
}
// This tells us how many lines we can actually render
@@ -652,7 +651,9 @@ int GUIFileSelector::Update(void)
int GUIFileSelector::GetSelection(int x, int y)
{
// We only care about y position
- if (y < mRenderY || y - mRenderY <= mHeaderH || y - mRenderY > mRenderH) return -1;
+ if (y < mRenderY || y - mRenderY <= mHeaderH || y - mRenderY > mRenderH)
+ return -1;
+
return (y - mRenderY - mHeaderH);
}
@@ -674,7 +675,6 @@ int GUIFileSelector::NotifyTouch(TOUCH_STATE state, int x, int y)
startY = lastY = last2Y = y;
scrollingSpeed = 0;
break;
-
case TOUCH_DRAG:
// Check if we dragged out of the selection window
if (GetSelection(x, y) == -1) {