summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-03-02 23:37:02 +0100
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-08-29 20:10:50 +0900
commit473c21df15cc59e92e2788ca52ca62dc4fc21887 (patch)
tree9a2f8b6f654030d4481affbb067422be1d25249d /vcl
parented95c4727638d2915f4cd2e38cdd7065d7c067fb (diff)
Draw basic toolbar from the theme definition
Change-Id: I4d9935973bb6e46a7c5f17f914944f91a3e10a63 Reviewed-on: https://gerrit.libreoffice.org/68773 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit ddc8d51f09756f14a93b54bbb221a437f8420f8d)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/FileDefinitionWidgetDraw.cxx6
-rw-r--r--vcl/source/gdi/WidgetDefinitionReader.cxx3
-rw-r--r--vcl/uiconfig/theme_definitions/definition.xml45
3 files changed, 52 insertions, 2 deletions
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index 10b4643f5de8..9b903a20cd93 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -90,8 +90,8 @@ bool FileDefinitionWidgetDraw::isNativeControlSupported(ControlType eType, Contr
return true;
case ControlType::Slider:
case ControlType::Fixedline:
- return true;
case ControlType::Toolbar:
+ return true;
case ControlType::Menubar:
case ControlType::MenuPopup:
return false;
@@ -379,6 +379,10 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart
}
break;
case ControlType::Toolbar:
+ {
+ bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
+ }
+ break;
case ControlType::Menubar:
break;
case ControlType::MenuPopup:
diff --git a/vcl/source/gdi/WidgetDefinitionReader.cxx b/vcl/source/gdi/WidgetDefinitionReader.cxx
index 997ba931ebf0..be0831a4f3c7 100644
--- a/vcl/source/gdi/WidgetDefinitionReader.cxx
+++ b/vcl/source/gdi/WidgetDefinitionReader.cxx
@@ -149,7 +149,8 @@ bool getControlTypeForXmlString(OString const& rString, ControlType& reType)
{ "tabpane", ControlType::TabPane },
{ "tabbody", ControlType::TabBody },
{ "frame", ControlType::Frame },
- { "windowbackground", ControlType::WindowBackground } };
+ { "windowbackground", ControlType::WindowBackground },
+ { "toolbar", ControlType::Toolbar } };
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 36ddb0402805..bd0a899d5ec4 100644
--- a/vcl/uiconfig/theme_definitions/definition.xml
+++ b/vcl/uiconfig/theme_definitions/definition.xml
@@ -335,4 +335,49 @@
</state>
</part>
</frame>
+
+ <toolbar>
+ <part value="DrawBackgroundHorz">
+ <state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
+ <rect stroke="#FFFFFF" fill="#FFFFFF" stroke-width="1" rx="1" ry="1"/>
+ </state>
+ </part>
+
+ <part value="DrawBackgroundVert">
+ <state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
+ <rect stroke="#FFFFFF" fill="#FFFFFF" stroke-width="1" rx="1" ry="1"/>
+ </state>
+ </part>
+
+ <part value="ThumbHorz">
+ <state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
+ <rect stroke="#00FFFF" fill="#00FFFF" stroke-width="1" rx="1" ry="1"/>
+ </state>
+ </part>
+
+ <part value="ThumbVert">
+ <state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
+ <rect stroke="#00FFFF" fill="#00FFFF" stroke-width="1" rx="1" ry="1"/>
+ </state>
+ </part>
+
+ <part value="SeparatorVert">
+ <state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
+ <rect stroke="#00FFFF" fill="#00FFFF" stroke-width="1" rx="1" ry="1"/>
+ </state>
+ </part>
+
+ <part value="SeparatorHorz">
+ <state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
+ <rect stroke="#00FFFF" fill="#00FFFF" stroke-width="1" rx="1" ry="1"/>
+ </state>
+ </part>
+
+ <part value="Button">
+ <state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
+ <rect stroke="#00FFFF" fill="#00FFFF" stroke-width="1" rx="1" ry="1"/>
+ </state>
+ </part>
+ </toolbar>
+
</widgets>