mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
neutrino: let menus resize to the needed dimension
Instead of letting the caller of the menuewidget specify the dimensions, determine them based on the text that is to be displayed. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@226 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -264,6 +264,7 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser
|
||||
|
||||
void setOptionValue(const int newvalue);
|
||||
int getOptionValue(void) const;
|
||||
int getWidth(void) const;
|
||||
|
||||
int paint(bool selected, bool last = 0);
|
||||
|
||||
@@ -332,6 +333,7 @@ class CMenuWidget : public CMenuTarget
|
||||
std::vector<unsigned int> page_start;
|
||||
std::string iconfile;
|
||||
|
||||
int needed_width;
|
||||
int width;
|
||||
int height;
|
||||
int wanted_height;
|
||||
@@ -349,6 +351,7 @@ class CMenuWidget : public CMenuTarget
|
||||
|
||||
public:
|
||||
CMenuWidget();
|
||||
/* TODO: mwidth and mheight are not used anymore. remove if nobody misses them */
|
||||
CMenuWidget(const char* Name, const std::string & Icon = "", const int mwidth = 400, const int mheight = 576);
|
||||
CMenuWidget(const neutrino_locale_t Name, const std::string & Icon = "", const int mwidth = 400, const int mheight = 576);
|
||||
~CMenuWidget();
|
||||
|
Reference in New Issue
Block a user