moviebrowser: specify widths and height in percent of screen size

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1370 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
seife
2011-04-01 17:02:35 +00:00
parent 6478f625d3
commit 2b774400bd
13 changed files with 103 additions and 71 deletions

View File

@@ -820,11 +820,11 @@ moviebrowser.book_position Position:
moviebrowser.book_type Sprung (<0 zurück, >0 vor): moviebrowser.book_type Sprung (<0 zurück, >0 vor):
moviebrowser.book_type_backward Wiederholung moviebrowser.book_type_backward Wiederholung
moviebrowser.book_type_forward Überspringen moviebrowser.book_type_forward Überspringen
moviebrowser.browser_frame_high Anzeigehöhe oberes Fenster [Punkte] moviebrowser.browser_frame_high Anzeigehöhe oberes Fenster [%]
moviebrowser.browser_row_head Spalten Einstellungen moviebrowser.browser_row_head Spalten Einstellungen
moviebrowser.browser_row_item Spalteninfo moviebrowser.browser_row_item Spalteninfo
moviebrowser.browser_row_nr Anzahl Spalten moviebrowser.browser_row_nr Anzahl Spalten
moviebrowser.browser_row_width Spaltenbreite [Punkte] moviebrowser.browser_row_width Spaltenbreite [% der Gesamtbreite]
moviebrowser.dir Pfad moviebrowser.dir Pfad
moviebrowser.dir_head Zusätzliche Verzeichnisse moviebrowser.dir_head Zusätzliche Verzeichnisse
moviebrowser.edit_book Bookmark Ändern moviebrowser.edit_book Bookmark Ändern

View File

@@ -1275,7 +1275,7 @@ moviebrowser.load_default Laadt standaard instellingen
moviebrowser.browser_row_head Kolom instellingen moviebrowser.browser_row_head Kolom instellingen
moviebrowser.browser_row_nr Aantal kolommen moviebrowser.browser_row_nr Aantal kolommen
moviebrowser.browser_row_item Kolom item moviebrowser.browser_row_item Kolom item
moviebrowser.browser_row_width Kolom breedte moviebrowser.browser_row_width Kolom breedte [%]
moviebrowser.reload_at_start Opnieuw inladen van film info na starten moviebrowser.reload_at_start Opnieuw inladen van film info na starten
moviebrowser.remount_at_start Hermount na opstarten moviebrowser.remount_at_start Hermount na opstarten
moviebrowser.dir_head Additional paths moviebrowser.dir_head Additional paths
@@ -1286,7 +1286,7 @@ moviebrowser.use_movie_dir Gebruik movie directory
moviebrowser.hide_series Verberg series moviebrowser.hide_series Verberg series
moviebrowser.last_record_max_items Aantal regels van laatste opname moviebrowser.last_record_max_items Aantal regels van laatste opname
moviebrowser.last_play_max_items Aantal regels van laatst gespeelde video moviebrowser.last_play_max_items Aantal regels van laatst gespeelde video
moviebrowser.browser_frame_high Browser hoogte [Pixel] moviebrowser.browser_frame_high Browser hoogte [%]
extra.auto_timeshift Auto-record, sec (0 = uit) extra.auto_timeshift Auto-record, sec (0 = uit)
extra.auto_delete Automatiisch wissen extra.auto_delete Automatiisch wissen
extra.auto_to_record Verplaats timeshift naar opnames extra.auto_to_record Verplaats timeshift naar opnames

View File

@@ -820,11 +820,11 @@ moviebrowser.book_position Position:
moviebrowser.book_type Jump (<0 back , >0 for): moviebrowser.book_type Jump (<0 back , >0 for):
moviebrowser.book_type_backward Repeat moviebrowser.book_type_backward Repeat
moviebrowser.book_type_forward jump over moviebrowser.book_type_forward jump over
moviebrowser.browser_frame_high Browser hight [Pixel] moviebrowser.browser_frame_high Browser hight [%]
moviebrowser.browser_row_head Row settings moviebrowser.browser_row_head Row settings
moviebrowser.browser_row_item Row item moviebrowser.browser_row_item Row item
moviebrowser.browser_row_nr Number of rows moviebrowser.browser_row_nr Number of rows
moviebrowser.browser_row_width Row width moviebrowser.browser_row_width Row width (% of screenwidth)
moviebrowser.dir Path moviebrowser.dir Path
moviebrowser.dir_head Additional paths moviebrowser.dir_head Additional paths
moviebrowser.edit_book Bookmark change moviebrowser.edit_book Bookmark change

