summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/uiconfig/ui/detailwindow.ui1
-rw-r--r--include/vcl/layout.hxx1
-rw-r--r--vcl/source/window/layout.cxx13
3 files changed, 14 insertions, 1 deletions
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)