summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-03-03 21:10:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-04 14:07:31 +0100
commit5e75b7ca828954f9a23d7a3e8c3be3e0934210b3 (patch)
tree80979bb5305184f9c2763cd5010f00b20cd2cbaf /vcl/source
parentcccc98921e04bd16651b8ff92f82ff9073a1b12c (diff)
macOS: use HITheme to draw listbox window border
Change-Id: I39fd6f643649bc405447d10e7072ae6dabd679b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/imp_listbox.cxx3
-rw-r--r--vcl/source/window/brdwin.cxx8
2 files changed, 10 insertions, 1 deletions
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index ddff67bae584..0c5e8f1237f6 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -2792,6 +2792,9 @@ void ImplBtn::MouseButtonDown( const MouseEvent& )
ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( vcl::Window* pParent ) :
FloatingWindow( pParent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ) // no drop shadow for list boxes
{
+ // for native widget rendering we must be able to detect this window type
+ SetType( WindowType::LISTBOXWINDOW );
+
mpImplLB = nullptr;
mnDDLineCount = 0;
mbAutoWidth = false;
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index b5bdd05d53d4..ec1e95c9db46 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -427,6 +427,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, tools::Long nWidth, to
// for native widget drawing we must find out what
// control this border belongs to
ControlType aCtrlType = ControlType::Generic;
+ ControlPart aCtrlPart = ControlPart::Entire;
if (pCtrl)
{
switch( pCtrl->GetType() )
@@ -438,6 +439,11 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, tools::Long nWidth, to
mbNWFBorder = true;
}
break;
+ case WindowType::LISTBOXWINDOW:
+ aCtrlType = ControlType::Listbox;
+ aCtrlPart = ControlPart::ListboxWindow;
+ mbNWFBorder = true;
+ break;
case WindowType::COMBOBOX:
if( pCtrl->GetStyle() & WB_DROPDOWN )
{
@@ -475,7 +481,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, tools::Long nWidth, to
if( aMinSize.Height() < 10 ) aMinSize.setHeight( 10 );
tools::Rectangle aCtrlRegion( Point(mnLeftBorder, mnTopBorder), aMinSize );
tools::Rectangle aBounds, aContent;
- if( pWin->GetNativeControlRegion( aCtrlType, ControlPart::Entire, aCtrlRegion,
+ if( pWin->GetNativeControlRegion( aCtrlType, aCtrlPart, aCtrlRegion,
ControlState::ENABLED, aControlValue,
aBounds, aContent ) )
{