View File

@@ -641,11 +641,11 @@ moviebrowser.book_position Position:
moviebrowser.book_type Jump (<0 back , >0 for): moviebrowser.book_type Jump (<0 back , >0 for):
moviebrowser.book_type_backward Repeat moviebrowser.book_type_backward Repeat
moviebrowser.book_type_forward jump over moviebrowser.book_type_forward jump over
moviebrowser.browser_frame_high Browser hight [Pixel] moviebrowser.browser_frame_high Browser hight [%]
moviebrowser.browser_row_head Row settings moviebrowser.browser_row_head Row settings
moviebrowser.browser_row_item Row item moviebrowser.browser_row_item Row item
moviebrowser.browser_row_nr Number of rows moviebrowser.browser_row_nr Number of rows
moviebrowser.browser_row_width Row width moviebrowser.browser_row_width Row width [%]
moviebrowser.dir Path moviebrowser.dir Path
moviebrowser.dir_head Additional paths moviebrowser.dir_head Additional paths
moviebrowser.edit_book Bookmark change moviebrowser.edit_book Bookmark change

View File

@@ -800,11 +800,11 @@ moviebrowser.book_position Pozíció:
moviebrowser.book_type Ugrás (<0 back , >0 for): moviebrowser.book_type Ugrás (<0 back , >0 for):
moviebrowser.book_type_backward Ismétlés moviebrowser.book_type_backward Ismétlés
moviebrowser.book_type_forward jump over moviebrowser.book_type_forward jump over
moviebrowser.browser_frame_high Böngésző magassága (px) moviebrowser.browser_frame_high Böngésző magassága (%)
moviebrowser.browser_row_head Sor beállítások moviebrowser.browser_row_head Sor beállítások
moviebrowser.browser_row_item Elem moviebrowser.browser_row_item Elem
moviebrowser.browser_row_nr Sorok száma moviebrowser.browser_row_nr Sorok száma
moviebrowser.browser_row_width Szélesség moviebrowser.browser_row_width Szélesség [%]
moviebrowser.dir Útvonal moviebrowser.dir Útvonal
moviebrowser.dir_head További útvonalak moviebrowser.dir_head További útvonalak
moviebrowser.edit_book Bookmark change moviebrowser.edit_book Bookmark change

View File

@@ -742,11 +742,11 @@ moviebrowser.book_position Posizione:
moviebrowser.book_type Salta (<0 indietro , >0 avanti): moviebrowser.book_type Salta (<0 indietro , >0 avanti):
moviebrowser.book_type_backward Ripeti moviebrowser.book_type_backward Ripeti
moviebrowser.book_type_forward salta oltre moviebrowser.book_type_forward salta oltre
moviebrowser.browser_frame_high Browser altezza [Pixel] moviebrowser.browser_frame_high Browser altezza [%]
moviebrowser.browser_row_head Impostazioni righe moviebrowser.browser_row_head Impostazioni righe
moviebrowser.browser_row_item Indice riga moviebrowser.browser_row_item Indice riga
moviebrowser.browser_row_nr Numero di righe moviebrowser.browser_row_nr Numero di righe
moviebrowser.browser_row_width Larghezza riga moviebrowser.browser_row_width Larghezza riga [%]
moviebrowser.dir Path moviebrowser.dir Path
moviebrowser.dir_head Additional paths moviebrowser.dir_head Additional paths
moviebrowser.edit_book Bookmark cambia moviebrowser.edit_book Bookmark cambia

View File

@@ -795,11 +795,11 @@ moviebrowser.book_position Pozycja:
moviebrowser.book_type Skocz (<0 w tył , >0 do przodu): moviebrowser.book_type Skocz (<0 w tył , >0 do przodu):
moviebrowser.book_type_backward Powtórz moviebrowser.book_type_backward Powtórz
moviebrowser.book_type_forward skocz poza moviebrowser.book_type_forward skocz poza
moviebrowser.browser_frame_high Wysokość przeglądarki [Piksele] moviebrowser.browser_frame_high Wysokość przeglądarki [%]
moviebrowser.browser_row_head Ustawienia wierszy moviebrowser.browser_row_head Ustawienia wierszy
moviebrowser.browser_row_item Ustęp wiersza moviebrowser.browser_row_item Ustęp wiersza
moviebrowser.browser_row_nr Ilość wierszy moviebrowser.browser_row_nr Ilość wierszy
moviebrowser.browser_row_width Szerokośc wiersza moviebrowser.browser_row_width Szerokośc wiersza [%]
moviebrowser.dir Ścieżka moviebrowser.dir Ścieżka
moviebrowser.dir_head Dodatkowe ściezki moviebrowser.dir_head Dodatkowe ściezki
moviebrowser.edit_book Zmień zakładkę moviebrowser.edit_book Zmień zakładkę

