mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -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)
|
void TextCompareCtrl::LeftRepeat(Point pt, dword keyflags)
|
||||||
{
|
{
|
||||||
if(HasCapture())
|
if(HasCapture())
|
||||||
|
|
@ -533,7 +541,7 @@ void TextCompareCtrl::Paint(Draw& draw)
|
||||||
draw.End();
|
draw.End();
|
||||||
draw.DrawRect(0, lcy, n_width, sz.cy - lcy, number_bg);
|
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);
|
RichText txt = ParseQTF(blame_qtf);
|
||||||
txt.ApplyZoom(GetRichTextStdScreenZoom());
|
txt.ApplyZoom(GetRichTextStdScreenZoom());
|
||||||
int cx = clamp(txt.GetWidth(), 10, sz.cx - n_width);
|
int cx = clamp(txt.GetWidth(), 10, sz.cx - n_width);
|
||||||
|
|
|
||||||
|
|
@ -30,19 +30,20 @@ Vector<String> GetStringLineMap(const String &s);
|
||||||
|
|
||||||
class TextCompareCtrl : public Ctrl {
|
class TextCompareCtrl : public Ctrl {
|
||||||
public:
|
public:
|
||||||
virtual void Paint(Draw& draw);
|
void Paint(Draw& draw) override;
|
||||||
virtual void Layout();
|
void Layout() override;
|
||||||
virtual void MouseWheel(Point pt, int zdelta, dword keyflags);
|
void MouseWheel(Point pt, int zdelta, dword keyflags) override;
|
||||||
virtual void HorzMouseWheel(Point pt, int zdelta, dword keyflags);
|
void HorzMouseWheel(Point pt, int zdelta, dword keyflags) override;
|
||||||
virtual void MouseMove(Point pt, dword keyflags);
|
void MouseMove(Point pt, dword keyflags) override;
|
||||||
virtual void LeftDown(Point pt, dword keyflags);
|
void MouseLeave() override;
|
||||||
virtual void LeftDouble(Point pt, dword keyflags);
|
void LeftDown(Point pt, dword keyflags) override;
|
||||||
virtual void LeftUp(Point pt, dword keyflags);
|
void LeftDouble(Point pt, dword keyflags) override;
|
||||||
virtual void LeftRepeat(Point pt, dword keyflags);
|
void LeftUp(Point pt, dword keyflags) override;
|
||||||
virtual void RightDown(Point p, dword keyflags);
|
void LeftRepeat(Point pt, dword keyflags) override;
|
||||||
virtual Image CursorImage(Point p, dword keyflags);
|
void RightDown(Point p, dword keyflags) override;
|
||||||
virtual bool Key(dword key, int repcnt);
|
Image CursorImage(Point p, dword keyflags) override;
|
||||||
virtual void LostFocus();
|
bool Key(dword key, int repcnt) override;
|
||||||
|
void LostFocus() override;
|
||||||
|
|
||||||
struct Blame : Moveable<Blame> {
|
struct Blame : Moveable<Blame> {
|
||||||
String hash;
|
String hash;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue