summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/source/dialog/backingwindow.cxx31
-rw-r--r--sfx2/source/dialog/backingwindow.hxx1
2 files changed, 31 insertions, 1 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index c7a39f25f909..1f9064158a45 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -34,6 +34,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/toolbox.hxx>
+#include <vcl/menubtn.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx>
@@ -303,7 +304,20 @@ void BackingWindow::initControls()
*Filter and the bars*/
setupButton( mpOpenButton );
- setupButton( mpTemplateButton );
+ //setupButton( mpTemplateButton );
+ Font bFont(mpTemplateButton->GetControlFont());
+ bFont.SetHeight(nButtonsFontSize);
+ mpTemplateButton->SetControlFont(bFont);
+
+ // color that fits the theme
+ mpTemplateButton->SetControlForeground(aButtonsText);
+
+
+ mpTemplateButton->SetDropDown( PUSHBUTTON_DROPDOWN_MENUBUTTON );
+ MenuButton *pMenuButton = static_cast<MenuButton*> (mpTemplateButton);
+ pMenuButton->SetMenuMode( MENUBUTTON_MENUMODE_TIMED );
+ pMenuButton->SetActivateHdl( LINK( this, BackingWindow, ActivateHdl ));
+ //pMenuButton->Activate();
setupButton( mpWriterAllButton );
setupButton( mpDrawAllButton );
@@ -578,6 +592,21 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton )
return 0;
}
+IMPL_LINK( BackingWindow, ActivateHdl, Button*, pButton )
+{
+ printf("---------------------------------");
+ MenuButton *pMenuButton = static_cast<MenuButton*> (pButton);
+ PopupMenu *pFilterMenu = new PopupMenu;
+
+ //pFilterMenu->SetSelectHdl(LINK( this, BackingWindow, FilterMenuSelectHdl));
+ pFilterMenu->InsertItem(0, "Writer");
+
+
+ pMenuButton->SetPopupMenu( pFilterMenu );
+
+
+ return 0;
+}
IMPL_LINK_NOARG( BackingWindow, OpenRegionHdl)
diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx
index c6cdade2239a..b2b14ca0e739 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -111,6 +111,7 @@ class BackingWindow
std::set<const ThumbnailViewItem*,selection_cmp_fn> maSelFolders;
DECL_LINK(ClickHdl, Button*);
+ DECL_LINK(ActivateHdl, Button*);
DECL_LINK(ExtLinkClickHdl, Button*);
DECL_LINK(OpenRegionHdl, void*);
DECL_LINK(OpenTemplateHdl, ThumbnailViewItem*);