Tooltips for collapsables and branches

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22956 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2008-02-12 09:11:06 +00:00
parent 5c3f36a25e
commit 6820d18e11
3 changed files with 11 additions and 1 deletions

View File

@ -76,6 +76,12 @@ void InsetBranch::read(Buffer const & buf, Lexer & lex)
} }
docstring InsetBranch::toolTip(BufferView const & bv, int x, int y) const
{
return _("Branch: ") + params_.branch;
}
void InsetBranch::setButtonLabel() void InsetBranch::setButtonLabel()
{ {
docstring s = _("Branch: ") + params_.branch; docstring s = _("Branch: ") + params_.branch;

View File

@ -84,6 +84,8 @@ public:
virtual void updateLabels(Buffer const &, ParIterator const &); virtual void updateLabels(Buffer const &, ParIterator const &);
/// ///
bool isMacroScope(Buffer const & buf) const; bool isMacroScope(Buffer const & buf) const;
///
docstring toolTip(BufferView const & bv, int x, int y) const;
protected: protected:
/// ///
InsetBranch(InsetBranch const &); InsetBranch(InsetBranch const &);

View File

@ -103,7 +103,9 @@ InsetCollapsable::InsetCollapsable(InsetCollapsable const & rhs)
docstring InsetCollapsable::toolTip(BufferView const & bv, int x, int y) const docstring InsetCollapsable::toolTip(BufferView const & bv, int x, int y) const
{ {
Dimension dim = dimensionCollapsed(); Dimension dim = dimensionCollapsed();
if (x > xo(bv) + dim.wid || y > yo(bv) + dim.des) if (geometry() == NoButton)
return layout_->labelstring;
else if (x > xo(bv) + dim.wid || y > yo(bv) + dim.des)
return docstring(); return docstring();
switch (status_) { switch (status_) {