mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 02:41:12 +02:00
timerlist: formatting code using astyle; some manual code nicenings
Origin commit data
------------------
Branch: ni/coolstream
Commit: 638e29ccdd
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-12-04 (Sat, 04 Dec 2021)
Origin message was:
------------------
- timerlist: formatting code using astyle; some manual code nicenings
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -33,13 +33,10 @@
|
||||
#include <neutrino.h>
|
||||
#include <gui/volumebar.h>
|
||||
#include <gui/infoclock.h>
|
||||
#include <gui/infoicons.h>
|
||||
#include <gui/timeosd.h>
|
||||
#include "screensaver.h"
|
||||
|
||||
//NI InfoIcons
|
||||
#include <gui/infoicons.h>
|
||||
|
||||
|
||||
CTimeOSD::CTimeOSD(): CComponentsFrmClock(1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON)
|
||||
{
|
||||
m_mode = MODE_HIDE;
|
||||
@@ -59,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);
|
||||
}
|
||||
@@ -78,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();
|
||||
@@ -137,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:
|
||||
case MODE_TMP:
|
||||
show(position, false);
|
||||
@@ -155,24 +157,25 @@ void CTimeOSD::update(int position, int duration)
|
||||
|
||||
void CTimeOSD::switchMode(int position, int duration)
|
||||
{
|
||||
switch (m_mode) {
|
||||
switch (m_mode)
|
||||
{
|
||||
case MODE_ASC:
|
||||
case MODE_TMP:
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false);
|
||||
m_mode = MODE_DESC;
|
||||
CComponents::kill();
|
||||
break;
|
||||
case MODE_DESC:
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false);
|
||||
m_mode = MODE_BAR;
|
||||
CComponents::kill();
|
||||
break;
|
||||
case MODE_BAR:
|
||||
CInfoIcons::getInstance()->enableInfoIcons(true); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(true);
|
||||
KillAndResetTimescale();
|
||||
return;
|
||||
default:
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false); //NI InfoIcons
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false);
|
||||
m_mode = MODE_ASC;
|
||||
}
|
||||
|
||||
@@ -181,7 +184,8 @@ void CTimeOSD::switchMode(int position, int duration)
|
||||
|
||||
void CTimeOSD::kill()
|
||||
{
|
||||
if (m_mode != MODE_HIDE) {
|
||||
if (m_mode != MODE_HIDE)
|
||||
{
|
||||
KillAndResetTimescale();
|
||||
CComponents::kill();
|
||||
}
|
||||
|
Reference in New Issue
Block a user