View File

@@ -696,11 +696,11 @@ moviebrowser.book_position Position:
moviebrowser.book_type Jump (<0 back , >0 for): moviebrowser.book_type Jump (<0 back , >0 for):
moviebrowser.book_type_backward Repeat moviebrowser.book_type_backward Repeat
moviebrowser.book_type_forward jump over moviebrowser.book_type_forward jump over
moviebrowser.browser_frame_high Browser hight [Pixel] moviebrowser.browser_frame_high Browser hight [%]
moviebrowser.browser_row_head Row settings moviebrowser.browser_row_head Row settings
moviebrowser.browser_row_item Row item moviebrowser.browser_row_item Row item
moviebrowser.browser_row_nr Number of rows moviebrowser.browser_row_nr Number of rows
moviebrowser.browser_row_width Row width moviebrowser.browser_row_width Row width [%]
moviebrowser.dir Path moviebrowser.dir Path
moviebrowser.dir_head Additional paths moviebrowser.dir_head Additional paths
moviebrowser.edit_book Bookmark change moviebrowser.edit_book Bookmark change

View File

@@ -645,11 +645,11 @@ moviebrowser.book_position Position:
moviebrowser.book_type Jump (<0 back , >0 for): moviebrowser.book_type Jump (<0 back , >0 for):
moviebrowser.book_type_backward Repeat moviebrowser.book_type_backward Repeat
moviebrowser.book_type_forward jump over moviebrowser.book_type_forward jump over
moviebrowser.browser_frame_high Browser hight [Pixel] moviebrowser.browser_frame_high Browser hight [%]
moviebrowser.browser_row_head Row settings moviebrowser.browser_row_head Row settings
moviebrowser.browser_row_item Row item moviebrowser.browser_row_item Row item
moviebrowser.browser_row_nr Number of rows moviebrowser.browser_row_nr Number of rows
moviebrowser.browser_row_width Row width moviebrowser.browser_row_width Row width [%]
moviebrowser.dir Path moviebrowser.dir Path
moviebrowser.dir_head Additional paths moviebrowser.dir_head Additional paths
moviebrowser.edit_book Bookmark change moviebrowser.edit_book Bookmark change

View File

@@ -789,11 +789,11 @@ moviebrowser.book_position Pozícia:
moviebrowser.book_type Skok (<0 vzad , >0 vpred): moviebrowser.book_type Skok (<0 vzad , >0 vpred):
moviebrowser.book_type_backward Opakovať moviebrowser.book_type_backward Opakovať
moviebrowser.book_type_forward Skok za moviebrowser.book_type_forward Skok za
moviebrowser.browser_frame_high Výška prehliadača [pixel] moviebrowser.browser_frame_high Výška prehliadača [%]
moviebrowser.browser_row_head Nastavenia riadku moviebrowser.browser_row_head Nastavenia riadku
moviebrowser.browser_row_item Položka stĺpca moviebrowser.browser_row_item Položka stĺpca
moviebrowser.browser_row_nr Počet stĺpcov moviebrowser.browser_row_nr Počet stĺpcov
moviebrowser.browser_row_width Šírka stĺpca moviebrowser.browser_row_width Šírka stĺpca [%]
moviebrowser.dir Adresár moviebrowser.dir Adresár
moviebrowser.dir_head Doplnkové adresáre moviebrowser.dir_head Doplnkové adresáre
moviebrowser.edit_book Zmeň záložku moviebrowser.edit_book Zmeň záložku

View File

