blob: 86663807eff6665e839f5b139beea41e1c7f7fcf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
#include "fontmanager.h"
#include "geometrymanager.h"
#include "config.h"
cFontManager *fontManager;
cFontManager::cFontManager() {
// Menu fonts
menuHeader = CreateFont(geoManager->menuHeaderHeight / 2 + config.GetValue("fontHeader"));
menuDate = CreateFont(geoManager->menuHeaderHeight / 2 + config.GetValue("fontDate"));
menuItemLarge = CreateFont(geoManager->menuItemHeightMain/3 + 4 + config.GetValue("fontMenuitemLarge"));
menuItemSchedule = CreateFont(geoManager->menuItemHeightSchedule / 4 + 5 + config.GetValue("fontMenuitemSchedule"));
menuItemScheduleSmall = CreateFont(geoManager->menuItemHeightSchedule / 4 - 5 + config.GetValue("fontMenuitemScheduleSmall"));
menuItemChannel = CreateFont(geoManager->menuItemHeightSchedule / 3 + config.GetValue("fontMenuitemChannel"));
menuItemChannelSmall = CreateFont(geoManager->menuItemHeightSchedule / 5 - 2 + config.GetValue("fontMenuitemChannelSmall"));
menuItemRecordings = CreateFont(geoManager->menuItemHeightRecordings / 2 - 14 + config.GetValue("fontMenuitemRecordings"));
menuItemRecordingsSmall = CreateFont(geoManager->menuItemHeightRecordings / 4 - 3 + config.GetValue("fontMenuitemRecordingsSmall"));
menuItemTimers = CreateFont(geoManager->menuItemHeightSchedule / 3 + config.GetValue("fontMenuitemTimers"));
menuItemTimersSmall = CreateFont(geoManager->menuItemHeightSchedule / 4 - 3 + config.GetValue("fontMenuitemTimersSmall"));
menuItemDefault = CreateFont(geoManager->menuItemHeightDefault * 2 / 3 + config.GetValue("fontMenuitemDefault"));
menuDiskUsage = CreateFont(geoManager->menuDiskUsageHeight/6 - 2 + config.GetValue("fontDiskUsage"));
menuDiskUsagePercent = CreateFont(geoManager->menuDiskUsageHeight/5 - 4 + config.GetValue("fontDiskUsagePercent"));
menuTimersHead = CreateFont((geoManager->menuContentHeight - 3*geoManager->menuSpace - geoManager->menuDiskUsageHeight) / 25 + config.GetValue("fontTimersHead"));
menuTimers = CreateFont((geoManager->menuContentHeight - 3*geoManager->menuSpace - geoManager->menuDiskUsageHeight) / 25 - 6 + config.GetValue("fontTimers"));
menuButtons = CreateFont(geoManager->menuButtonHeight*0.8 + config.GetValue("fontButtons"));
menuMessage = CreateFont(geoManager->messageHeight / 3 + config.GetValue("fontMessageMenu"));
menuEPGInfoWindow = CreateFont(geoManager->menuContentHeight / 30 + config.GetValue("fontEPGInfoWindow"));
menuEPGInfoWindowLarge = CreateFont(geoManager->menuContentHeight / 20 + config.GetValue("fontEPGInfoWindowLarge"));
// Channel fonts
channelHeader = CreateFont(geoManager->channelHeaderHeight - 8 + config.GetValue("fontChannelHeaderSize"));
channelDate = CreateFont(geoManager->channelHeaderHeight/2 + config.GetValue("fontChannelDateSize"));
channelEPG = CreateFont(geoManager->channelEpgInfoLineHeight + config.GetValue("fontEPGSize"));
channelEPGSmall = CreateFont(geoManager->channelEpgInfoLineHeight - 6 + config.GetValue("fontEPGSmallSize"));
channelSourceInfo = CreateFont(geoManager->channelFooterHeight/2 + config.GetValue("fontChannelSourceInfoSize"));;
channelChannelGroup = CreateFont(geoManager->channelEpgInfoHeight/3 + config.GetValue("fontChannelGroupSize"));
channelChannelGroupSmall = CreateFont(geoManager->channelEpgInfoHeight/3 - 5 + config.GetValue("fontChannelGroupSmallSize"));
// Replay fonts
replayHeader = CreateFont(geoManager->replayHeaderHeight - 8 + config.GetValue("fontReplayHeader"));
replayText = CreateFont(geoManager->replayCurrentHeight);
//Message fonts
messageText = CreateFont(geoManager->messageHeight / 4 + 15 + config.GetValue("fontMessage"));
// Track fonts
trackText = CreateFont(geoManager->menuItemHeightTracks/3 + config.GetValue("fontTracks"));
trackHeader = CreateFont(geoManager->menuItemHeightTracks/2 + config.GetValue("fontTracksHeader"));
// Volume fonts
volumeText = CreateFont(geoManager->volumeLabelHeight - 6 + config.GetValue("fontVolume"));
}
cFontManager::~cFontManager() {
// Menu fonts
delete menuHeader;
delete menuDate;
delete menuItemLarge;
delete menuItemSchedule;
delete menuItemScheduleSmall;
delete menuItemChannel;
delete menuItemChannelSmall;
delete menuItemRecordings;
delete menuItemRecordingsSmall;
delete menuItemTimers;
delete menuItemTimersSmall;
delete menuItemDefault;
delete menuDiskUsage;
delete menuDiskUsagePercent;
delete menuTimers;
delete menuTimersHead;
delete menuButtons;
delete menuMessage;
delete menuEPGInfoWindow;
delete menuEPGInfoWindowLarge;
// Channel fonts
delete channelHeader;
delete channelDate;
delete channelEPG;
delete channelEPGSmall;
delete channelSourceInfo;
delete channelChannelGroup;
delete channelChannelGroupSmall;
// Replay fonts
delete replayHeader;
delete replayText;
//Message fonts
delete messageText;
// Track fonts
delete trackText;
delete trackHeader;
// Volume fonts
delete volumeText;
}
cFont *cFontManager::CreateFont(int size) {
return cFont::CreateFont(config.fontName, size);
}
|