dbaccess/uiconfig/ui/detailwindow.ui | 1 + include/vcl/layout.hxx | 1 + vcl/source/window/layout.cxx | 13 ++++++++++++- 3 files changed, 14 insertions(+), 1 deletion(-)
New commits: commit 4895f9de44713fdc574342e5b2993b9829cddb41 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Aug 26 17:37:35 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Aug 27 10:16:19 2020 +0200 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 <caol...@redhat.com> diff --git a/dbaccess/uiconfig/ui/detailwindow.ui b/dbaccess/uiconfig/ui/detailwindow.ui index 36955532cf0c..19bf1e23361b 100644 --- a/dbaccess/uiconfig/ui/detailwindow.ui +++ b/dbaccess/uiconfig/ui/detailwindow.ui @@ -63,6 +63,7 @@ <property name="row_spacing">6</property> <child> <object class="GtkScrolledWindow"> + <property name="name">monoborder</property> <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index 3fcfd58c3f43..3a5adbcf0aeb 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -522,6 +522,7 @@ private: virtual bool EventNotify(NotifyEvent& rNEvt) override; bool m_bUserManagedScrolling; DrawFrameStyle m_eDrawFrameStyle; + DrawFrameFlags m_eDrawFrameFlags; VclPtr<ScrollBar> m_pVScroll; VclPtr<ScrollBar> m_pHScroll; VclPtr<ScrollBarBox> m_aScrollBarBox; 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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits