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