Kaydet (Commit) 7e5fe834 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Tomaž Vajngerl

widget theme: add support for menubar, menupopup and tooltip

But they are not used - for now.

Change-Id: I93a74f5a9e52791fd08afbb5502427a0684d60cf
Reviewed-on: https://gerrit.libreoffice.org/69021
Tested-by: Jenkins
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst e089b75b
......@@ -121,12 +121,13 @@ bool FileDefinitionWidgetDraw::isNativeControlSupported(ControlType eType, Contr
return true;
case ControlType::Menubar:
case ControlType::MenuPopup:
return false;
return true;
case ControlType::Progress:
return true;
case ControlType::IntroProgress:
case ControlType::Tooltip:
return false;
case ControlType::Tooltip:
return true;
case ControlType::WindowBackground:
case ControlType::Frame:
case ControlType::ListNode:
......@@ -581,17 +582,23 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart
}
break;
case ControlType::Menubar:
break;
case ControlType::MenuPopup:
break;
{
bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
}
break;
case ControlType::Progress:
{
bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
}
break;
case ControlType::IntroProgress:
case ControlType::Tooltip:
break;
case ControlType::Tooltip:
{
bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
}
break;
case ControlType::WindowBackground:
case ControlType::Frame:
{
......
......@@ -139,28 +139,32 @@ ControlPart xmlStringToControlPart(OString const& sPart)
bool getControlTypeForXmlString(OString const& rString, ControlType& reType)
{
static std::unordered_map<OString, ControlType> aPartMap
= { { "pushbutton", ControlType::Pushbutton },
{ "radiobutton", ControlType::Radiobutton },
{ "checkbox", ControlType::Checkbox },
{ "combobox", ControlType::Combobox },
{ "editbox", ControlType::Editbox },
{ "listbox", ControlType::Listbox },
{ "scrollbar", ControlType::Scrollbar },
{ "spinbox", ControlType::Spinbox },
{ "slider", ControlType::Slider },
{ "fixedline", ControlType::Fixedline },
{ "progress", ControlType::Progress },
{ "tabitem", ControlType::TabItem },
{ "tabheader", ControlType::TabHeader },
{ "tabpane", ControlType::TabPane },
{ "tabbody", ControlType::TabBody },
{ "frame", ControlType::Frame },
{ "windowbackground", ControlType::WindowBackground },
{ "toolbar", ControlType::Toolbar },
{ "listnode", ControlType::ListNode },
{ "listnet", ControlType::ListNet },
{ "listheader", ControlType::ListHeader } };
static std::unordered_map<OString, ControlType> aPartMap = {
{ "pushbutton", ControlType::Pushbutton },
{ "radiobutton", ControlType::Radiobutton },
{ "checkbox", ControlType::Checkbox },
{ "combobox", ControlType::Combobox },
{ "editbox", ControlType::Editbox },
{ "listbox", ControlType::Listbox },
{ "scrollbar", ControlType::Scrollbar },
{ "spinbox", ControlType::Spinbox },
{ "slider", ControlType::Slider },
{ "fixedline", ControlType::Fixedline },
{ "progress", ControlType::Progress },
{ "tabitem", ControlType::TabItem },
{ "tabheader", ControlType::TabHeader },
{ "tabpane", ControlType::TabPane },
{ "tabbody", ControlType::TabBody },
{ "frame", ControlType::Frame },
{ "windowbackground", ControlType::WindowBackground },
{ "toolbar", ControlType::Toolbar },
{ "listnode", ControlType::ListNode },
{ "listnet", ControlType::ListNet },
{ "listheader", ControlType::ListHeader },
{ "menubar", ControlType::Menubar },
{ "menupopup", ControlType::MenuPopup },
{ "tooltip", ControlType::Tooltip },
};
auto const& rIterator = aPartMap.find(rString);
if (rIterator != aPartMap.end())
......
......@@ -452,4 +452,12 @@
</part>
</listheader>
<menubar>
</menubar>
<menupopup>
</menupopup>
<tooltip>
</tooltip>
</widgets>
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