mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
Give Wide() inset proper clickable area
* status.14x: updated * src/insets/insettext.[Ch]: added covers() method git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@15415 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d0b141506f
commit
4854791af8
@ -17,6 +17,7 @@
|
||||
#include "bufferparams.h"
|
||||
#include "BufferView.h"
|
||||
#include "CutAndPaste.h"
|
||||
#include "coordcache.h"
|
||||
#include "cursor.h"
|
||||
#include "debug.h"
|
||||
#include "dispatchresult.h"
|
||||
@ -224,6 +225,16 @@ void InsetText::drawSelection(PainterInfo & pi, int x, int y) const
|
||||
}
|
||||
|
||||
|
||||
bool InsetText::covers(int x, int y) const
|
||||
{
|
||||
return theCoords.getInsets().has(this)
|
||||
&& x >= xo()
|
||||
&& x <= xo() + width() + (Wide() ? text_.maxwidth_ : 0)
|
||||
&& y >= yo() - ascent()
|
||||
&& y <= yo() + descent();
|
||||
}
|
||||
|
||||
|
||||
string const InsetText::editMessage() const
|
||||
{
|
||||
return _("Opened Text Inset");
|
||||
|
@ -52,6 +52,8 @@ public:
|
||||
void draw(PainterInfo & pi, int x, int y) const;
|
||||
/// draw inset selection
|
||||
void drawSelection(PainterInfo & pi, int x, int y) const;
|
||||
/// do we cover screen position x/y?
|
||||
virtual bool covers(int x, int y) const;
|
||||
///
|
||||
std::string const editMessage() const;
|
||||
///
|
||||
|
@ -60,6 +60,8 @@ What's new
|
||||
|
||||
- Don't show starred sections in Document->Numbering & TOC (bug 2910)
|
||||
|
||||
- Make clicking in a "Wide" inset always enter that inset.
|
||||
|
||||
* Build/installation:
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user