mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
ide: LayDes ctrl scrolling remove (it intefered with normal use of ctrl)
This commit is contained in:
parent
f303c88216
commit
1c87236c19
2 changed files with 5 additions and 30 deletions
|
|
@ -357,8 +357,6 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
int Zoom = 0;
|
int Zoom = 0;
|
||||||
Point scroll_start = Null;
|
|
||||||
Point scroll_base;
|
|
||||||
|
|
||||||
Rect CtrlRect(Ctrl::LogPos pos, Size sz);
|
Rect CtrlRect(Ctrl::LogPos pos, Size sz);
|
||||||
Rect CtrlRectZ(Ctrl::LogPos pos, Size sz);
|
Rect CtrlRectZ(Ctrl::LogPos pos, Size sz);
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ void LayDes::PaintLayoutItems(Draw& w, int layid, Size size, Index<int>& passed,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(show) {
|
if(show) {
|
||||||
w.Clipoff(r);
|
w.Clipoff(r);
|
||||||
if(lrs[i] < 0)
|
if(lrs[i] < 0)
|
||||||
|
|
@ -401,8 +401,6 @@ int LayDes::FindItem(Point p, bool cursor_first)
|
||||||
|
|
||||||
Image LayDes::CursorImage(Point p, dword keyflags)
|
Image LayDes::CursorImage(Point p, dword keyflags)
|
||||||
{
|
{
|
||||||
if(keyflags & K_CTRL)
|
|
||||||
return IsNull(scroll_start) ? IconDesImg::MoveCursor() : IconDesImg::MoveMove();
|
|
||||||
int hi;
|
int hi;
|
||||||
if(HasCapture())
|
if(HasCapture())
|
||||||
hi = draghandle;
|
hi = draghandle;
|
||||||
|
|
@ -447,7 +445,7 @@ Ctrl::LogPos MakeLogPos(Ctrl::LogPos p, const Rect& r, Size sz)
|
||||||
struct IDisplay : public Display {
|
struct IDisplay : public Display {
|
||||||
Color paper, ink;
|
Color paper, ink;
|
||||||
Font font;
|
Font font;
|
||||||
|
|
||||||
Size GetStdSize(const Value& q) const {
|
Size GetStdSize(const Value& q) const {
|
||||||
Size sz = GetSmartTextSize(~q, font);
|
Size sz = GetSmartTextSize(~q, font);
|
||||||
sz.cx += 2 * DPI(4);
|
sz.cx += 2 * DPI(4);
|
||||||
|
|
@ -614,18 +612,9 @@ void LayDes::LeftDown(Point p, dword keyflags)
|
||||||
SetCapture();
|
SetCapture();
|
||||||
LayoutData& l = CurrentLayout();
|
LayoutData& l = CurrentLayout();
|
||||||
draglayoutsize = l.size;
|
draglayoutsize = l.size;
|
||||||
|
|
||||||
if(keyflags & K_CTRL) {
|
|
||||||
scroll_start = p;
|
|
||||||
scroll_base = sb;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
p = Normalize(p);
|
p = Normalize(p);
|
||||||
|
|
||||||
draghandle = FindHandle(p);
|
draghandle = FindHandle(p);
|
||||||
dragbase = ZPoint(p);
|
dragbase = ZPoint(p);
|
||||||
|
|
||||||
if(draghandle >= 0)
|
if(draghandle >= 0)
|
||||||
StoreItemRects();
|
StoreItemRects();
|
||||||
else {
|
else {
|
||||||
|
|
@ -685,16 +674,8 @@ void LayDes::MouseMove(Point p, dword keyflags)
|
||||||
{
|
{
|
||||||
if(!HasCapture() || IsNull(currentlayout))
|
if(!HasCapture() || IsNull(currentlayout))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(!IsNull(scroll_start)) {
|
|
||||||
sb = scroll_base + scroll_start - p;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Point pz = Normalize(p);
|
Point pz = Normalize(p);
|
||||||
|
|
||||||
p = ZPoint(pz);
|
p = ZPoint(pz);
|
||||||
|
|
||||||
LayoutData& l = CurrentLayout();
|
LayoutData& l = CurrentLayout();
|
||||||
bool smallmove = max(abs(p.x - dragbase.x), abs(p.y - dragbase.y)) < 4;
|
bool smallmove = max(abs(p.x - dragbase.x), abs(p.y - dragbase.y)) < 4;
|
||||||
if(draghandle == 14) {
|
if(draghandle == 14) {
|
||||||
|
|
@ -799,10 +780,6 @@ void LayDes::MouseMove(Point p, dword keyflags)
|
||||||
|
|
||||||
void LayDes::LeftUp(Point p, dword keyflags)
|
void LayDes::LeftUp(Point p, dword keyflags)
|
||||||
{
|
{
|
||||||
if(!IsNull(scroll_start)) {
|
|
||||||
scroll_start = Null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(draghandle == 11 && (keyflags & (K_SHIFT|K_CTRL)) == 0)
|
if(draghandle == 11 && (keyflags & (K_SHIFT|K_CTRL)) == 0)
|
||||||
SelectOne(FindItem(ZPoint(Normalize(p))), 0);
|
SelectOne(FindItem(ZPoint(Normalize(p))), 0);
|
||||||
draghandle = -1;
|
draghandle = -1;
|
||||||
|
|
@ -1417,10 +1394,10 @@ void LayDes::SortItems()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while(swap);
|
while(swap);
|
||||||
|
|
||||||
int ii = cursor[0];
|
int ii = cursor[0];
|
||||||
l.item.InsertPick(ii, pick(item));
|
l.item.InsertPick(ii, pick(item));
|
||||||
|
|
||||||
cursor.Clear();
|
cursor.Clear();
|
||||||
for(int i = 0; i < count; i++)
|
for(int i = 0; i < count; i++)
|
||||||
cursor.Add(i + ii);
|
cursor.Add(i + ii);
|
||||||
|
|
@ -1825,4 +1802,4 @@ bool LayDes::DoKey(dword key, int count)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return MenuBar::Scan(THISBACK(LayoutMenu), key);
|
return MenuBar::Scan(THISBACK(LayoutMenu), key);
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue