Kaydet (Commit) e5818a4f authored tarafından Andre Fischer's avatar Andre Fischer Kaydeden (comit) Michael Meeks

Resolves: #i122298# Added quick help texts to title bar buttons of sidebar...

panels and deck

(cherry picked from commit 2f18055a)

Change-Id: Ic573030d5b8a437e09a763fb0350c22ef33e151a
üst bdfc0056
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include "DeckTitleBar.hxx" #include "DeckTitleBar.hxx"
#include "sfx2/sidebar/Theme.hxx" #include "sfx2/sidebar/Theme.hxx"
#include "sfx2/sfxresid.hxx"
#include "Sidebar.hrc"
#include <vcl/image.hxx> #include <vcl/image.hxx>
...@@ -39,16 +41,12 @@ DeckTitleBar::DeckTitleBar ( ...@@ -39,16 +41,12 @@ DeckTitleBar::DeckTitleBar (
: TitleBar(rsTitle, pParentWindow, GetBackgroundPaint()), : TitleBar(rsTitle, pParentWindow, GetBackgroundPaint()),
mnCloserItemIndex(1), mnCloserItemIndex(1),
maCloserAction(rCloserAction), maCloserAction(rCloserAction),
mbIsCloserVisible(rCloserAction) mbIsCloserVisible(false)
{ {
OSL_ASSERT(pParentWindow != NULL); OSL_ASSERT(pParentWindow != NULL);
if (maCloserAction) if (maCloserAction)
{ SetCloserVisible(true);
maToolBox.InsertItem(
mnCloserItemIndex,
Theme::GetImage(Theme::Image_Closer));
}
#ifdef DEBUG #ifdef DEBUG
SetText(A2S("DeckTitleBar")); SetText(A2S("DeckTitleBar"));
...@@ -72,9 +70,14 @@ void DeckTitleBar::SetCloserVisible (const bool bIsCloserVisible) ...@@ -72,9 +70,14 @@ void DeckTitleBar::SetCloserVisible (const bool bIsCloserVisible)
mbIsCloserVisible = bIsCloserVisible; mbIsCloserVisible = bIsCloserVisible;
if (mbIsCloserVisible) if (mbIsCloserVisible)
{
maToolBox.InsertItem( maToolBox.InsertItem(
mnCloserItemIndex, mnCloserItemIndex,
Theme::GetImage(Theme::Image_Closer)); Theme::GetImage(Theme::Image_Closer));
maToolBox.SetQuickHelpText(
mnCloserItemIndex,
String(SfxResId(SFX_STR_SIDEBAR_CLOSE_DECK)));
}
else else
maToolBox.RemoveItem( maToolBox.RemoveItem(
maToolBox.GetItemPos(mnCloserItemIndex)); maToolBox.GetItemPos(mnCloserItemIndex));
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
*/ */
#include "PanelTitleBar.hxx" #include "PanelTitleBar.hxx"
#include "sfx2/sfxresid.hxx"
#include "Sidebar.hrc"
#include "Paint.hxx" #include "Paint.hxx"
#include "Panel.hxx" #include "Panel.hxx"
...@@ -73,6 +75,9 @@ void PanelTitleBar::SetMenuAction ( const ::boost::function<void(void)>& rMenuAc ...@@ -73,6 +75,9 @@ void PanelTitleBar::SetMenuAction ( const ::boost::function<void(void)>& rMenuAc
mnMenuItemIndex, mnMenuItemIndex,
Theme::GetImage(Theme::Image_PanelMenu)); Theme::GetImage(Theme::Image_PanelMenu));
maToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT); maToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT);
maToolBox.SetQuickHelpText(
mnMenuItemIndex,
String(SfxResId(SFX_STR_SIDEBAR_MORE_OPTIONS)));
} }
else if ( maMenuAction && !rMenuAction ) else if ( maMenuAction && !rMenuAction )
{ {
......
...@@ -51,3 +51,6 @@ ...@@ -51,3 +51,6 @@
#define IMAGE_SIDEBAR_DECK_FUNCTIONS_SMALL 132 #define IMAGE_SIDEBAR_DECK_FUNCTIONS_SMALL 132
#define STRING_CUSTOMIZATION 200 #define STRING_CUSTOMIZATION 200
#define STRING_RESTORE 201 #define STRING_RESTORE 201
#define SFX_STR_SIDEBAR_MORE_OPTIONS (RID_SFX_SIDEBAR_START + 1)
#define SFX_STR_SIDEBAR_CLOSE_DECK (RID_SFX_SIDEBAR_START + 2)
...@@ -155,4 +155,13 @@ Resource RID_SIDEBAR_RESOURCE ...@@ -155,4 +155,13 @@ Resource RID_SIDEBAR_RESOURCE
}; };
}; };
String SFX_STR_SIDEBAR_MORE_OPTIONS
{
Text [en-US] = "More Options";
};
String SFX_STR_SIDEBAR_CLOSE_DECK
{
Text [en-US] = "Close Sidebar Deck";
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment