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

Draw basic fixedline from the theme definition

Change-Id: I791d33e4cea14f49609434e39f681cf47864fc67
Reviewed-on: https://gerrit.libreoffice.org/68750Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
Tested-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst ae9eab1c
......@@ -82,8 +82,8 @@ bool FileDefinitionWidgetDraw::isNativeControlSupported(ControlType eType, Contr
return false;
return true;
case ControlType::Slider:
return true;
case ControlType::Fixedline:
return true;
case ControlType::Toolbar:
case ControlType::Menubar:
case ControlType::MenuPopup:
......@@ -453,6 +453,24 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart
}
break;
case ControlType::Fixedline:
{
std::shared_ptr<WidgetDefinitionPart> pPart
= m_aWidgetDefinition.getDefinition(eType, ePart);
if (pPart)
{
auto aStates = pPart->getStates(eState, rValue);
if (!aStates.empty())
{
std::shared_ptr<WidgetDefinitionState> pState = aStates.back();
{
munchDrawCommands(pState->mpDrawCommands, m_rGraphics, nX, nY, nWidth,
nHeight);
bOK = true;
}
}
}
}
break;
case ControlType::Toolbar:
case ControlType::Menubar:
break;
......
......@@ -136,7 +136,8 @@ bool getControlTypeForXmlString(OString const& rString, ControlType& reType)
= { { "pushbutton", ControlType::Pushbutton }, { "radiobutton", ControlType::Radiobutton },
{ "checkbox", ControlType::Checkbox }, { "combobox", ControlType::Combobox },
{ "editbox", ControlType::Editbox }, { "scrollbar", ControlType::Scrollbar },
{ "spinbox", ControlType::Spinbox }, { "slider", ControlType::Slider } };
{ "spinbox", ControlType::Spinbox }, { "slider", ControlType::Slider },
{ "fixedline", ControlType::Fixedline } };
auto const& rIterator = aPartMap.find(rString);
if (rIterator != aPartMap.end())
......
......@@ -201,4 +201,17 @@
</part>
</slider>
<fixedline>
<part value="SeparatorHorz">
<state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
<line stroke="#007AFF" fill="#007AFF" stroke-width="2" x1="0.0" y1="0.5" x2="1.0" y2="0.5"/>
</state>
</part>
<part value="SeparatorVert">
<state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
<line stroke="#007AFF" fill="#007AFF" stroke-width="2" x1="0.5" y1="0.0" x2="0.5" y2="1.0"/>
</state>
</part>
</fixedline>
</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