mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 05:01:49 +00:00
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:
parent
5c3f36a25e
commit
6820d18e11
@ -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;
|
||||||
|
@ -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 &);
|
||||||
|
@ -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_) {
|
||||||
|
Loading…
Reference in New Issue
Block a user