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

Draw basic progress from the theme definition

Change-Id: If2c6f434dd64cf1b3bab340dc6c4d73f439bcfdf
Reviewed-on: https://gerrit.libreoffice.org/68751
Tested-by: Jenkins
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst 16d9cfe9
......@@ -87,8 +87,10 @@ bool FileDefinitionWidgetDraw::isNativeControlSupported(ControlType eType, Contr
case ControlType::Toolbar:
case ControlType::Menubar:
case ControlType::MenuPopup:
return false;
case ControlType::Progress:
case ControlType::IntroProgress:
return true;
case ControlType::Tooltip:
case ControlType::WindowBackground:
case ControlType::Frame:
......@@ -478,7 +480,24 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart
break;
case ControlType::Progress:
case ControlType::IntroProgress:
break;
{
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::Tooltip:
break;
case ControlType::WindowBackground:
......
......@@ -137,7 +137,7 @@ bool getControlTypeForXmlString(OString const& rString, ControlType& reType)
{ "checkbox", ControlType::Checkbox }, { "combobox", ControlType::Combobox },
{ "editbox", ControlType::Editbox }, { "scrollbar", ControlType::Scrollbar },
{ "spinbox", ControlType::Spinbox }, { "slider", ControlType::Slider },
{ "fixedline", ControlType::Fixedline } };
{ "fixedline", ControlType::Fixedline }, { "progress", ControlType::Progress } };
auto const& rIterator = aPartMap.find(rString);
if (rIterator != aPartMap.end())
......
......@@ -214,4 +214,12 @@
</part>
</fixedline>
<progress>
<part value="Entire">
<state enabled="any" focused="any" pressed="any" rollover="any" default="any" selected="any" button-value="any">
<rect stroke="#007AFF" fill="#007AFF" stroke-width="1" rx="7" ry="7"/>
</state>
</part>
</progress>
</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