diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-03-10 21:54:04 +0100 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-03-11 12:13:00 +0100 |
commit | 4ca6f4bf5598e75682a9894e672b0b79aaa4d121 (patch) | |
tree | 88fb274e1930012a3f4aeffd7fc1901fc08aecd9 | |
parent | 1e1fc114c861eb61825a314196d94f4e03441dec (diff) |
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: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 7e5fe834e722d51b5e82ecddfe549ec21c7a225e)
-rw-r--r-- | vcl/source/gdi/FileDefinitionWidgetDraw.cxx | 17 | ||||
-rw-r--r-- | vcl/source/gdi/WidgetDefinitionReader.cxx | 48 | ||||
-rw-r--r-- | vcl/uiconfig/theme_definitions/definition.xml | 8 |
3 files changed, 46 insertions, 27 deletions
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx index 5c0920bca4d6..59f0947e7eea 100644 --- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx +++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx @@ -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: { diff --git a/vcl/source/gdi/WidgetDefinitionReader.cxx b/vcl/source/gdi/WidgetDefinitionReader.cxx index f52757d37629..c183cb717e9c 100644 --- a/vcl/source/gdi/WidgetDefinitionReader.cxx +++ b/vcl/source/gdi/WidgetDefinitionReader.cxx @@ -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()) diff --git a/vcl/uiconfig/theme_definitions/definition.xml b/vcl/uiconfig/theme_definitions/definition.xml index 46346286756c..4789b9a844ed 100644 --- a/vcl/uiconfig/theme_definitions/definition.xml +++ b/vcl/uiconfig/theme_definitions/definition.xml @@ -452,4 +452,12 @@ </part> </listheader> + <menubar> + </menubar> + + <menupopup> + </menupopup> + + <tooltip> + </tooltip> </widgets> |