diff options
-rw-r--r-- | fpicker/source/office/RemoteFilesDialog.cxx | 4 | ||||
-rw-r--r-- | fpicker/source/office/iodlgimp.cxx | 4 | ||||
-rw-r--r-- | include/vcl/button.hxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 8 |
5 files changed, 14 insertions, 7 deletions
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index ef5ca8c3c49d..0453bfc5e8aa 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -279,7 +279,9 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, PickerFlags nBits ) m_pName_ed->SetGetFocusHdl( LINK( this, RemoteFilesDialog, FileNameGetFocusHdl ) ); m_pName_ed->SetModifyHdl( LINK( this, RemoteFilesDialog, FileNameModifyHdl ) ); - m_pAddService_btn->SetDelayMenu( true ); + m_pAddService_btn->SetDelayMenu(true); + m_pAddService_btn->SetDropDown(PushButtonDropdownStyle::SplitMenuButton); + m_pAddMenu = m_pAddService_btn->GetPopupMenu(); m_pAddService_btn->SetClickHdl( LINK( this, RemoteFilesDialog, AddServiceHdl ) ); m_pAddService_btn->SetSelectHdl( LINK( this, RemoteFilesDialog, EditServiceMenuHdl ) ); diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx index 0f3623fd22d2..43539fdc5197 100644 --- a/fpicker/source/office/iodlgimp.cxx +++ b/fpicker/source/office/iodlgimp.cxx @@ -95,8 +95,8 @@ SvtFileDialogURLSelector::SvtFileDialogURLSelector( vcl::Window* _pParent, SvtFi { SetStyle( GetStyle() | WB_NOPOINTERFOCUS | WB_RECTSTYLE | WB_SMALLSTYLE ); SetModeImage( _pDlg->GetButtonImage( _nButtonId ) ); - SetDelayMenu( true ); - SetDropDown( PushButtonDropdownStyle::Toolbox ); + SetDelayMenu(true); + SetDropDown(PushButtonDropdownStyle::Toolbox); } diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 9d83d004668c..78df45e006a4 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -108,7 +108,8 @@ enum class PushButtonDropdownStyle { NONE = 0x0000, Toolbox = 0x0001, - MenuButton = 0x0002, + MenuButton = 0x0002, //visual down arrow + SplitMenuButton = 0x0003, //visual down arrow and seperator line }; class VCL_DLLPUBLIC PushButton : public Button diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 5ba36412e997..15fa22588712 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -263,7 +263,9 @@ void BackingWindow::initControls() mpLocalView->Hide(); mpTemplateButton->SetDelayMenu(true); + mpTemplateButton->SetDropDown(PushButtonDropdownStyle::SplitMenuButton); mpRecentButton->SetDelayMenu(true); + mpRecentButton->SetDropDown(PushButtonDropdownStyle::SplitMenuButton); //set handlers mpLocalView->setCreateContextMenuHdl(LINK(this, BackingWindow, CreateContextMenuHdl)); diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index e094ad49853a..cb0cb8b3d68e 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -868,7 +868,8 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl sal_uLong nImageSep = 1 + (pDev->GetTextHeight()-10)/2; if( nImageSep < 1 ) nImageSep = 1; - if ( mnDDStyle == PushButtonDropdownStyle::MenuButton ) + if ( mnDDStyle == PushButtonDropdownStyle::MenuButton || + mnDDStyle == PushButtonDropdownStyle::SplitMenuButton ) { long nSeparatorX = 0; Rectangle aSymbolRect = aInRect; @@ -1034,7 +1035,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext) return; bool bRollOver = (IsMouseOver() && aInRect.IsInside(GetPointerPosPixel())); - bool bDrawMenuSep = true; + bool bDrawMenuSep = mnDDStyle == PushButtonDropdownStyle::SplitMenuButton; if (GetStyle() & WB_FLATBUTTON) { if (!bRollOver && !HasFocus()) @@ -1642,7 +1643,8 @@ Size PushButton::CalcMinimumSize() const } else if ( Button::HasImage() && ! (ImplGetButtonState() & DrawButtonFlags::NoImage) ) aSize = GetModeImage().GetSizePixel(); - if( mnDDStyle == PushButtonDropdownStyle::MenuButton ) + if( mnDDStyle == PushButtonDropdownStyle::MenuButton || + mnDDStyle == PushButtonDropdownStyle::SplitMenuButton ) { long nSymbolSize = GetTextHeight() / 2 + 1; aSize.Width() += 2*nSymbolSize; |