diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-08-26 17:37:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-08-27 10:16:19 +0200 |
commit | 4895f9de44713fdc574342e5b2993b9829cddb41 (patch) | |
tree | 6504ac653685d0a0226f827cd1aae1e8240937ae /vcl | |
parent | 3636972c4ef6135ffa8de7c94412b9cdcbaaf169 (diff) |
use monoborder widget css name as a WindowBorderStyle::MONO replacement
Change-Id: I563f917c741130909a9d726754cd3eb23a651a11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101429
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/layout.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index a4a008df7448..d6b9247b73ed 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1791,12 +1791,19 @@ VclScrolledWindow::VclScrolledWindow(vcl::Window *pParent) : VclBin(pParent, WB_HIDE | WB_CLIPCHILDREN | WB_AUTOHSCROLL | WB_AUTOVSCROLL | WB_TABSTOP) , m_bUserManagedScrolling(false) , m_eDrawFrameStyle(DrawFrameStyle::NONE) + , m_eDrawFrameFlags(DrawFrameFlags::NONE) , m_pVScroll(VclPtr<ScrollBar>::Create(this, WB_HIDE | WB_VERT)) , m_pHScroll(VclPtr<ScrollBar>::Create(this, WB_HIDE | WB_HORZ)) , m_aScrollBarBox(VclPtr<ScrollBarBox>::Create(this, WB_HIDE)) { SetType(WindowType::SCROLLWINDOW); + AllSettings aAllSettings = GetSettings(); + StyleSettings aStyle = aAllSettings.GetStyleSettings(); + aStyle.SetMonoColor(aStyle.GetActiveBorderColor()); + aAllSettings.SetStyleSettings(aStyle); + SetSettings(aAllSettings); + Link<ScrollBar*,void> aLink( LINK( this, VclScrolledWindow, ScrollBarHdl ) ); m_pVScroll->SetScrollHdl(aLink); m_pHScroll->SetScrollHdl(aLink); @@ -2013,6 +2020,10 @@ bool VclScrolledWindow::set_property(const OString &rKey, const OUString &rValue m_eDrawFrameStyle = DrawFrameStyle::NONE; return true; } + else if (rKey == "name") + { + m_eDrawFrameFlags = rValue == "monoborder" ? DrawFrameFlags::Mono : DrawFrameFlags::NONE; + } bool bRet = VclBin::set_property(rKey, rValue); m_pVScroll->Show((GetStyle() & WB_VSCROLL) != 0); @@ -2043,7 +2054,7 @@ void VclScrolledWindow::Paint(vcl::RenderContext& rRenderContext, const tools::R { VclBin::Paint(rRenderContext, rRect); DecorationView aDecoView(&rRenderContext); - aDecoView.DrawFrame(tools::Rectangle(Point(0,0), GetSizePixel()), m_eDrawFrameStyle); + aDecoView.DrawFrame(tools::Rectangle(Point(0,0), GetSizePixel()), m_eDrawFrameStyle, m_eDrawFrameFlags); } void VclViewport::setAllocation(const Size &rAllocation) |