Implement FR#2507667: "GUI: Improve PopupWidget rendering / theme layouting".
- Split out label from PopUp widget - Aligned every widget on all layouts so GUI becomes to look nice again - Moved textHAlign to layout properties svn-id: r41266
This commit is contained in:
parent
b0f7f2e8d4
commit
b0db1b5ed0
21 changed files with 643 additions and 318 deletions
|
@ -70,6 +70,22 @@ bool ThemeLayout::getWidgetData(const Common::String &name, int16 &x, int16 &y,
|
|||
return false;
|
||||
}
|
||||
|
||||
Graphics::TextAlign ThemeLayout::getWidgetTextHAlign(const Common::String &name) {
|
||||
if (name.empty()) {
|
||||
assert(getLayoutType() == kLayoutMain);
|
||||
return _textHAlign;
|
||||
}
|
||||
|
||||
Graphics::TextAlign res;
|
||||
|
||||
for (uint i = 0; i < _children.size(); ++i) {
|
||||
if ((res = _children[i]->getWidgetTextHAlign(name)) != Graphics::kTextAlignInvalid)
|
||||
return res;
|
||||
}
|
||||
|
||||
return Graphics::kTextAlignInvalid;
|
||||
}
|
||||
|
||||
int16 ThemeLayoutStacked::getParentWidth() {
|
||||
ThemeLayout *p = _parent;
|
||||
int width = 0;
|
||||
|
@ -135,6 +151,14 @@ bool ThemeLayoutWidget::getWidgetData(const Common::String &name, int16 &x, int1
|
|||
return false;
|
||||
}
|
||||
|
||||
Graphics::TextAlign ThemeLayoutWidget::getWidgetTextHAlign(const Common::String &name) {
|
||||
if (name == _name) {
|
||||
return _textHAlign;
|
||||
}
|
||||
|
||||
return Graphics::kTextAlignInvalid;
|
||||
}
|
||||
|
||||
void ThemeLayoutMain::reflowLayout() {
|
||||
assert(_children.size() <= 1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue