Kaydet (Commit) 2f18055a authored tarafından Andre Fischer's avatar Andre Fischer

122298: Added quick help texts to title bar buttons of sidebar panels and deck.

üst 7fe1777a
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,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>
...@@ -44,16 +46,12 @@ DeckTitleBar::DeckTitleBar ( ...@@ -44,16 +46,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"));
...@@ -77,9 +75,14 @@ void DeckTitleBar::SetCloserVisible (const bool bIsCloserVisible) ...@@ -77,9 +75,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));
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include "precompiled_sfx2.hxx" #include "precompiled_sfx2.hxx"
#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"
...@@ -78,6 +80,9 @@ void PanelTitleBar::SetMenuAction ( const ::boost::function<void(void)>& rMenuAc ...@@ -78,6 +80,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 )
{ {
......
...@@ -85,3 +85,6 @@ ...@@ -85,3 +85,6 @@
#define IMAGE_SIDEBAR_DECK_FUNCTIONS_SMALL_HC 133 #define IMAGE_SIDEBAR_DECK_FUNCTIONS_SMALL_HC 133
#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)
...@@ -292,4 +292,13 @@ Resource RID_SIDEBAR_RESOURCE ...@@ -292,4 +292,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