Kaydet (Commit) bb051645 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

custom widgets: Better way to find out whether to use the 'stock' theming.

Change-Id: I75ea7b2d407d3acfd3094f17509c89240c48f50a
üst 173953dd
......@@ -1200,9 +1200,6 @@ namespace
xWindow = VclPtr<PushButton>::Create(pParent, nBits);
xWindow->SetText(getStockText(sType));
}
PushButton* pPushButton = dynamic_cast<PushButton*>(xWindow.get());
if (pPushButton)
pPushButton->setStock(true);
}
if (!xWindow)
......@@ -2798,17 +2795,23 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
}
}
bool bIsButtonBox = dynamic_cast<VclButtonBox*>(pCurrentChild) != nullptr;
//To-Do make reorder a virtual in Window, move this foo
//there and see above
std::vector<vcl::Window*> aChilds;
for (vcl::Window* pChild = pCurrentChild->GetWindow(GetWindowType::FirstChild); pChild;
pChild = pChild->GetWindow(GetWindowType::Next))
{
if (bIsButtonBox)
{
if (PushButton* pPushButton = dynamic_cast<PushButton*>(pChild))
pPushButton->setStock(true);
}
aChilds.push_back(pChild);
}
bool bIsButtonBox = dynamic_cast<VclButtonBox*>(pCurrentChild) != nullptr;
//sort child order within parent so that tabbing
//between controls goes in a visually sensible sequence
std::stable_sort(aChilds.begin(), aChilds.end(), sortIntoBestTabTraversalOrder(this));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment