diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 08af7e2511..d66b196f2d 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -1165,6 +1165,8 @@ LineSpacing=16 LineButtonX=SCREEN_CENTER_X-50 LineFunctionX=SCREEN_CENTER_X-30 +PageStartX=SCREEN_CENTER_X-100 +PageSpacingX=100 PageTextGainFocusCommand=diffuse,color("1,1,1,1") PageTextLoseFocusCommand=diffuse,color("0.6,0.6,0.6,1") diff --git a/src/ScreenDebugOverlay.cpp b/src/ScreenDebugOverlay.cpp index 5ca94ce00b..546af08ca7 100644 --- a/src/ScreenDebugOverlay.cpp +++ b/src/ScreenDebugOverlay.cpp @@ -43,6 +43,8 @@ static const ThemeMetric LINE_START_Y ("ScreenDebugOverlay", "LineStartY static const ThemeMetric LINE_SPACING ("ScreenDebugOverlay", "LineSpacing"); static const ThemeMetric LINE_BUTTON_X ("ScreenDebugOverlay", "LineButtonX"); static const ThemeMetric LINE_FUNCTION_X ("ScreenDebugOverlay", "LineFunctionX"); +static const ThemeMetric PAGE_START_X ("ScreenDebugOverlay", "PageStartX"); +static const ThemeMetric PAGE_SPACING_X ("ScreenDebugOverlay", "PageSpacingX"); // self-registering debug lines // We don't use SubscriptionManager, because we want to keep the line order. @@ -258,10 +260,10 @@ void ScreenDebugOverlay::Init() p->SetName( "PageText" ); p->LoadFromFont( THEME->GetPathF("ScreenDebugOverlay", "page") ); LOAD_ALL_COMMANDS( p ); - // todo: be able to set different values? -aj - p->SetXY( SCREEN_CENTER_X-100+iPage*100, SCREEN_TOP+20 ); + // todo: Y value is still hardcoded. -aj + p->SetXY( PAGE_START_X+iPage*PAGE_SPACING_X, SCREEN_TOP+20 ); p->SetText( *s + " (" + sButton + ")" ); - p->SetShadowLength( 1 ); + //p->SetShadowLength( 1 ); m_vptextPages.push_back( p ); this->AddChild( p ); }