From 751a85e759fd2d43d7e150b560ae4890978eaeda Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Fri, 12 Dec 2014 16:59:10 -0600 Subject: Allow for X and Y offsets in GUI These can be used to center a lower resolution theme onto a higher resolution screen. May be useful for Nexus 9 unless or until we decide to do a 1536x2048 theme or on devices like the Moto 360 and LG G Watch R. The build flags will only affect the stock theme. If a custom theme wishes to apply an offset, it can be done by setting tw_x_offset and / or tw_y_offset in the variables section of the XML. Change-Id: I2390769ed861b96a4a3bb8a0f06d9021ec91b6b9 --- gui/objects.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gui/objects.hpp') diff --git a/gui/objects.hpp b/gui/objects.hpp index a89f48680..99b585507 100644 --- a/gui/objects.hpp +++ b/gui/objects.hpp @@ -35,6 +35,13 @@ using namespace rapidxml; #include "pages.hpp" #include "../partitions.hpp" +#ifndef TW_X_OFFSET +#define TW_X_OFFSET 0 +#endif +#ifndef TW_Y_OFFSET +#define TW_Y_OFFSET 0 +#endif + class RenderObject { public: -- cgit v1.2.3