mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
listframe: add option to control cut of text inside rows, default enabled
Origin commit data
------------------
Branch: ni/coolstream
Commit: 580b4980b6
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-05-05 (Sun, 05 May 2019)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -175,6 +175,7 @@ void CListFrame::initVar(void)
|
||||
m_nMode = SCROLL;
|
||||
|
||||
m_showSelection = true;
|
||||
m_cutRowText = NULL;
|
||||
|
||||
m_pcFontList = FONT_LIST ;
|
||||
m_nFontListHeight = m_pcFontList->getHeight();
|
||||
@@ -505,7 +506,10 @@ void CListFrame::paintRowText(const std::string& text, Font* font, const int& x_
|
||||
int w_row = dx-OFFSET_INNER_MID;
|
||||
int h_row = dy-OFFSET_INNER_MIN;
|
||||
|
||||
tmp_font = *CNeutrinoFonts::getInstance()->getDynFont(w_row, h_row, text);
|
||||
if (m_cutRowText)
|
||||
if (!*m_cutRowText)
|
||||
tmp_font = *CNeutrinoFonts::getInstance()->getDynFont(w_row, h_row, text);
|
||||
|
||||
y_tmp -= (font->getHeight() - tmp_font->getHeight()) >>1 ;
|
||||
}
|
||||
tmp_font->RenderString(x_pos, y_tmp, dx, text.c_str(), col);
|
||||
|
@@ -116,6 +116,7 @@ class CListFrame
|
||||
int m_nSelectedLine;
|
||||
|
||||
int m_nBgRadius;
|
||||
int* m_cutRowText;
|
||||
|
||||
bool m_showSelection;
|
||||
|
||||
@@ -180,6 +181,7 @@ inline int getPages(void) {return(m_nNrOfPages);};
|
||||
inline void showSelection(bool show) {m_showSelection = show;refreshLine(m_nSelectedLine);};
|
||||
inline void movePosition(int x, int y){m_cFrame.iX = x; m_cFrame.iY = y;};
|
||||
inline int getLineHeight() {return m_nFontListHeight;}
|
||||
inline void cutRowText(int *catRowText) {m_cutRowText = catRowText;}
|
||||
|
||||
/* Variables */
|
||||
typedef enum mode_
|
||||
|
Reference in New Issue
Block a user