Draw basic fixedline from the theme definition
Change-Id: I791d33e4cea14f49609434e39f681cf47864fc67 Reviewed-on: https://gerrit.libreoffice.org/68750 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
parent
ae9eab1cf6
commit
16d9cfe92a
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user