diff options
author | Philippe Jung <phil.jung@free.fr> | 2015-05-13 15:59:40 +0200 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2015-05-14 17:17:55 +0000 |
commit | 415454cfbc6add8534e1dcff1ff16cc8dcc9296c (patch) | |
tree | cc6b89d02bb4ae51c34202d91e060fba939ff075 /include/vcl | |
parent | fa4a87bc539865962dabf00aea465479d34faf92 (diff) |
tdf#86138 Context menu should state the name of the toolbar
When Menu::SetText is called, it defines the title of the menu (reuse of
an already defined & not used aTitleText)
Popup-menu with a title defined paint it on top of the popup. Text is bold
with a background slightly darker than the rest of the popup.
Change-Id: Ifca1be60541400f76f562b03f6e3c40dc5fecb29
Reviewed-on: https://gerrit.libreoffice.org/15716
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/menu.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 24c716daa466..4899455eb3de 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -136,6 +136,7 @@ private: VclEventListeners maChildEventListeners; OUString aTitleText; // PopupMenu text + sal_uInt16 nTitleHeight; ImplSVEvent * nEventId; sal_uInt16 mnHighlightedItemPos; // for native menus: keeps track of the highlighted item @@ -159,7 +160,7 @@ protected: SAL_DLLPRIVATE Menu* ImplGetStartMenu(); SAL_DLLPRIVATE Menu* ImplFindSelectMenu(); SAL_DLLPRIVATE Menu* ImplFindMenu( sal_uInt16 nId ); - SAL_DLLPRIVATE Size ImplCalcSize( const vcl::Window* pWin ); + SAL_DLLPRIVATE Size ImplCalcSize( vcl::Window* pWin ); SAL_DLLPRIVATE bool ImplIsVisible( sal_uInt16 nPos ) const; SAL_DLLPRIVATE bool ImplIsSelectable( sal_uInt16 nPos ) const; SAL_DLLPRIVATE sal_uInt16 ImplGetVisibleItemCount() const; @@ -167,6 +168,7 @@ protected: SAL_DLLPRIVATE sal_uInt16 ImplGetPrevVisible( sal_uInt16 nPos ) const; SAL_DLLPRIVATE sal_uInt16 ImplGetNextVisible( sal_uInt16 nPos ) const; SAL_DLLPRIVATE void ImplPaint( vcl::Window* pWin, sal_uInt16 nBorder, long nOffY = 0, MenuItemData* pThisDataOnly = 0, bool bHighlighted = false, bool bLayout = false, bool bRollover = false ) const; + SAL_DLLPRIVATE void ImplPaintMenuTitle( vcl::Window* pWin, const Rectangle& rRect ) const; SAL_DLLPRIVATE void ImplSelect(); SAL_DLLPRIVATE void ImplCallHighlight( sal_uInt16 nHighlightItem ); SAL_DLLPRIVATE void ImplCallEventListeners( sal_uLong nEvent, sal_uInt16 nPos ); @@ -332,6 +334,8 @@ public: bool HasLogo() const { return pLogo != nullptr; } + sal_uInt16 GetTitleHeight() { return nTitleHeight; } + void AddEventListener( const Link<>& rEventListener ); void RemoveEventListener( const Link<>& rEventListener ); void AddChildEventListener( const Link<>& rEventListener ); |