mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
TextDiffCtrl: Fixed blame 'popup'
This commit is contained in:
parent
0105cb1818
commit
c79217cd4d
2 changed files with 23 additions and 14 deletions
|
|
@ -140,6 +140,14 @@ void TextCompareCtrl::MouseMove(Point pt, dword flags)
|
|||
}
|
||||
}
|
||||
|
||||
void Upp::TextCompareCtrl::MouseLeave()
|
||||
{
|
||||
if(blame_line >= 0) {
|
||||
blame_line = -1;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void TextCompareCtrl::LeftRepeat(Point pt, dword keyflags)
|
||||
{
|
||||
if(HasCapture())
|
||||
|
|
@ -533,7 +541,7 @@ void TextCompareCtrl::Paint(Draw& draw)
|
|||
draw.End();
|
||||
draw.DrawRect(0, lcy, n_width, sz.cy - lcy, number_bg);
|
||||
|
||||
if(blame_y >= 0) {
|
||||
if(blame_y >= 0 && HasMouse()) {
|
||||
RichText txt = ParseQTF(blame_qtf);
|
||||
txt.ApplyZoom(GetRichTextStdScreenZoom());
|
||||
int cx = clamp(txt.GetWidth(), 10, sz.cx - n_width);
|
||||
|
|
|
|||
|
|
@ -30,19 +30,20 @@ Vector<String> GetStringLineMap(const String &s);
|
|||
|
||||
class TextCompareCtrl : public Ctrl {
|
||||
public:
|
||||
virtual void Paint(Draw& draw);
|
||||
virtual void Layout();
|
||||
virtual void MouseWheel(Point pt, int zdelta, dword keyflags);
|
||||
virtual void HorzMouseWheel(Point pt, int zdelta, dword keyflags);
|
||||
virtual void MouseMove(Point pt, dword keyflags);
|
||||
virtual void LeftDown(Point pt, dword keyflags);
|
||||
virtual void LeftDouble(Point pt, dword keyflags);
|
||||
virtual void LeftUp(Point pt, dword keyflags);
|
||||
virtual void LeftRepeat(Point pt, dword keyflags);
|
||||
virtual void RightDown(Point p, dword keyflags);
|
||||
virtual Image CursorImage(Point p, dword keyflags);
|
||||
virtual bool Key(dword key, int repcnt);
|
||||
virtual void LostFocus();
|
||||
void Paint(Draw& draw) override;
|
||||
void Layout() override;
|
||||
void MouseWheel(Point pt, int zdelta, dword keyflags) override;
|
||||
void HorzMouseWheel(Point pt, int zdelta, dword keyflags) override;
|
||||
void MouseMove(Point pt, dword keyflags) override;
|
||||
void MouseLeave() override;
|
||||
void LeftDown(Point pt, dword keyflags) override;
|
||||
void LeftDouble(Point pt, dword keyflags) override;
|
||||
void LeftUp(Point pt, dword keyflags) override;
|
||||
void LeftRepeat(Point pt, dword keyflags) override;
|
||||
void RightDown(Point p, dword keyflags) override;
|
||||
Image CursorImage(Point p, dword keyflags) override;
|
||||
bool Key(dword key, int repcnt) override;
|
||||
void LostFocus() override;
|
||||
|
||||
struct Blame : Moveable<Blame> {
|
||||
String hash;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue