diff options
Diffstat (limited to 'sd/source/ui/toolpanel/LayoutMenu.cxx')
-rw-r--r-- | sd/source/ui/toolpanel/LayoutMenu.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx index 7a39f1c42f15..d2faeb06eb00 100644 --- a/sd/source/ui/toolpanel/LayoutMenu.cxx +++ b/sd/source/ui/toolpanel/LayoutMenu.cxx @@ -63,7 +63,7 @@ #include <vcl/image.hxx> #include <svtools/languageoptions.hxx> #include <sfx2/app.hxx> -#include "taskpane/TitledControl.hxx"
+#include "taskpane/TitledControl.hxx" #include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> #include <comphelper/processfactory.hxx> @@ -808,7 +808,7 @@ SfxRequest LayoutMenu::CreateRequest ( void LayoutMenu::Fill (void) { - const bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + const bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); SvtLanguageOptions aLanguageOptions; sal_Bool bVertical = aLanguageOptions.IsVerticalTextEnabled(); SdDrawDocument* pDocument = mrBase.GetDocument(); @@ -917,8 +917,13 @@ void LayoutMenu::Command (const CommandEvent& rEvent) if (GetShellManager() != NULL) GetShellManager()->MoveToTop(this); if (rEvent.IsMouseEvent()) - mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup( - SdResId(RID_TASKPANE_LAYOUTMENU_POPUP)); + { + // Do not show the context menu when the mouse was not + // pressed over an item. + if (GetItemId(rEvent.GetMousePosPixel()) > 0) + mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup( + SdResId(RID_TASKPANE_LAYOUTMENU_POPUP)); + } else { // When the command event was not caused by a mouse |