mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CComponentsItem: move/rename doCenter()to base class CComponentsItem
So it's possible to use this method for all cc-items. setCenterPos() comes now with parameter 'along_mode' (CC_ALONG_X, CC_ALONG_Y). So it's possible to center in x or y direction. As default are both directions predefined.
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include "cc_frm_window.h"
|
||||
#include <driver/screen_max.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -146,11 +145,6 @@ void CComponentsWindow::initWindowPos()
|
||||
y = frameBuffer->getScreenY();
|
||||
}
|
||||
|
||||
void CComponentsWindow::doCenter(){
|
||||
x = cc_parent ? cc_parent->getWidth() - width/2 : getScreenStartX(width);
|
||||
y = cc_parent ? cc_parent->getHeight() - height/2 : getScreenStartY(height);
|
||||
}
|
||||
|
||||
void CComponentsWindow::setWindowCaption(neutrino_locale_t locale_text, const int& align_mode)
|
||||
{
|
||||
ccw_caption = g_Locale->getText(locale_text);
|
||||
|
Reference in New Issue
Block a user