mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Small fixes
This commit is contained in:
parent
84629bde6c
commit
15dbae66eb
2
config.h
2
config.h
@ -200,7 +200,7 @@ THEME_CLR(theme, clrRecMenuDayActive, 0xFF00FF00);
|
|||||||
THEME_CLR(theme, clrRecMenuDayInactive, 0xFFFF0000);
|
THEME_CLR(theme, clrRecMenuDayInactive, 0xFFFF0000);
|
||||||
THEME_CLR(theme, clrRecMenuDayHighlight, 0x44FFFFFF);
|
THEME_CLR(theme, clrRecMenuDayHighlight, 0x44FFFFFF);
|
||||||
THEME_CLR(theme, clrRecMenuTextBack, 0xFF000000);
|
THEME_CLR(theme, clrRecMenuTextBack, 0xFF000000);
|
||||||
THEME_CLR(theme, clrRecMenuTextActiveBack, 0xFF404749);
|
THEME_CLR(theme, clrRecMenuTextActiveBack, 0xFF939376);
|
||||||
THEME_CLR(theme, clrRecMenuKeyboardBack, 0xFF000000);
|
THEME_CLR(theme, clrRecMenuKeyboardBack, 0xFF000000);
|
||||||
THEME_CLR(theme, clrRecMenuKeyboardBorder, clrWhite);
|
THEME_CLR(theme, clrRecMenuKeyboardBorder, clrWhite);
|
||||||
THEME_CLR(theme, clrRecMenuKeyboardHigh, 0x40BB0000);
|
THEME_CLR(theme, clrRecMenuKeyboardHigh, 0x40BB0000);
|
||||||
|
@ -71,9 +71,12 @@ cRecMenuItemButton::cRecMenuItemButton(const char *text, eRecMenuState action, b
|
|||||||
height = 3 * fontButtons->Height() / 2;
|
height = 3 * fontButtons->Height() / 2;
|
||||||
this->halfWidth = halfWidth;
|
this->halfWidth = halfWidth;
|
||||||
this->alignLeft = alignLeft;
|
this->alignLeft = alignLeft;
|
||||||
|
pixmapText = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cRecMenuItemButton::~cRecMenuItemButton(void) {
|
cRecMenuItemButton::~cRecMenuItemButton(void) {
|
||||||
|
if (pixmapText)
|
||||||
|
osdManager.releasePixmap(pixmapText);
|
||||||
}
|
}
|
||||||
|
|
||||||
int cRecMenuItemButton::GetWidth(void) {
|
int cRecMenuItemButton::GetWidth(void) {
|
||||||
@ -85,20 +88,34 @@ void cRecMenuItemButton::SetPixmaps(void) {
|
|||||||
x += width / 4;
|
x += width / 4;
|
||||||
width = width / 2;
|
width = width / 2;
|
||||||
}
|
}
|
||||||
if (!pixmap)
|
if (!pixmap) {
|
||||||
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height));
|
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height));
|
||||||
else
|
pixmapText = osdManager.requestPixmap(5, cRect(x, y, width, height));
|
||||||
|
} else {
|
||||||
pixmap->SetViewPort(cRect(x, y, width, height));
|
pixmap->SetViewPort(cRect(x, y, width, height));
|
||||||
|
pixmapText->SetViewPort(cRect(x, y, width, height));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cRecMenuItemButton::Draw(void) {
|
void cRecMenuItemButton::Draw(void) {
|
||||||
|
pixmapText->Fill(clrTransparent);
|
||||||
int y = (height - fontButtons->Height()) / 2;
|
int y = (height - fontButtons->Height()) / 2;
|
||||||
int x;
|
int x;
|
||||||
if (!alignLeft)
|
if (!alignLeft)
|
||||||
x = (width - fontButtons->Width(*text)) / 2;
|
x = (width - fontButtons->Width(*text)) / 2;
|
||||||
else
|
else
|
||||||
x = 10;
|
x = 10;
|
||||||
pixmap->DrawText(cPoint(x, y), *text, colorText, colorTextBack, fontButtons);
|
pixmapText->DrawText(cPoint(x, y), *text, colorText, colorTextBack, fontButtons);
|
||||||
|
}
|
||||||
|
|
||||||
|
void cRecMenuItemButton::Hide(void) {
|
||||||
|
pixmap->SetLayer(-1);
|
||||||
|
pixmapText->SetLayer(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void cRecMenuItemButton::Show(void) {
|
||||||
|
pixmap->SetLayer(4);
|
||||||
|
pixmapText->SetLayer(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
eRecMenuState cRecMenuItemButton::ProcessKey(eKeys Key) {
|
eRecMenuState cRecMenuItemButton::ProcessKey(eKeys Key) {
|
||||||
@ -673,7 +690,7 @@ void cRecMenuItemText::DrawValue(char *newValue) {
|
|||||||
pixmapVal->Fill(clrBack);
|
pixmapVal->Fill(clrBack);
|
||||||
int textX = pixmapVal->DrawPort().Width() - font->Width(newValue) - 10;
|
int textX = pixmapVal->DrawPort().Width() - font->Width(newValue) - 10;
|
||||||
int textY = (pixmapVal->DrawPort().Height() - font->Height()) / 2;
|
int textY = (pixmapVal->DrawPort().Height() - font->Height()) / 2;
|
||||||
pixmapVal->DrawText(cPoint(textX, textY), newValue, colorText, clrTransparent, font);
|
pixmapVal->DrawText(cPoint(textX, textY), newValue, colorText, clrBack, font);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cRecMenuItemText::ActivateKeyboard(void) {
|
void cRecMenuItemText::ActivateKeyboard(void) {
|
||||||
@ -736,7 +753,7 @@ void cRecMenuItemText::ActivateKeyboard(void) {
|
|||||||
char *smsKeys = GetSMSKeys(num);
|
char *smsKeys = GetSMSKeys(num);
|
||||||
int smsKeysX = X + (gridWidth - fontSmall->Width(smsKeys))/2;
|
int smsKeysX = X + (gridWidth - fontSmall->Width(smsKeys))/2;
|
||||||
int smsKeysY = Y + gridHeight - fontSmall->Height() - 10;
|
int smsKeysY = Y + gridHeight - fontSmall->Height() - 10;
|
||||||
pixmapKeyboard->DrawText(cPoint(smsKeysX, smsKeysY), smsKeys, theme.Color(clrRecMenuKeyboardBorder), colorTextBack, fontSmall);
|
pixmapKeyboard->DrawText(cPoint(smsKeysX, smsKeysY), smsKeys, theme.Color(clrRecMenuKeyboardBorder), theme.Color(clrRecMenuKeyboardBack), fontSmall);
|
||||||
delete[] smsKeys;
|
delete[] smsKeys;
|
||||||
}
|
}
|
||||||
if (drawIcon) {
|
if (drawIcon) {
|
||||||
|
@ -124,12 +124,15 @@ private:
|
|||||||
bool halfWidth;
|
bool halfWidth;
|
||||||
bool alignLeft;
|
bool alignLeft;
|
||||||
const cFont *fontButtons;
|
const cFont *fontButtons;
|
||||||
|
cPixmap *pixmapText;
|
||||||
public:
|
public:
|
||||||
cRecMenuItemButton(const char *text, eRecMenuState action, bool active, bool halfWidth = false, bool alignLeft = false, bool largeFont = false);
|
cRecMenuItemButton(const char *text, eRecMenuState action, bool active, bool halfWidth = false, bool alignLeft = false, bool largeFont = false);
|
||||||
virtual ~cRecMenuItemButton(void);
|
virtual ~cRecMenuItemButton(void);
|
||||||
int GetWidth(void);
|
int GetWidth(void);
|
||||||
void SetPixmaps(void);
|
void SetPixmaps(void);
|
||||||
void Draw(void);
|
void Draw(void);
|
||||||
|
void Hide(void);
|
||||||
|
void Show(void);
|
||||||
cString GetStringValue(void) { return text; };
|
cString GetStringValue(void) { return text; };
|
||||||
eRecMenuState ProcessKey(eKeys Key);
|
eRecMenuState ProcessKey(eKeys Key);
|
||||||
};
|
};
|
||||||
|
@ -38,7 +38,7 @@ clrRecMenuDayActive = FF00FF00
|
|||||||
clrRecMenuDayInactive = FFFF0000
|
clrRecMenuDayInactive = FFFF0000
|
||||||
clrRecMenuDayHighlight = 44FFFFFF
|
clrRecMenuDayHighlight = 44FFFFFF
|
||||||
clrRecMenuTextBack = FF000000
|
clrRecMenuTextBack = FF000000
|
||||||
clrRecMenuTextActiveBack = FF404749
|
clrRecMenuTextActiveBack = FF939376
|
||||||
clrRecMenuKeyboardBack = FF000000
|
clrRecMenuKeyboardBack = FF000000
|
||||||
clrRecMenuKeyboardBorder = FFFFFFFF
|
clrRecMenuKeyboardBorder = FFFFFFFF
|
||||||
clrRecMenuKeyboardHigh = 40BB0000
|
clrRecMenuKeyboardHigh = 40BB0000
|
||||||
|
@ -658,7 +658,7 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
|
|||||||
delete detailView;
|
delete detailView;
|
||||||
detailView = NULL;
|
detailView = NULL;
|
||||||
detailViewActive = false;
|
detailViewActive = false;
|
||||||
processKeyBlue();
|
state = processKeyBlue();
|
||||||
} else {
|
} else {
|
||||||
state = detailView->ProcessKey(Key);
|
state = detailView->ProcessKey(Key);
|
||||||
if (state == osEnd) {
|
if (state == osEnd) {
|
||||||
|
Loading…
Reference in New Issue
Block a user