mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-31 07:12:39 -06:00
.cosmetics
git-svn-id: svn://ultimatepp.org/upp/trunk@7190 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
81260291d6
commit
fa46507582
10 changed files with 29 additions and 16 deletions
|
|
@ -1801,11 +1801,12 @@ bool ArrayCtrl::Key(dword key, int) {
|
|||
if(IsCursor()) {
|
||||
int d = GetEditColumn();
|
||||
int i = FindEnabled(cursor - 1, -1);
|
||||
if(i >= 0 && SetCursor0(i))
|
||||
if(i >= 0 && SetCursor0(i)) {
|
||||
if(d >= 0)
|
||||
StartEdit(d);
|
||||
else
|
||||
KeyMultiSelect(aanchor, key);
|
||||
}
|
||||
}
|
||||
else
|
||||
if((IsInserting() || IsAppending()) && IsAppendLine())
|
||||
|
|
|
|||
|
|
@ -96,11 +96,12 @@ Size BarPane::Repos(bool _horz, int maxsize)
|
|||
break;
|
||||
}
|
||||
VeHo(psz) = max(VeHo(psz), VeHo(sz));
|
||||
if(q->ctrl)
|
||||
if(q->ctrl) {
|
||||
if(horz)
|
||||
q->ctrl->LeftPos(psz.cx + hmargin, sz.cx);
|
||||
else
|
||||
q->ctrl->TopPos(psz.cy + vmargin, sz.cy);
|
||||
}
|
||||
HoVe(psz) += HoVe(sz);
|
||||
q++;
|
||||
}
|
||||
|
|
@ -110,11 +111,12 @@ Size BarPane::Repos(bool _horz, int maxsize)
|
|||
bp += 2 + 2 * bmargin;
|
||||
}
|
||||
while(f != q) {
|
||||
if(f->ctrl)
|
||||
if(f->ctrl) {
|
||||
if(horz)
|
||||
f->ctrl->TopPos(bp, psz.cy);
|
||||
else
|
||||
f->ctrl->LeftPos(bp, psz.cx);
|
||||
}
|
||||
f++;
|
||||
}
|
||||
bp += VeHo(psz);
|
||||
|
|
@ -479,16 +481,18 @@ void BarCtrl::AddCtrl(Ctrl *ctrl, Size sz)
|
|||
{
|
||||
SizeCtrl& m = sizer.DoIndex(zii++);
|
||||
LogPos p = ctrl->GetPos();
|
||||
if(p.x.IsEmpty())
|
||||
if(p.x.IsEmpty()) {
|
||||
if(sz.cx == INT_MAX)
|
||||
ctrl->HSizePos();
|
||||
else
|
||||
ctrl->HCenterPos(sz.cx ? sz.cx : MINSIZE);
|
||||
if(p.y.IsEmpty())
|
||||
}
|
||||
if(p.y.IsEmpty()) {
|
||||
if(sz.cy == INT_MAX)
|
||||
ctrl->VSizePos();
|
||||
else
|
||||
ctrl->VCenterPos(sz.cy ? sz.cy : MINSIZE);
|
||||
}
|
||||
LLOG("AddCtrl Ctrl::GetSize: " << ctrl->GetSize());
|
||||
m.SetSize(sz);
|
||||
m.AddChild(ctrl);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ DocEdit::Fmt DocEdit::Format(const WString& text) const
|
|||
*s = ' ';
|
||||
}
|
||||
x += cw;
|
||||
if(x > cx)
|
||||
if(x > cx) {
|
||||
if(space && space <= s) {
|
||||
space++;
|
||||
fmt.line.Add(int(space - fmt.text));
|
||||
|
|
@ -63,6 +63,7 @@ DocEdit::Fmt DocEdit::Format(const WString& text) const
|
|||
fmt.line.Add(int(s - fmt.text));
|
||||
x = cw;
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.fi = fi;
|
||||
return fmt;
|
||||
|
|
@ -223,11 +224,12 @@ int DocEdit::GetCursorPos(Point p) {
|
|||
void DocEdit::PlaceCaret(bool scroll) {
|
||||
Point cr = GetCaret(cursor);
|
||||
int fy = font.Info().GetLineHeight();
|
||||
if(scroll)
|
||||
if(scroll) {
|
||||
if(cursor == total)
|
||||
sb.End();
|
||||
else
|
||||
sb.ScrollInto(cr.y, fy + 2);
|
||||
}
|
||||
SetCaret(cr.x + 1, cr.y - sb, 1, fy);
|
||||
WhenSel();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,11 +225,12 @@ DropList& DropList::ValueDisplay(const Display& d)
|
|||
void DropList::Adjust()
|
||||
{
|
||||
int i = FindKey(value);
|
||||
if(i < 0)
|
||||
if(i < 0) {
|
||||
if(GetCount())
|
||||
SetIndex(0);
|
||||
else
|
||||
SetData(Null);
|
||||
}
|
||||
}
|
||||
|
||||
void DropList::Adjust(const Value& k)
|
||||
|
|
|
|||
|
|
@ -237,19 +237,20 @@ Size DrawLabel::Paint(Ctrl *ctrl, Draw& w, const Rect& r, bool visibleaccesskey)
|
|||
}
|
||||
int iy = push + (r.top + r.bottom - sz1.cy) / 2;
|
||||
|
||||
if(sz1.cx)
|
||||
if(sz1.cx) {
|
||||
if(IsNull(lcolor))
|
||||
w.DrawImage(ix, iy, DisabledImage(limg, disabled));
|
||||
else
|
||||
w.DrawImage(ix, iy, limg, lcolor);
|
||||
|
||||
}
|
||||
iy = push + (r.top + r.bottom - sz2.cy) / 2;
|
||||
ix = (IsNull(rspc) ? r.right - sz2.cx : p.x + txtsz.cx + rspc) + push;
|
||||
if(sz2.cx)
|
||||
if(sz2.cx) {
|
||||
if(IsNull(rcolor))
|
||||
w.DrawImage(ix, iy, DisabledImage(rimg, disabled));
|
||||
else
|
||||
w.DrawImage(ix, iy, rimg, rcolor);
|
||||
}
|
||||
paintrect.Paint(w, p.x + push, p.y + push, txtsz.cx, isz.cy, color, Null);
|
||||
if(*text) {
|
||||
if(disabled)
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ void LineEdit::Paint0(Draw& w) {
|
|||
LLOG("Highlight -> paper[" << q << "] = " << h.paper);
|
||||
int x = gp * fsz.cx - scx;
|
||||
int xx = x + (gp + ll) * fsz.cx;
|
||||
if(max(x, 0) < min(xx, sz.cx))
|
||||
if(max(x, 0) < min(xx, sz.cx)) {
|
||||
if(pass == 0) {
|
||||
w.DrawRect(x, y, fsz.cx * ll, fsz.cy, h.paper);
|
||||
if(bordercolumn > 0 && bordercolumn >= gp && bordercolumn < gp + ll)
|
||||
|
|
@ -195,6 +195,7 @@ void LineEdit::Paint0(Draw& w) {
|
|||
y + fascent - h.font.GetAscent(),
|
||||
~txt + q, h.font, h.ink, l, cjk ? dx2 : dx);
|
||||
}
|
||||
}
|
||||
q = p;
|
||||
gp += ll;
|
||||
if(x > sz.cx)
|
||||
|
|
|
|||
|
|
@ -511,11 +511,12 @@ void MultiButton::LeftUp(Point p, dword flags)
|
|||
push = false;
|
||||
Refresh();
|
||||
Sync();
|
||||
if(!IsNull(hl))
|
||||
if(!IsNull(hl)) {
|
||||
if(hl >= 0)
|
||||
button[hl].WhenClick();
|
||||
else
|
||||
WhenClick();
|
||||
}
|
||||
}
|
||||
|
||||
void MultiButton::MouseLeave()
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#define _CtrlLib_icpp_init_stub
|
||||
#include "CtrlCore/init"
|
||||
#include "PdfDraw/init"
|
||||
#define BLITZ_INDEX__ F2a95805f3896075b0a556396aabaf515
|
||||
#define BLITZ_INDEX__ Fa588a2a7bb40a3ed36760f6c2bef5026
|
||||
#include "CtrlLib.icpp"
|
||||
#undef BLITZ_INDEX__
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -218,12 +218,13 @@ bool Sql::Fetch() {
|
|||
session.SetStatus(SqlSession::END_FETCHING_MANY);
|
||||
}
|
||||
Stream *s = session.GetTrace();
|
||||
if(s)
|
||||
if(s) {
|
||||
if((int)total > session.traceslow)
|
||||
*s << "SLOW SQL: " << total << " ms: " << cn->statement << UPP::EOL;
|
||||
else
|
||||
if((int)fetch > session.traceslow)
|
||||
*s << "SLOW SQL: " << fetch << " ms further fetch: " << cn->statement << UPP::EOL;
|
||||
}
|
||||
cn->starttime = INT_MAX;
|
||||
return b;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,11 +45,12 @@ void SqlCompile(const char *&s, StringBuffer *r, byte dialect)
|
|||
*r << '.';
|
||||
break;
|
||||
case SQLC_AS:
|
||||
if(r)
|
||||
if(r) {
|
||||
if(dialect & (MSSQL | PGSQL))
|
||||
*r << " as ";
|
||||
else
|
||||
*r << ' ';
|
||||
}
|
||||
break;
|
||||
case SQLC_COMMA:
|
||||
if(r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue