- timerlist: formatting code using astyle; some manual code nicenings

Conflicts:
	src/gui/timeosd.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2021-12-06 05:18:19 +01:00
committed by Thilo Graf
parent ee297bc77a
commit fd2302fbf6
2 changed files with 37 additions and 30 deletions

View File

@@ -33,10 +33,10 @@
#include <neutrino.h>
#include <gui/volumebar.h>
#include <gui/infoclock.h>
#include <gui/timeosd.h>
#include "screensaver.h"
CTimeOSD::CTimeOSD(): CComponentsFrmClock(1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON)
{
m_mode = MODE_HIDE;
@@ -56,10 +56,13 @@ void CTimeOSD::Init()
setColorAll(COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_SHADOW_PLUS_0);
// set text color
if (paint_bg){
if (paint_bg)
{
cl_col_text = COL_MENUCONTENT_TEXT;
setColorBody(COL_MENUCONTENT_PLUS_0);
}else{
}
else
{
cl_col_text = COL_INFOCLOCK_TEXT;
setColorBody(COL_BACKGROUND_PLUS_0);
}
@@ -75,7 +78,8 @@ void CTimeOSD::Init()
timescale.setType(CProgressBar::PB_TIMESCALE);
}
#if 0 //if hide() or kill() required, it's recommended to use it separately
#if 0
// if hide() or kill() required, it's recommended to use it separately
CTimeOSD::~CTimeOSD()
{
CComponents::kill();
@@ -134,7 +138,8 @@ void CTimeOSD::updatePos(int position, int duration)
void CTimeOSD::update(int position, int duration)
{
switch(m_mode) {
switch (m_mode)
{
case MODE_ASC:
show(position, false);
break;
@@ -151,7 +156,8 @@ void CTimeOSD::update(int position, int duration)
void CTimeOSD::switchMode(int position, int duration)
{
switch (m_mode) {
switch (m_mode)
{
case MODE_ASC:
m_mode = MODE_DESC;
CComponents::kill();
@@ -172,7 +178,8 @@ void CTimeOSD::switchMode(int position, int duration)
void CTimeOSD::kill()
{
if (m_mode != MODE_HIDE) {
if (m_mode != MODE_HIDE)
{
KillAndResetTimescale();
CComponents::kill();
}