summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-03-02 23:24:13 +0100
committerTomaž Vajngerl <quikee@gmail.com>2019-03-06 16:33:22 +0100
commit734a5cc1eba1bbfafcd93f09177ff07b52fa95f8 (patch)
tree24809927102cec905008215d21ddeec795a6301f /vcl/source
parent7894fd2b442eff45ecf14088ebd17ee9f8678752 (diff)
Draw basic listbox from the theme definition
Change-Id: Id3dd5aaa8b5537e5f740752cec292d6f4a44044e Reviewed-on: https://gerrit.libreoffice.org/68771 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/FileDefinitionWidgetDraw.cxx9
-rw-r--r--vcl/source/gdi/WidgetDefinitionReader.cxx11
2 files changed, 13 insertions, 7 deletions
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index d0743208f6fc..b88ac38b5f64 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -69,7 +69,9 @@ bool FileDefinitionWidgetDraw::isNativeControlSupported(ControlType eType, Contr
case ControlType::MultilineEditbox:
return true;
case ControlType::Listbox:
- return false;
+ if (ePart == ControlPart::HasBackgroundTexture)
+ return false;
+ return true;
case ControlType::Spinbox:
if (ePart == ControlPart::AllButtons)
return false;
@@ -290,7 +292,10 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart
}
break;
case ControlType::Listbox:
- break;
+ {
+ bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
+ }
+ break;
case ControlType::Spinbox:
{
if (rValue.getType() == ControlType::SpinButtons)
diff --git a/vcl/source/gdi/WidgetDefinitionReader.cxx b/vcl/source/gdi/WidgetDefinitionReader.cxx
index 351d0fcdc9ef..84740bced4a2 100644
--- a/vcl/source/gdi/WidgetDefinitionReader.cxx
+++ b/vcl/source/gdi/WidgetDefinitionReader.cxx
@@ -135,11 +135,12 @@ 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 }, { "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 } };
+ { "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 } };
auto const& rIterator = aPartMap.find(rString);
if (rIterator != aPartMap.end())