tdf#125454 SM use theming for element list

This uses the same background color then the edit entries and
changes the focus from the gray filled rectangle to a non-filled
rectangle using the general highlight color.

Change-Id: I4b44811e768266ccd2081a8e3ef61483a803da3b
Reviewed-on: https://gerrit.libreoffice.org/72795
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx
index 874735a..c68d442 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -73,6 +73,7 @@ class SmElementsControl : public Control
    static const std::pair<const char*, const char*> aOthers[];

    virtual void ApplySettings(vcl::RenderContext&) override;
    virtual void DataChanged(const DataChangedEvent&) override;
    virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
    virtual void MouseButtonDown(const MouseEvent& rMEvt) override;
    virtual void MouseMove(const MouseEvent& rMEvt) override;
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 385d33d..43948cd 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -378,9 +378,10 @@ void SmElementsControl::LayoutOrPaintContents(vcl::RenderContext *pContext)
                if (pCurrentElement == element)
                {
                    pContext->Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
                    pContext->SetFillColor(Color(230, 230, 230));
                    pContext->SetLineColor(Color(230, 230, 230));

                    const StyleSettings& rStyleSettings = pContext->GetSettings().GetStyleSettings();
                    pContext->SetLineColor(rStyleSettings.GetHighlightColor());
                    pContext->SetFillColor(COL_TRANSPARENT);
                    pContext->DrawRect(PixelToLogic(tools::Rectangle(x + 1, y + 1, x + boxX - 1, y + boxY - 1)));
                    pContext->DrawRect(PixelToLogic(tools::Rectangle(x + 2, y + 2, x + boxX - 2, y + boxY - 2)));
                    pContext->Pop();
                }
@@ -452,7 +453,21 @@ void SmElementsControl::Resize()

void SmElementsControl::ApplySettings(vcl::RenderContext& rRenderContext)
{
    rRenderContext.SetBackground(COL_WHITE);
    const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
    rRenderContext.SetBackground(rStyleSettings.GetFieldColor());
}

void SmElementsControl::DataChanged(const DataChangedEvent& rDCEvt)
{
    Window::DataChanged(rDCEvt);

    if (!((rDCEvt.GetType() == DataChangedEventType::FONTS) ||
          (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) ||
          ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
           (rDCEvt.GetFlags() & AllSettingsFlags::STYLE))))
        return;

    Invalidate();
}

void SmElementsControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)