mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
- glcd: re-add 540d081; do always show startup logo
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -199,26 +199,25 @@ void cGLCD::Exec()
|
|||||||
|
|
||||||
bitmap->Clear(ColorConvert3to1(t.glcd_color_bg_red, t.glcd_color_bg_green, t.glcd_color_bg_blue));
|
bitmap->Clear(ColorConvert3to1(t.glcd_color_bg_red, t.glcd_color_bg_green, t.glcd_color_bg_blue));
|
||||||
|
|
||||||
if (Channel == "Neutrino")
|
if (Channel.compare("Neutrino") == 0)
|
||||||
{
|
{
|
||||||
if (g_settings.glcd_show_logo)
|
if (imageShow(DATADIR "/neutrino/icons/start.jpg", 0, 0, 0, 0, false, true, true, false, false))
|
||||||
{
|
{
|
||||||
if (imageShow(DATADIR "/neutrino/icons/start.jpg", 0, 0, 0, 0, false, true, true, false, false))
|
GLCD::cFont font_tmp;
|
||||||
{
|
|
||||||
GLCD::cFont font_tmp;
|
|
||||||
|
|
||||||
int fw = font_epg.Width(Epg);
|
int fw = font_epg.Width(Epg);
|
||||||
font_tmp.LoadFT2(t.glcd_font, "UTF-8", fontsize_epg * (bitmap->Width() - 4) / fw);
|
font_tmp.LoadFT2(t.glcd_font, "UTF-8", fontsize_epg * (bitmap->Width() - 4) / fw);
|
||||||
fw = font_tmp.Width(Epg);
|
fw = font_tmp.Width(Epg);
|
||||||
|
|
||||||
drawText(std::max(2,(bitmap->Width() - 4 - fw)/2),
|
drawText(std::max(2,(bitmap->Width() - 4 - fw)/2),
|
||||||
10 * bitmap->Height()/100, bitmap->Width() - 4, fw, Epg,
|
10 * bitmap->Height()/100, bitmap->Width() - 4, fw, Epg,
|
||||||
&font_tmp, ColorConvert3to1(t.glcd_color_fg_red, t.glcd_color_fg_green, t.glcd_color_fg_blue), GLCD::cColor::Transparent, true, 0, ALIGN_NONE);
|
&font_tmp, ColorConvert3to1(t.glcd_color_fg_red, t.glcd_color_fg_green, t.glcd_color_fg_blue), GLCD::cColor::Transparent, true, 0, ALIGN_NONE);
|
||||||
|
|
||||||
lcd->SetScreen(bitmap->Data(), bitmap->Width(), bitmap->Height());
|
lcd->SetScreen(bitmap->Data(), bitmap->Width(), bitmap->Height());
|
||||||
lcd->Refresh(true);
|
lcd->Refresh(true);
|
||||||
}
|
}
|
||||||
} else {
|
else
|
||||||
|
{
|
||||||
cglcd->bitmap->Clear(ColorConvert3to1(t.glcd_color_bg_red, t.glcd_color_bg_green, t.glcd_color_bg_blue));
|
cglcd->bitmap->Clear(ColorConvert3to1(t.glcd_color_bg_red, t.glcd_color_bg_green, t.glcd_color_bg_blue));
|
||||||
cglcd->lcd->Refresh(true);
|
cglcd->lcd->Refresh(true);
|
||||||
}
|
}
|
||||||
@@ -1086,7 +1085,7 @@ void cGLCD::Run(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!g_settings.glcd_enable || doSuspend || doStandby)
|
if (!g_settings.glcd_enable || doSuspend || doStandby)
|
||||||
{
|
{
|
||||||
// for restart, don't blacken screen
|
// for restart, don't blacken screen
|
||||||
bitmap->Clear(GLCD::cColor::Black);
|
bitmap->Clear(GLCD::cColor::Black);
|
||||||
@@ -1094,18 +1093,17 @@ void cGLCD::Run(void)
|
|||||||
lcd->SetScreen(bitmap->Data(), bitmap->Width(), bitmap->Height());
|
lcd->SetScreen(bitmap->Data(), bitmap->Width(), bitmap->Height());
|
||||||
lcd->Refresh(false);
|
lcd->Refresh(false);
|
||||||
}
|
}
|
||||||
if(doExit)
|
if (doExit)
|
||||||
{
|
{
|
||||||
if (g_settings.glcd_show_logo)
|
if (imageShow(DATADIR "/neutrino/icons/shutdown.jpg", 0, 0, 0, 0, false, true, true, false, false))
|
||||||
|
{
|
||||||
|
lcd->SetScreen(bitmap->Data(), bitmap->Width(), bitmap->Height());
|
||||||
|
lcd->Refresh(false);
|
||||||
|
sleep(1);
|
||||||
|
lcd->SetBrightness(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (imageShow(DATADIR "/neutrino/icons/shutdown.jpg", 0, 0, 0, 0, false, true, true, false, false))
|
|
||||||
{
|
|
||||||
lcd->SetScreen(bitmap->Data(), bitmap->Width(), bitmap->Height());
|
|
||||||
lcd->Refresh(false);
|
|
||||||
sleep(3);
|
|
||||||
lcd->SetBrightness(0);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
bitmap->Clear(GLCD::cColor::Black);
|
bitmap->Clear(GLCD::cColor::Black);
|
||||||
lcd->SetBrightness(0);
|
lcd->SetBrightness(0);
|
||||||
lcd->SetScreen(bitmap->Data(), bitmap->Width(), bitmap->Height());
|
lcd->SetScreen(bitmap->Data(), bitmap->Width(), bitmap->Height());
|
||||||
|
Reference in New Issue
Block a user