@@ -173,27 +173,27 @@ const neutrino_locale_t m_localizedItemName[MB_INFO_MAX_NUMBER+1] =
NONEXISTANT_LOCALE NONEXISTANT_LOCALE
}; };
// default row size in pixel for any element /* default row size in percent for any element */
#define MB_ROW_WIDTH_FILENAME 150 #define MB_ROW_WIDTH_FILENAME 22
#define MB_ROW_WIDTH_FILEPATH 150 #define MB_ROW_WIDTH_FILEPATH 22
#define MB_ROW_WIDTH_TITLE 300 #define MB_ROW_WIDTH_TITLE 45
#define MB_ROW_WIDTH_SERIE 100 #define MB_ROW_WIDTH_SERIE 15
#define MB_ROW_WIDTH_INFO1 100 #define MB_ROW_WIDTH_INFO1 25
#define MB_ROW_WIDTH_MAJOR_GENRE 100 #define MB_ROW_WIDTH_MAJOR_GENRE 15
#define MB_ROW_WIDTH_MINOR_GENRE 30 #define MB_ROW_WIDTH_MINOR_GENRE 8
#define MB_ROW_WIDTH_INFO2 30 #define MB_ROW_WIDTH_INFO2 25
#define MB_ROW_WIDTH_PARENTAL_LOCKAGE 25 #define MB_ROW_WIDTH_PARENTAL_LOCKAGE 4
#define MB_ROW_WIDTH_CHANNEL 80 #define MB_ROW_WIDTH_CHANNEL 12
#define MB_ROW_WIDTH_BOOKMARK 50 #define MB_ROW_WIDTH_BOOKMARK 4
#define MB_ROW_WIDTH_QUALITY 25 #define MB_ROW_WIDTH_QUALITY 4
#define MB_ROW_WIDTH_PREVPLAYDATE 80 #define MB_ROW_WIDTH_PREVPLAYDATE 12
#define MB_ROW_WIDTH_RECORDDATE 80 #define MB_ROW_WIDTH_RECORDDATE 12
#define MB_ROW_WIDTH_PRODDATE 50 #define MB_ROW_WIDTH_PRODDATE 8
#define MB_ROW_WIDTH_COUNTRY 50 #define MB_ROW_WIDTH_COUNTRY 8
#define MB_ROW_WIDTH_GEOMETRIE 50 #define MB_ROW_WIDTH_GEOMETRIE 8
#define MB_ROW_WIDTH_AUDIO 50 #define MB_ROW_WIDTH_AUDIO 8
#define MB_ROW_WIDTH_LENGTH 40 #define MB_ROW_WIDTH_LENGTH 6
#define MB_ROW_WIDTH_SIZE 45 #define MB_ROW_WIDTH_SIZE 10
const int m_defaultRowWidth[MB_INFO_MAX_NUMBER+1] = const int m_defaultRowWidth[MB_INFO_MAX_NUMBER+1] =
{ {
@@ -407,6 +407,9 @@ void CMovieBrowser::fileInfoStale(void)
void CMovieBrowser::init(void) void CMovieBrowser::init(void)
{ {
bool reinit_rows = false;
int i;
//TRACE("[mb]->init\r\n"); //TRACE("[mb]->init\r\n");
initGlobalSettings(); initGlobalSettings();
loadSettings(&m_settings); loadSettings(&m_settings);
@@ -456,10 +459,27 @@ void CMovieBrowser::init(void)
if(m_settings.parentalLock >= MB_PARENTAL_LOCK_MAX_NUMBER) if(m_settings.parentalLock >= MB_PARENTAL_LOCK_MAX_NUMBER)
m_settings.parentalLock = MB_PARENTAL_LOCK_OFF; m_settings.parentalLock = MB_PARENTAL_LOCK_OFF;
/* convert from old pixel-based to new percent values */
if (m_settings.browserFrameHeight > 100)
m_settings.browserFrameHeight = 50;
if(m_settings.browserFrameHeight < MIN_BROWSER_FRAME_HEIGHT ) if(m_settings.browserFrameHeight < MIN_BROWSER_FRAME_HEIGHT )
m_settings.browserFrameHeight = MIN_BROWSER_FRAME_HEIGHT; m_settings.browserFrameHeight = MIN_BROWSER_FRAME_HEIGHT;
if(m_settings.browserFrameHeight > MAX_BROWSER_FRAME_HEIGHT) if(m_settings.browserFrameHeight > MAX_BROWSER_FRAME_HEIGHT)
m_settings.browserFrameHeight = MAX_BROWSER_FRAME_HEIGHT; m_settings.browserFrameHeight = MAX_BROWSER_FRAME_HEIGHT;
/* the old code had row widths in pixels, not percent. Check if we have
* an old configuration (one of the rows hopefully was larger than 100 pixels... */
for (i = 0; i < m_settings.browserRowNr; i++)
{
if (m_settings.browserRowWidth[i] > 100)
{
printf("[moviebrowser] old row config detected - converting...\n");
reinit_rows = true;
break;
}
}
/***** Browser List **************/ /***** Browser List **************/
if(m_settings.browserRowNr == 0) if(m_settings.browserRowNr == 0)
{ {
@@ -472,18 +492,23 @@ void CMovieBrowser::init(void)
m_settings.browserRowItem[3] = MB_INFO_SIZE; m_settings.browserRowItem[3] = MB_INFO_SIZE;
m_settings.browserRowItem[4] = MB_INFO_PARENTAL_LOCKAGE; m_settings.browserRowItem[4] = MB_INFO_PARENTAL_LOCKAGE;
m_settings.browserRowItem[5] = MB_INFO_QUALITY; m_settings.browserRowItem[5] = MB_INFO_QUALITY;
m_settings.browserRowWidth[0] = m_defaultRowWidth[m_settings.browserRowItem[0]]; //300; reinit_rows = true;
m_settings.browserRowWidth[1] = m_defaultRowWidth[m_settings.browserRowItem[1]]; //100; }
m_settings.browserRowWidth[2] = m_defaultRowWidth[m_settings.browserRowItem[2]]; //80;
m_settings.browserRowWidth[3] = m_defaultRowWidth[m_settings.browserRowItem[3]]; //50; if (reinit_rows)
m_settings.browserRowWidth[4] = m_defaultRowWidth[m_settings.browserRowItem[4]]; //30; {
m_settings.browserRowWidth[5] = m_defaultRowWidth[m_settings.browserRowItem[5]]; //30; for (i = 0; i < m_settings.browserRowNr; i++)
m_settings.browserRowWidth[i] = m_defaultRowWidth[m_settings.browserRowItem[i]];
} }
initFrames(); initFrames();
initRows(); initRows();
//initDevelopment(); //initDevelopment();
/* save settings here, because ::exec() will load them again... */
if (reinit_rows)
saveSettings(&m_settings);
refreshLastPlayList(); refreshLastPlayList();
refreshLastRecordList(); refreshLastRecordList();
refreshBrowserList(); refreshBrowserList();
@@ -541,7 +566,7 @@ void CMovieBrowser::initGlobalSettings(void)
} }
/***** Browser List **************/ /***** Browser List **************/
m_settings.browserFrameHeight = g_settings.screen_EndY - g_settings.screen_StartY - 20 - ((g_settings.screen_EndY - g_settings.screen_StartY - 20)>>1) - (INTER_FRAME_SPACE>>1); m_settings.browserFrameHeight = 50; /* percent */
m_settings.browserRowNr = 6; m_settings.browserRowNr = 6;
m_settings.browserRowItem[0] = MB_INFO_TITLE; m_settings.browserRowItem[0] = MB_INFO_TITLE;
@@ -587,8 +612,9 @@ void CMovieBrowser::initFrames(void)
m_cBoxFrameBrowserList.iX = m_cBoxFrame.iX; m_cBoxFrameBrowserList.iX = m_cBoxFrame.iX;
m_cBoxFrameBrowserList.iY = m_cBoxFrame.iY + m_cBoxFrameTitleRel.iHeight; m_cBoxFrameBrowserList.iY = m_cBoxFrame.iY + m_cBoxFrameTitleRel.iHeight;
m_cBoxFrameBrowserList.iWidth = m_cBoxFrame.iWidth; m_cBoxFrameBrowserList.iWidth = m_cBoxFrame.iWidth;
m_cBoxFrameBrowserList.iHeight = m_settings.browserFrameHeight; //m_cBoxFrame.iHeight - (m_cBoxFrame.iHeight>>1) - (INTER_FRAME_SPACE>>1); m_cBoxFrameBrowserList.iHeight = m_cBoxFrame.iHeight * m_settings.browserFrameHeight / 100;
fprintf(stderr, "m_cBoxFrame.iHeight %d m_cBoxFrameBrowserList.iHeight %d m_settings.browserFrameHeight %d\n",m_cBoxFrame.iHeight, m_cBoxFrameBrowserList.iHeight, m_settings.browserFrameHeight);
m_cBoxFrameFootRel.iX = 0; m_cBoxFrameFootRel.iX = 0;
m_cBoxFrameFootRel.iY = m_cBoxFrame.iHeight - m_pcFontFoot->getHeight(); m_cBoxFrameFootRel.iY = m_cBoxFrame.iHeight - m_pcFontFoot->getHeight();
m_cBoxFrameFootRel.iWidth = m_cBoxFrameBrowserList.iWidth; m_cBoxFrameFootRel.iWidth = m_cBoxFrameBrowserList.iWidth;
@@ -627,8 +653,10 @@ void CMovieBrowser::initRows(void)
m_settings.lastPlayRow[3] = MB_INFO_MAX_NUMBER; m_settings.lastPlayRow[3] = MB_INFO_MAX_NUMBER;
m_settings.lastPlayRow[4] = MB_INFO_MAX_NUMBER; m_settings.lastPlayRow[4] = MB_INFO_MAX_NUMBER;
m_settings.lastPlayRow[5] = MB_INFO_MAX_NUMBER; m_settings.lastPlayRow[5] = MB_INFO_MAX_NUMBER;
m_settings.lastPlayRowWidth[0] = 190; /* the "last played" / "last recorded" windows have only half the width, so
m_settings.lastPlayRowWidth[1] = m_defaultRowWidth[m_settings.lastPlayRow[1]]; multiply the relative width with 2 and add some fixed value for slack */
m_settings.lastPlayRowWidth[1] = m_defaultRowWidth[m_settings.lastPlayRow[1]] * 2 + 1;
m_settings.lastPlayRowWidth[0] = 100 - m_settings.lastPlayRowWidth[1];
m_settings.lastPlayRowWidth[2] = m_defaultRowWidth[m_settings.lastPlayRow[2]]; m_settings.lastPlayRowWidth[2] = m_defaultRowWidth[m_settings.lastPlayRow[2]];
m_settings.lastPlayRowWidth[3] = m_defaultRowWidth[m_settings.lastPlayRow[3]]; m_settings.lastPlayRowWidth[3] = m_defaultRowWidth[m_settings.lastPlayRow[3]];
m_settings.lastPlayRowWidth[4] = m_defaultRowWidth[m_settings.lastPlayRow[4]]; m_settings.lastPlayRowWidth[4] = m_defaultRowWidth[m_settings.lastPlayRow[4]];
@@ -642,8 +670,8 @@ void CMovieBrowser::initRows(void)
m_settings.lastRecordRow[3] = MB_INFO_MAX_NUMBER; m_settings.lastRecordRow[3] = MB_INFO_MAX_NUMBER;
m_settings.lastRecordRow[4] = MB_INFO_MAX_NUMBER; m_settings.lastRecordRow[4] = MB_INFO_MAX_NUMBER;
m_settings.lastRecordRow[5] = MB_INFO_MAX_NUMBER; m_settings.lastRecordRow[5] = MB_INFO_MAX_NUMBER;
m_settings.lastRecordRowWidth[0] = 190; m_settings.lastRecordRowWidth[1] = m_defaultRowWidth[m_settings.lastRecordRow[1]] * 2 + 1;
m_settings.lastRecordRowWidth[1] = m_defaultRowWidth[m_settings.lastRecordRow[1]]; m_settings.lastRecordRowWidth[0] = 100 - m_settings.lastRecordRowWidth[1];
m_settings.lastRecordRowWidth[2] = m_defaultRowWidth[m_settings.lastRecordRow[2]]; m_settings.lastRecordRowWidth[2] = m_defaultRowWidth[m_settings.lastRecordRow[2]];
m_settings.lastRecordRowWidth[3] = m_defaultRowWidth[m_settings.lastRecordRow[3]]; m_settings.lastRecordRowWidth[3] = m_defaultRowWidth[m_settings.lastRecordRow[3]];
m_settings.lastRecordRowWidth[4] = m_defaultRowWidth[m_settings.lastRecordRow[4]]; m_settings.lastRecordRowWidth[4] = m_defaultRowWidth[m_settings.lastRecordRow[4]];
@@ -711,7 +739,7 @@ bool CMovieBrowser::loadSettings(MB_SETTINGS* settings)
settings->storageDirUsed[i] = configfile.getInt32( cfg_key,false ); settings->storageDirUsed[i] = configfile.getInt32( cfg_key,false );
} }
/* these variables are used for the listframes */ /* these variables are used for the listframes */
settings->browserFrameHeight = configfile.getInt32("mb_browserFrameHeight", 250); settings->browserFrameHeight = configfile.getInt32("mb_browserFrameHeight", 50);
settings->browserRowNr = configfile.getInt32("mb_browserRowNr", 0); settings->browserRowNr = configfile.getInt32("mb_browserRowNr", 0);
for(int i = 0; i < MB_MAX_ROWS && i < settings->browserRowNr; i++) for(int i = 0; i < MB_MAX_ROWS && i < settings->browserRowNr; i++)
{ {
@@ -1254,7 +1282,7 @@ void CMovieBrowser::refreshFilterList(void)
m_FilterLines.rows = 1; m_FilterLines.rows = 1;
m_FilterLines.lineArray[0].clear(); m_FilterLines.lineArray[0].clear();
m_FilterLines.rowWidth[0] = 400; m_FilterLines.rowWidth[0] = 100;
m_FilterLines.lineHeader[0]= ""; m_FilterLines.lineHeader[0]= "";
if(m_vMovieInfo.size() <= 0) if(m_vMovieInfo.size() <= 0)
@@ -2921,7 +2949,7 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/)
/** optionsMenuBrowser **************************************************/ /** optionsMenuBrowser **************************************************/
CIntInput playMaxUserIntInput(LOCALE_MOVIEBROWSER_LAST_PLAY_MAX_ITEMS, (int&) m_settings.lastPlayMaxItems, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); CIntInput playMaxUserIntInput(LOCALE_MOVIEBROWSER_LAST_PLAY_MAX_ITEMS, (int&) m_settings.lastPlayMaxItems, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
CIntInput recMaxUserIntInput(LOCALE_MOVIEBROWSER_LAST_RECORD_MAX_ITEMS, (int&) m_settings.lastRecordMaxItems, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); CIntInput recMaxUserIntInput(LOCALE_MOVIEBROWSER_LAST_RECORD_MAX_ITEMS, (int&) m_settings.lastRecordMaxItems, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
CIntInput browserFrameUserIntInput(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, (int&) m_settings.browserFrameHeight, 4, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); CIntInput browserFrameUserIntInput(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, (int&) m_settings.browserFrameHeight, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
CIntInput browserRowNrIntInput(LOCALE_MOVIEBROWSER_BROWSER_ROW_NR, (int&) m_settings.browserRowNr, 1, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE); CIntInput browserRowNrIntInput(LOCALE_MOVIEBROWSER_BROWSER_ROW_NR, (int&) m_settings.browserRowNr, 1, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
CIntInput* browserRowWidthIntInput[MB_MAX_ROWS]; CIntInput* browserRowWidthIntInput[MB_MAX_ROWS];
for(i=0; i<MB_MAX_ROWS ;i++) for(i=0; i<MB_MAX_ROWS ;i++)
@@ -2996,10 +3024,10 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/)
m_settings.browserRowNr = 1; m_settings.browserRowNr = 1;
for(i = 0; i < m_settings.browserRowNr; i++) for(i = 0; i < m_settings.browserRowNr; i++)
{ {
if( m_settings.browserRowWidth[i] >500) if( m_settings.browserRowWidth[i] > 100)
m_settings.browserRowWidth[i] = 500; m_settings.browserRowWidth[i] = 100;
if( m_settings.browserRowWidth[i] < 10) if( m_settings.browserRowWidth[i] < 1)
m_settings.browserRowWidth[i] = 10; m_settings.browserRowWidth[i] = 1;
} }
if(dirMenu.isChanged()) if(dirMenu.isChanged())

View File

@@ -84,8 +84,9 @@
#define MAX_NUMBER_OF_BOOKMARK_ITEMS MI_MOVIE_BOOK_USER_MAX // we just use the same size as used in Movie info (MAX_NUMBER_OF_BOOKMARK_ITEMS is used for the number of menu items) #define MAX_NUMBER_OF_BOOKMARK_ITEMS MI_MOVIE_BOOK_USER_MAX // we just use the same size as used in Movie info (MAX_NUMBER_OF_BOOKMARK_ITEMS is used for the number of menu items)
#define MOVIEBROWSER_SETTINGS_FILE CONFIGDIR "/moviebrowser.conf" #define MOVIEBROWSER_SETTINGS_FILE CONFIGDIR "/moviebrowser.conf"
#define MIN_BROWSER_FRAME_HEIGHT 100 /* percent */
#define MAX_BROWSER_FRAME_HEIGHT 400 #define MIN_BROWSER_FRAME_HEIGHT 10
#define MAX_BROWSER_FRAME_HEIGHT 80
void strReplace(std::string& orig, const char* fstr, const std::string rstr); void strReplace(std::string& orig, const char* fstr, const std::string rstr);
/* !!!! Do NOT change the order of the enum, just add items at the end !!!! */ /* !!!! Do NOT change the order of the enum, just add items at the end !!!! */

View File

@@ -415,9 +415,10 @@ void CListFrame::refreshList(void)
int width; int width;
int x = m_cFrameListRel.iX + TEXT_BORDER_WIDTH; int x = m_cFrameListRel.iX + TEXT_BORDER_WIDTH;
y += m_nFontListHeight; y += m_nFontListHeight;
int net_width = m_cFrameListRel.iWidth - ROW_BORDER_WIDTH * (m_pLines->rows - 1);
for(int row = 0; row < m_pLines->rows; row++) for(int row = 0; row < m_pLines->rows; row++)
{ {
width = m_pLines->rowWidth[row] ; width = m_pLines->rowWidth[row] * net_width / 100 ;
if(width > m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - TEXT_BORDER_WIDTH) if(width > m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - TEXT_BORDER_WIDTH)
{ {
width = m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - TEXT_BORDER_WIDTH; width = m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - TEXT_BORDER_WIDTH;
@@ -426,7 +427,7 @@ void CListFrame::refreshList(void)
m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY, m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY,
width, m_pLines->lineArray[row][line].c_str(), width, m_pLines->lineArray[row][line].c_str(),
color, 0, true); // UTF-8 color, 0, true); // UTF-8
x += m_pLines->rowWidth[row] + ROW_BORDER_WIDTH; x += width + ROW_BORDER_WIDTH;
} }
} }
} }
@@ -459,14 +460,15 @@ void CListFrame::refreshLine(int line)
int width; int width;
int x = m_cFrameListRel.iX + TEXT_BORDER_WIDTH; int x = m_cFrameListRel.iX + TEXT_BORDER_WIDTH;
y += m_nFontListHeight; y += m_nFontListHeight;
int net_width = m_cFrameListRel.iWidth - ROW_BORDER_WIDTH * (m_pLines->rows - 1);
for(int row = 0; row < m_pLines->rows; row++) for(int row = 0; row < m_pLines->rows; row++)
{ {
width = std::min(m_pLines->rowWidth[row], width = std::min(m_pLines->rowWidth[row] * net_width / 100,
m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - TEXT_BORDER_WIDTH); m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - TEXT_BORDER_WIDTH);
m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY, m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY,
width, m_pLines->lineArray[row][line].c_str(), width, m_pLines->lineArray[row][line].c_str(),
color, 0, true); // UTF-8 color, 0, true); // UTF-8
x += m_pLines->rowWidth[row] + ROW_BORDER_WIDTH; x += width + ROW_BORDER_WIDTH;
} }
} }
@@ -482,10 +484,11 @@ void CListFrame::refreshHeaderList(void)
int width; int width;
int x = m_cFrameHeaderListRel.iX + TEXT_BORDER_WIDTH; int x = m_cFrameHeaderListRel.iX + TEXT_BORDER_WIDTH;
int y = m_cFrameHeaderListRel.iY + m_nFontHeaderListHeight + 2; int y = m_cFrameHeaderListRel.iY + m_nFontHeaderListHeight + 2;
int net_width = m_cFrameHeaderListRel.iWidth - ROW_BORDER_WIDTH * (m_pLines->rows - 1);
bool loop = true; bool loop = true;
for(int row = 0; row < m_pLines->rows && loop == true; row++) for(int row = 0; row < m_pLines->rows && loop == true; row++)
{ {
width = m_pLines->rowWidth[row] ; width = m_pLines->rowWidth[row] * net_width / 100;
if (width > m_cFrameHeaderListRel.iWidth - x + m_cFrameHeaderListRel.iX - TEXT_BORDER_WIDTH) if (width > m_cFrameHeaderListRel.iWidth - x + m_cFrameHeaderListRel.iX - TEXT_BORDER_WIDTH)
{ {
width = m_cFrameHeaderListRel.iWidth - x + m_cFrameHeaderListRel.iX - TEXT_BORDER_WIDTH; width = m_cFrameHeaderListRel.iWidth - x + m_cFrameHeaderListRel.iX - TEXT_BORDER_WIDTH;
@@ -495,7 +498,7 @@ void CListFrame::refreshHeaderList(void)
m_pcFontHeaderList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY, m_pcFontHeaderList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY,
width, m_pLines->lineHeader[row].c_str(), width, m_pLines->lineHeader[row].c_str(),
HEADER_LIST_FONT_COLOR, 0, true); // UTF-8 HEADER_LIST_FONT_COLOR, 0, true); // UTF-8
x += m_pLines->rowWidth[row] + ROW_BORDER_WIDTH; x += width + ROW_BORDER_WIDTH;
} }
} }