mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-09 03:24:59 -06:00
GridCtrl: Fixed scrolling artifacts when enabling summary row in runtime (thx Lance!)
git-svn-id: svn://ultimatepp.org/upp/trunk@5876 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
31062428be
commit
5919671f68
2 changed files with 12 additions and 10 deletions
|
|
@ -18,7 +18,7 @@ GridCtrl::GridCtrl() : holder(*this)
|
|||
fixed_click = false;
|
||||
fixed_top_click = false;
|
||||
fixed_left_click = false;
|
||||
fixed_size_changed = true;
|
||||
size_changed = true;
|
||||
|
||||
resize_panel_open = false;
|
||||
|
||||
|
|
@ -1604,7 +1604,7 @@ void GridCtrl::DrawHorzDragLine(Draw &w, int pos, int cx, int size, Color c)
|
|||
//w.DrawRect(pos, 0, cx / 2, size - 1, Color(100, 100, 100, 100);
|
||||
DrawFrame(w, pos + 1, 1, cx / 2 - 2, size - 2, c);
|
||||
DrawFrame(w, pos, 0, cx / 2, size, c);
|
||||
// DrawFatFrame(w, x, 0,¸ int cx¸ int cy¸ Color color¸ int n)
|
||||
// DrawFatFrame(w, x, 0,<EFBFBD> int cx<63> int cy<63> Color color<6F> int n)
|
||||
}
|
||||
|
||||
void GridCtrl::DrawVertDragLine(Draw &w, int pos, int size, int dx, Color c)
|
||||
|
|
@ -3332,11 +3332,11 @@ Image GridCtrl::CursorImage(Point p, dword keyflags)
|
|||
|
||||
void GridCtrl::UpdateHolder(bool force)
|
||||
{
|
||||
if(fixed_size_changed || force)
|
||||
if(size_changed || force)
|
||||
{
|
||||
holder.SetOffset(Point(fixed_width, fixed_height));
|
||||
holder.HSizePos(fixed_width, 0).VSizePos(fixed_height, summary_height);
|
||||
fixed_size_changed = false;
|
||||
size_changed = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3904,8 +3904,12 @@ bool GridCtrl::UpdateSizes()
|
|||
{
|
||||
total_width = total_cols ? hitems[total_cols - 1].nRight() : 0;
|
||||
total_height = total_rows ? vitems[total_rows - 1].nRight() : 0;
|
||||
|
||||
int prev_summary_height = summary_height;
|
||||
|
||||
summary_height = summary_row ? GD_HDR_HEIGHT : 0;
|
||||
|
||||
size_changed = prev_summary_height != summary_height;
|
||||
|
||||
int new_fixed_width = fixed_cols ? hitems[fixed_cols - 1].nRight() : 0;
|
||||
int new_fixed_height = fixed_rows ? vitems[fixed_rows - 1].nRight() : 0;
|
||||
|
|
@ -3921,21 +3925,19 @@ bool GridCtrl::UpdateSizes()
|
|||
if(fixed_cols == 1 && !indicator)
|
||||
new_fixed_width = 0;
|
||||
|
||||
fixed_size_changed = false;
|
||||
|
||||
if(new_fixed_width != fixed_width)
|
||||
{
|
||||
fixed_width = new_fixed_width;
|
||||
fixed_size_changed = true;
|
||||
size_changed = true;
|
||||
}
|
||||
|
||||
if(new_fixed_height != fixed_height)
|
||||
{
|
||||
fixed_height = new_fixed_height;
|
||||
fixed_size_changed = true;
|
||||
size_changed = true;
|
||||
}
|
||||
|
||||
return fixed_size_changed;
|
||||
return size_changed;
|
||||
}
|
||||
|
||||
bool GridCtrl::UpdateCols(bool force)
|
||||
|
|
|
|||
|
|
@ -959,7 +959,7 @@ class GridCtrl : public Ctrl
|
|||
bool fixed_click;
|
||||
bool fixed_top_click;
|
||||
bool fixed_left_click;
|
||||
bool fixed_size_changed;
|
||||
bool size_changed;
|
||||
bool top_click;
|
||||
bool just_clicked;
|
||||
bool synced;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue