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

Draw basic frame and window background from the theme definition

Change-Id: I2422650a155a874855ad4d72fa3bfd27b7d0da8a
Reviewed-on: https://gerrit.libreoffice.org/68772
Tested-by: Jenkins
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst 734a5cc1
......@@ -99,8 +99,10 @@ bool FileDefinitionWidgetDraw::isNativeControlSupported(ControlType eType, Contr
case ControlType::IntroProgress:
return true;
case ControlType::Tooltip:
return false;
case ControlType::WindowBackground:
case ControlType::Frame:
return true;
case ControlType::ListNode:
case ControlType::ListNet:
case ControlType::ListHeader:
......@@ -391,6 +393,10 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart
break;
case ControlType::WindowBackground:
case ControlType::Frame:
{
bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
}
break;
case ControlType::ListNode:
case ControlType::ListNet:
case ControlType::ListHeader:
......
......@@ -133,14 +133,23 @@ 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 } };
= { { "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 } };
auto const& rIterator = aPartMap.find(rString);
if (rIterator != aPartMap.end())
......
......@@ -310,4 +310,29 @@
</part>
</tabbody>
<windowbackground>
<part value="BackgroundWindow">
<state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
<rect stroke="#FF0000" fill="#FF0000" stroke-width="1" rx="1" ry="1"/>
</state>
</part>
<part value="BackgroundDialog">
<state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
<rect stroke="#0000FF" fill="#FFFFFF" stroke-width="1" rx="1" ry="1"/>
</state>
</part>
</windowbackground>
<frame>
<part value="Entire">
<state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
<rect stroke="#00FF00" fill="#00FF00" stroke-width="1" rx="1" ry="1"/>
</state>
</part>
<part value="Border">
<state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
<rect stroke="#00FF00" fill="#00FF00" stroke-width="1" rx="1" ry="1"/>
</state>
</part>
</frame>
</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