Kleine Anmerkung nebenbei in Punkto Design, weils gerade genannt wurde.
Die Schrift wird nicht korrekt abgebildet. Ist übrigens nicht nur bei streaminfo so. Das fällt so garicht groß auf, aber wenn sich jemand mal ein "etwas anderes" Theme für Neutrino einstellt, sieht das Kagge aus.
Damit Ihr wisst was ich meine.
Das Gleiche Problem gibts in der imageinfo.cpp und in der menu.cpp sinds die Menütrenner, dies zerhaut!
geschrieben habe, ist mir das erst richtig aufgefallen.
Mit dem diff müsste das behoben werden. Wäre toll wenn man das mit fixen könnte. Bei mir klappts jedenfalls prima. Der Diff ist von gestern, sollte eigentlich noch passen. Ansonsten nur das nehmen was gebraucht wird, da noch einige andere Änderungen drin sind.
Code: Alles auswählen
Index: src/gui/streaminfo2.cpp
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/gui/streaminfo2.cpp,v
retrieving revision 1.18
diff -u -r1.18 streaminfo2.cpp
--- a/src/gui/streaminfo2.cpp 18 Jan 2007 09:35:52 -0000 1.18
+++ b/src/gui/streaminfo2.cpp 22 Jan 2007 11:20:36 -0000
@@ -389,7 +389,7 @@
ypos += iheight;
sprintf((char*) buf, "%s: %5llu.%03llu kbit/s", g_Locale->getText(LOCALE_STREAMINFO_BITRATE), bitrate / 1000ULL, bitrate % 1000ULL);
frameBuffer->paintBoxRel(xpos, ypos-iheight+1, 350, iheight-1, COL_MENUHEAD_PLUS_0);
- g_Font[font_info]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_info]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
}
int CStreamInfo2::doSignalStrengthLoop ()
@@ -463,7 +463,7 @@
int y1;
int xd = w/4;
- g_Font[font_info]->RenderString(x, y+iheight, width-10, g_Locale->getText(LOCALE_STREAMINFO_SIGNAL), COL_MENUCONTENT, 0, true);
+ g_Font[font_info]->RenderString(x, y+iheight, width-10, g_Locale->getText(LOCALE_STREAMINFO_SIGNAL), COL_MENUHEAD, 0, true);
sigBox_x = x;
sigBox_y = y+iheight;
@@ -474,16 +474,16 @@
y1 = y + h;
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RED, x+2+xd*0 , y1- 20 );
- g_Font[font_small]->RenderString(x+25+xd*0 , y1, 50, "BER", COL_MENUCONTENT, 0, true);
+ g_Font[font_small]->RenderString(x+25+xd*0 , y1, 50, "BER", COL_MENUHEAD, 0, true);
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_BLUE, x+2+xd*1 , y1- 20 );
- g_Font[font_small]->RenderString(x+25+xd*1, y1, 50, "SNR", COL_MENUCONTENT, 0, true);
+ g_Font[font_small]->RenderString(x+25+xd*1, y1, 50, "SNR", COL_MENUHEAD, 0, true);
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, x+2+xd*2 , y1- 20 );
- g_Font[font_small]->RenderString(x+25+xd*2,y1, 50, "SIG", COL_MENUCONTENT, 0, true);
+ g_Font[font_small]->RenderString(x+25+xd*2,y1, 50, "SIG", COL_MENUHEAD, 0, true);
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_YELLOW, x+2+xd*3 , y1- 20 );
- g_Font[font_small]->RenderString(x+25+xd*3,y1, 50, "Bitrate", COL_MENUCONTENT, 0, true);
+ g_Font[font_small]->RenderString(x+25+xd*3,y1, 50, "Bitrate", COL_MENUHEAD, 0, true);
sig_text_y = y1 - iheight;
sig_text_ber_x = x+05+xd*0;
@@ -563,7 +563,7 @@
frameBuffer->paintBoxRel(x, y-iheight+1, 60, iheight-1, COL_MENUHEAD_PLUS_0);
sprintf(str,"%6lu",value);
- g_Font[font_small]->RenderString(x, y, 60, str, COL_MENUCONTENT, 0, true);
+ g_Font[font_small]->RenderString(x, y, 60, str, COL_MENUHEAD, 0, true);
}
void CStreamInfo2::paint(int mode)
@@ -639,12 +639,12 @@
ypos+= iheight;
sprintf((char*) buf, "%s: %dx%d", g_Locale->getText(LOCALE_STREAMINFO_RESOLUTION), (int)bitInfo[0], (int)bitInfo[1] );
- g_Font[font_info]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_info]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
ypos += iheight;
// sprintf((char*) buf, "%s: %d bits/sec", g_Locale->getText(LOCALE_STREAMINFO_BITRATE), (int)bitInfo[4]*50);
-// g_Font[font_info]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+// g_Font[font_info]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
ypos += iheight;
@@ -662,7 +662,7 @@
default:
strncpy(buf, g_Locale->getText(LOCALE_STREAMINFO_ARATIO_UNKNOWN), sizeof(buf));
}
- g_Font[font_info]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_info]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
@@ -678,7 +678,7 @@
default:
strncpy(buf, g_Locale->getText(LOCALE_STREAMINFO_FRAMERATE_UNKNOWN), sizeof(buf));
}
- g_Font[font_info]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_info]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
@@ -701,7 +701,7 @@
layernames[layer],
copy?"c":"");
}
- g_Font[font_info]->RenderString(xpos, ypos+ iheight, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_info]->RenderString(xpos, ypos+ iheight, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
ypos+= iheight+ 10;
CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo();
@@ -709,29 +709,29 @@
//onid
ypos+= iheight;
sprintf((char*) buf, "%s: 0x%04x", "ONid", si.onid);
- g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
//sid
ypos+= sheight;
sprintf((char*) buf, "%s: 0x%04x", "Sid", si.sid);
- g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
//tsid
ypos+= sheight;
sprintf((char*) buf, "%s: 0x%04x", "TSid", si.tsid);
- g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
//tsfrequenz
ypos+= sheight;
int written = sprintf((char*) buf, "%s: %d.%d MHz", "Freq", si.tsfrequency/1000, si.tsfrequency%1000);
if (si.polarisation != 2) /* only satellite has polarisation */
sprintf((char*) buf+written, " (%c)", (si.polarisation == HORIZONTAL) ? 'h' : 'v');
- g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
//pmtpid
ypos+= sheight;
sprintf((char*) buf, "%s: 0x%04x", "PMTpid", si.pmtpid);
- g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
//vpid
ypos+= sheight;
@@ -739,7 +739,7 @@
sprintf((char*) buf, "%s: %s", "Vpid", g_Locale->getText(LOCALE_STREAMINFO_NOT_AVAILABLE));
else
sprintf((char*) buf, "%s: 0x%04x", "Vpid", g_RemoteControl->current_PIDs.PIDs.vpid );
- g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
//apid
ypos+= sheight;
@@ -761,19 +761,19 @@
strcat((char*) buf, buf2);
}
}
- g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_small]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
//vtxtpid
if ( g_RemoteControl->current_PIDs.PIDs.vtxtpid == 0 )
sprintf((char*) buf, "%s: %s", "VTXTpid", g_Locale->getText(LOCALE_STREAMINFO_NOT_AVAILABLE));
else
sprintf((char*) buf, "%s: 0x%04x", "VTXTpid", g_RemoteControl->current_PIDs.PIDs.vtxtpid );
- g_Font[font_small]->RenderString(xpos, ypos+ iheight, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
- ypos+= sheight+ 10;
+ g_Font[font_small]->RenderString(xpos, ypos+ iheight, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
//satellite
+ ypos+= sheight+ 40;
sprintf((char*) buf, "Provider / Sat: %s",CNeutrinoApp::getInstance()->getScanSettings().satOfDiseqc(si.diseqc));
- g_Font[font_info]->RenderString(xpos, ypos+ iheight, width-10, buf, COL_MENUCONTENT, 0, true); // UTF-8
+ g_Font[font_info]->RenderString(xpos, ypos+ iheight, width-10, buf, COL_MENUHEAD, 0, true); // UTF-8
}
int CStreamInfo2Handler::exec(CMenuTarget* parent, const std::string &actionkey)
@@ -788,4 +788,3 @@
delete e;
return res;
}
-
Index: src/gui/imageinfo.cpp
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/gui/imageinfo.cpp,v
retrieving revision 1.8
diff -u -r1.8 imageinfo.cpp
--- a/src/gui/imageinfo.cpp 2 Apr 2006 12:21:19 -0000 1.8
+++ b/src/gui/imageinfo.cpp 22 Jan 2007 11:20:22 -0000
@@ -28,6 +28,8 @@
#include <gui/imageinfo.h>
+#include <cstring>
+
#include <global.h>
#include <neutrino.h>
@@ -122,7 +124,7 @@
{
char buf[100];
sprintf((char*) buf, "%s", text);
- g_Font[font]->RenderString(xpos, ypos, width-10, buf, COL_MENUCONTENT, 0, true);
+ g_Font[font]->RenderString(xpos, ypos, width-10, buf, COL_MENUHEAD, 0, true);
}
void CImageInfo::paint()
@@ -130,6 +132,7 @@
const char * head_string;
char releaseCycle[25] = "";
char imagedate[18] = "";
+ char imagetype[18] = "";
int xpos = x+10;
ypos = y+5;
@@ -147,75 +150,94 @@
CConfigFile config('\t');
config.loadConfig("/.version");
- const char * homepage = config.getString("homepage", "n/a").c_str();
- const char * creator = config.getString("creator", "n/a").c_str();
- const char * imagename = config.getString("imagename", "self compiled").c_str();
- const char * version = config.getString("version", "????????????????").c_str();
-
- static CFlashVersionInfo versionInfo(version);
-
- sprintf((char*) releaseCycle, "%s (%s)", versionInfo.getReleaseCycle() ,versionInfo.getType());
+
+ const char * homepage = config.getString("homepage", "n/a").c_str();
+ const char * creator = config.getString("creator", "n/a").c_str();
+ const char * imagename = config.getString("imagename", "self compiled").c_str();
+ const char * version = config.getString("version", "n/a").c_str();
+ const char * subversion = config.getString("subversion", "n/a").c_str();
+ const char * cvstime = config.getString("cvs", "n/a").c_str();
+ const char * distribution;
+
+
+ static CFlashVersionInfo versionInfo(version);
+
+ sprintf((char*) releaseCycle, "%s", versionInfo.getReleaseCycle());
sprintf((char*) imagedate, "%s %s", versionInfo.getDate(), versionInfo.getTime());
-
+ sprintf((char*) imagetype, "%s", versionInfo.getType());
+ sprintf((char*) distribution, "%s V.%s", imagename, subversion);
+
ypos += iheight;
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_IMAGE));
- paintLine(xpos+110, font_info, imagename);
-
- ypos += iheight;
- paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_DATE));
- paintLine(xpos+110, font_info, imagedate);
-
+ paintLine(xpos+165, font_info, distribution);
+
+ //~ ypos += iheight;
+ //~ paintLine(xpos , font_info, "Distribution-Ver.");
+ //~ paintLine(xpos+165, font_info, subversion);
+
ypos += iheight;
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_VERSION));
- paintLine(xpos+110, font_info, releaseCycle);
+ paintLine(xpos+165, font_info, releaseCycle);
+
+ ypos += iheight;
+ paintLine(xpos , font_info, "Image-Type:");
+ paintLine(xpos+165, font_info, imagetype);
+
+ ypos += iheight;
+ paintLine(xpos , font_info, "CVS-Level:");
+ paintLine(xpos+165, font_info, cvstime);
ypos += iheight;
+ paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_DATE));
+ paintLine(xpos+165, font_info, imagedate);
+
+ ypos += iheight;
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_CREATOR));
- paintLine(xpos+110, font_info, creator);
+ paintLine(xpos+165, font_info, creator);
- ypos += iheight+10;
+ ypos += iheight;
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_HOMEPAGE));
- paintLine(xpos+110, font_info, homepage);
+ paintLine(xpos+165, font_info, homepage);
ypos += iheight;
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_DOKUMENTATION));
- paintLine(xpos+110, font_info, "http://wiki.tuxbox.org");
+ paintLine(xpos+165, font_info, "http://wiki.godofgta.de");
ypos += iheight;
paintLine(xpos , font_info, g_Locale->getText(LOCALE_IMAGEINFO_FORUM));
- paintLine(xpos+110, font_info, "http://forum.tuxbox.org");
+ paintLine(xpos+165, font_info, "http://forum.tuxbox.org");
- ypos += iheight+10;
+ ypos += iheight;
paintLine(xpos, font_info,g_Locale->getText(LOCALE_IMAGEINFO_LICENSE));
- paintLine(xpos+110, font_small, "This program is free software; you can redistribute it and/or modify");
+ paintLine(xpos+90, font_small, "This program is free software; you can redistribute it and/or modify");
ypos+= sheight;
- paintLine(xpos+110, font_small, "it under the terms of the GNU General Public License as published by");
+ paintLine(xpos+90, font_small, "it under the terms of the GNU General Public License as published by");
ypos+= sheight;
- paintLine(xpos+110, font_small, "the Free Software Foundation; either version 2 of the License, or");
+ paintLine(xpos+90, font_small, "the Free Software Foundation; either version 2 of the License, or");
ypos+= sheight;
- paintLine(xpos+110, font_small, "(at your option) any later version.");
+ paintLine(xpos+90, font_small, "(at your option) any later version.");
- ypos+= sheight+10;
- paintLine(xpos+110, font_small, "This program is distributed in the hope that it will be useful,");
+ ypos+= sheight;
+ paintLine(xpos+90, font_small, "This program is distributed in the hope that it will be useful,");
ypos+= sheight;
- paintLine(xpos+110, font_small, "but WITHOUT ANY WARRANTY; without even the implied warranty of");
+ paintLine(xpos+90, font_small, "but WITHOUT ANY WARRANTY; without even the implied warranty of");
ypos+= sheight;
- paintLine(xpos+110, font_small, "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.");
+ paintLine(xpos+90, font_small, "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.");
ypos+= sheight;
- paintLine(xpos+110, font_small, "See the GNU General Public License for more details.");
+ paintLine(xpos+90, font_small, "See the GNU General Public License for more details.");
- ypos+= sheight+10;
- paintLine(xpos+110, font_small, "You should have received a copy of the GNU General Public License");
+ ypos+= sheight;
+ paintLine(xpos+90, font_small, "You should have received a copy of the GNU General Public License");
ypos+= sheight;
- paintLine(xpos+110, font_small, "along with this program; if not, write to the Free Software");
+ paintLine(xpos+90, font_small, "along with this program; if not, write to the Free Software");
ypos+= sheight;
- paintLine(xpos+110, font_small, "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.");
+ paintLine(xpos+90, font_small, "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.");
}
Index: src/gui/widget/menue.cpp
===================================================================
RCS file: /cvs/tuxbox/apps/tuxbox/neutrino/src/gui/widget/menue.cpp,v
retrieving revision 1.136
diff -u -r1.136 menue.cpp
--- a/src/gui/widget/menue.cpp 7 Jan 2007 23:25:01 -0000 1.136
+++ b/src/gui/widget/menue.cpp 22 Jan 2007 11:20:38 -0000
@@ -949,7 +950,7 @@
frameBuffer->paintBoxRel(stringstartposX-5, y, stringwidth+10, height, COL_MENUCONTENT_PLUS_0);
- g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposX, y+height,dx- (stringstartposX- x) , l_text, COL_MENUCONTENTINACTIVE, 0, true); // UTF-8
+ g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposX, y+height,dx- (stringstartposX- x) , l_text, COL_MENUCONTENT, 0, true); // UTF-8
if (selected)
{