diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-12-15 11:01:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-12-15 13:54:03 +0000 |
commit | abdad61f123820ed72893a9c2a0d5305ea8386d5 (patch) | |
tree | 84353cf6e0e680687ca5434e248489cc8c046eeb /svtools/source/control | |
parent | c0b59ad6e35b0cb0dea0821e95f95569739078c1 (diff) |
Resolves: tdf#95138 add tooltips to calc tabbar
Change-Id: I870c5dc1b81c642c4c7b70de10ecb927758ae29a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144216
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools/source/control')
-rw-r--r-- | svtools/source/control/tabbar.cxx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 1e9a9172967f..7daba1791d3e 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -439,7 +439,7 @@ public: std::shared_ptr<weld::ButtonPressRepeater> m_xPrevRepeater; std::shared_ptr<weld::ButtonPressRepeater> m_xNextRepeater; - TabButtons(TabBar* pParent) + TabButtons(TabBar* pParent, bool bSheets) : InterimItemWindow(pParent, pParent->IsMirrored() ? OUString("svt/ui/tabbuttonsmirrored.ui") : OUString("svt/ui/tabbuttons.ui"), @@ -459,6 +459,15 @@ public: m_xNextButton->set_accessible_name(SvtResId(STR_TABBAR_PUSHBUTTON_MOVERIGHT)); m_xLastButton->set_accessible_name(SvtResId(STR_TABBAR_PUSHBUTTON_MOVETOEND)); m_xAddButton->set_accessible_name(SvtResId(STR_TABBAR_PUSHBUTTON_ADDTAB)); + + if (bSheets) + { + m_xFirstButton->set_tooltip_text(SvtResId(STR_TABBAR_HINT_MOVETOHOME_SHEETS)); + m_xPrevButton->set_tooltip_text(SvtResId(STR_TABBAR_HINT_MOVELEFT_SHEETS)); + m_xNextButton->set_tooltip_text(SvtResId(STR_TABBAR_HINT_MOVERIGHT_SHEETS)); + m_xLastButton->set_tooltip_text(SvtResId(STR_TABBAR_HINT_MOVETOEND_SHEETS)); + m_xAddButton->set_tooltip_text(SvtResId(STR_TABBAR_HINT_ADDTAB_SHEETS)); + } } void AdaptToHeight(int nHeight) @@ -504,10 +513,10 @@ struct TabBar_Impl } }; -TabBar::TabBar( vcl::Window* pParent, WinBits nWinStyle ) : +TabBar::TabBar( vcl::Window* pParent, WinBits nWinStyle, bool bSheets ) : Window( pParent, (nWinStyle & WB_3DLOOK) | WB_CLIPCHILDREN ) { - ImplInit( nWinStyle ); + ImplInit( nWinStyle, bSheets ); maCurrentItemList = 0; } @@ -526,7 +535,7 @@ void TabBar::dispose() const sal_uInt16 TabBar::APPEND = ::std::numeric_limits<sal_uInt16>::max(); const sal_uInt16 TabBar::PAGE_NOT_FOUND = ::std::numeric_limits<sal_uInt16>::max(); -void TabBar::ImplInit( WinBits nWinStyle ) +void TabBar::ImplInit( WinBits nWinStyle, bool bSheets ) { mpImpl.reset(new TabBar_Impl); @@ -552,6 +561,7 @@ void TabBar::ImplInit( WinBits nWinStyle ) mbInSelect = false; mbMirrored = false; mbScrollAlwaysEnabled = false; + mbSheets = bSheets; ImplInitControls(); @@ -782,7 +792,7 @@ void TabBar::ImplInitControls() mpImpl->mpSizer.disposeAndClear(); } - mpImpl->mxButtonBox.disposeAndReset(VclPtr<TabButtons>::Create(this)); + mpImpl->mxButtonBox.disposeAndReset(VclPtr<TabButtons>::Create(this, mbSheets)); Link<const CommandEvent&, void> aContextLink = LINK( this, TabBar, ContextMenuHdl ); |