Commit f0bc9cf2 authored by Shelley Chen's avatar Shelley Chen Committed by chrome-bot
Browse files

detachables: Remove Arrows around Language Display



For detachables, remove arrows around language
in the top right corner of the UI.  Switching languages
is done through the menu now.

BUG=b:64756517
BRANCH=None
TEST=compile image for kevin, make sure arrows appear and can
     still use arrow keys for switching languages.
     compile image for soraka, make sure arrows don't appear
     and language display changes when switching language with
     menu.

Change-Id: I0238f484b13b420f8855780d376ef3ef3da76d00
Signed-off-by: default avatarShelley Chen <shchen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/629966

Reviewed-by: default avatarJulius Werner <jwerner@chromium.org>
parent 2e5bb44e
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <vboot_api.h> #include <vboot_api.h>
#include <vboot/screens.h> #include <vboot/screens.h>
#include "base/graphics.h" #include "base/graphics.h"
#include "config.h"
#include "drivers/flash/cbfs.h" #include "drivers/flash/cbfs.h"
#include "drivers/video/display.h" #include "drivers/video/display.h"
#include "vboot/util/commonparams.h" #include "vboot/util/commonparams.h"
...@@ -462,13 +463,16 @@ static VbError_t vboot_draw_language(uint32_t locale) ...@@ -462,13 +463,16 @@ static VbError_t vboot_draw_language(uint32_t locale)
x = VB_SCALE_HALF + VB_DIVIDER_WIDTH / 2; x = VB_SCALE_HALF + VB_DIVIDER_WIDTH / 2;
/* Draw right arrow */ /* Draw right arrow */
w = VB_SIZE_AUTO; if (!IS_ENABLED(CONFIG_DETACHABLE_UI)) {
h = VB_TEXT_HEIGHT; w = VB_SIZE_AUTO;
RETURN_ON_ERROR(draw_image("arrow_right.bmp", x, VB_DIVIDER_V_OFFSET, h = VB_TEXT_HEIGHT;
w, h, PIVOT_H_RIGHT|PIVOT_V_BOTTOM)); RETURN_ON_ERROR(draw_image("arrow_right.bmp", x,
RETURN_ON_ERROR(get_image_size(base_graphics, "arrow_right.bmp", VB_DIVIDER_V_OFFSET, w, h,
&w, &h)); PIVOT_H_RIGHT|PIVOT_V_BOTTOM));
x -= w + VB_PADDING; RETURN_ON_ERROR(get_image_size(base_graphics, "arrow_right.bmp",
&w, &h));
x -= w + VB_PADDING;
}
/* Draw language name */ /* Draw language name */
w = VB_SIZE_AUTO; w = VB_SIZE_AUTO;
...@@ -477,13 +481,17 @@ static VbError_t vboot_draw_language(uint32_t locale) ...@@ -477,13 +481,17 @@ static VbError_t vboot_draw_language(uint32_t locale)
x, VB_DIVIDER_V_OFFSET, w, h, x, VB_DIVIDER_V_OFFSET, w, h,
PIVOT_H_RIGHT|PIVOT_V_BOTTOM)); PIVOT_H_RIGHT|PIVOT_V_BOTTOM));
RETURN_ON_ERROR(get_image_size_locale("language.bmp", locale, &w, &h)); RETURN_ON_ERROR(get_image_size_locale("language.bmp", locale, &w, &h));
x -= w + VB_PADDING;
/* Draw left arrow */ if (!IS_ENABLED(CONFIG_DETACHABLE_UI)) {
w = VB_SIZE_AUTO; x -= w + VB_PADDING;
h = VB_TEXT_HEIGHT;
RETURN_ON_ERROR(draw_image("arrow_left.bmp", x, VB_DIVIDER_V_OFFSET, /* Draw left arrow */
w, h, PIVOT_H_RIGHT|PIVOT_V_BOTTOM)); w = VB_SIZE_AUTO;
h = VB_TEXT_HEIGHT;
RETURN_ON_ERROR(draw_image("arrow_left.bmp", x,
VB_DIVIDER_V_OFFSET, w, h,
PIVOT_H_RIGHT|PIVOT_V_BOTTOM));
}
return VBERROR_SUCCESS; return VBERROR_SUCCESS;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment