GridCtrl: .usc fixed

git-svn-id: svn://ultimatepp.org/upp/trunk@14096 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-02-26 22:12:06 +00:00
commit b87e6fe940
2 changed files with 34 additions and 34 deletions

View file

@ -829,7 +829,13 @@ ctrl EditTimeSpin {
fn DrawArrowButton(w, rr, dir)
{
DrawEdgeButton(w, rr);
DrawVertArrow(w, rr, (rr.right - rr.left) / 5, dir);
DrawVertArrow(w, rr, OptionSize() / 3, dir);
}
fn DrawHArrowButton(w, rr, dir)
{
DrawEdgeButton(w, rr);
DrawHorzArrow(w, rr, dir);
}
fn DrawDropButton(w, rr)
@ -837,6 +843,31 @@ fn DrawDropButton(w, rr)
DrawArrowButton(w, rr, -1);
}
fn PaintVScrollBar(w, r)
{
wd = r.right - r.left;
up = r;
r.top = (up.bottom = up.top + wd);
down = r;
r.bottom = (down.top = down.bottom - wd);
DrawArrowButton(w, up, 1);
DrawArrowButton(w, down, -1);
w.DrawRect(r, :SWhiteGray);
}
fn PaintHScrollBar(w, r)
{
hg = r.bottom - r.top;
left = r;
r.left = (left.right = left.left + hg);
right = r;
r.right = (right.left = right.right - hg);
DrawHArrowButton(w, left, 1);
DrawHArrowButton(w, right, -1);
w.DrawRect(r, :SWhiteGray);
}
ctrl DropList {
group "Input fields";
@ -961,18 +992,6 @@ fn PaintCenterText(w, x, y, text, fnt, color)
w.DrawText(x - sz.cx / 2, y - sz.cy / 2, text, fnt, color);
}
fn PaintVScrollBar(w, r)
{
wd = r.right - r.left;
up = r;
r.top = (up.bottom = up.top + wd);
down = r;
r.bottom = (down.top = down.bottom - wd);
DrawArrowButton(w, up, 1);
DrawArrowButton(w, down, -1);
w.DrawRect(r, :SWhiteGray);
}
ctrl ArrayCtrl {
group "Complex";

View file

@ -1,30 +1,11 @@
fn PaintVertSb(w, r)
{
wd = r.right - r.left;
up = r;
r.top = (up.bottom = up.top + wd);
down = r;
r.bottom = (down.top = down.bottom - wd);
DrawButtonFrame(w, up);
PaintRcCenterImage(w, up, "ClassicCtrlsImg::UA");
DrawButtonFrame(w, down);
PaintRcCenterImage(w, down, "ClassicCtrlsImg::DA");
w.DrawRect(r, :SWhiteGray);
PaintVScrollBar(w, r);
}
fn PaintHorzSb(w, r)
{
hg = r.bottom - r.top;
left = r;
r.left = (left.right = left.left + hg);
right = r;
r.right = (right.left = right.right - hg);
w.DrawRect(left, :SLtGray);
DrawButtonFrame(w, left);
PaintRcCenterImage(w, left, "ClassicCtrlsImg::LA");
DrawButtonFrame(w, right);
PaintRcCenterImage(w, right, "ClassicCtrlsImg::RA");
w.DrawRect(r, :SWhiteGray);
PaintHScrollBar(w, r);
}
fn PaintHeader(w, r, text, sorting = 0)