From 9c921617d6116c28984e9b5081ac7fc8225b5d69 Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 8 Sep 2013 16:56:43 +0000 Subject: [PATCH] ide,CtrlCore: Large icons git-svn-id: svn://ultimatepp.org/upp/trunk@6322 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CodeEditor/Highlight.cpp | 6 ++++-- uppsrc/CtrlCore/X11Top.cpp | 11 +++++------ uppsrc/CtrlCore/X11Top.h | 18 ++++++++++-------- uppsrc/ide/icon.ico | Bin 2862 -> 2862 bytes 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/uppsrc/CodeEditor/Highlight.cpp b/uppsrc/CodeEditor/Highlight.cpp index a3a5bae6b..2af89ee8b 100644 --- a/uppsrc/CodeEditor/Highlight.cpp +++ b/uppsrc/CodeEditor/Highlight.cpp @@ -248,7 +248,7 @@ int CodeEditor::InitUpp(const char **q) void CodeEditor::InitKeywords() { static const char *cpp[] = { - "namespace", "__asm", "else", "struct", + "namespace", "asm", "__asm", "else", "struct", "enum", "switch", "auto", "__except", "template", "explicit", "this", "bool", "extern", "mutable", "thread", @@ -270,7 +270,9 @@ void CodeEditor::InitKeywords() "double", "__leave", "static_cast", "dynamic_cast", "long", "__stdcall", "while", "force_inline", - // C++11 + "and", "bitor", "or", "xor", + "compl", "bitand", "and_eq", "or_eq", + "xor_eq", "not", "not_eq", "char16_t", "char32_t", "constexpr", "decltype", "noexcept", "nullptr", "static_assert", "override", "final", diff --git a/uppsrc/CtrlCore/X11Top.cpp b/uppsrc/CtrlCore/X11Top.cpp index 4e5d63834..c46986905 100644 --- a/uppsrc/CtrlCore/X11Top.cpp +++ b/uppsrc/CtrlCore/X11Top.cpp @@ -192,14 +192,14 @@ void TopWindow::SyncCaption() Ctrl *owner = GetOwner(); wm_hints->window_group = owner ? owner->GetWindow() : w; if(!icon.IsEmpty()) { - Size isz = largeicon.IsEmpty() ? icon.GetSize() : largeicon.GetSize(); + Size isz = icon.GetSize(); int len = 2 + isz.cx * isz.cy; Buffer data(len); unsigned long *t = data; *t++ = isz.cx; *t++ = isz.cy; for(int y = 0; y < isz.cy; y++) { - const RGBA *q = largeicon.IsEmpty() ? icon[y] : largeicon[y]; + const RGBA *q = icon[y]; for(int x = isz.cx; x--;) { *t++ = ((dword)q->a << 24) | (dword)q->b | ((dword)q->g << 8) | ((dword)q->r << 16); @@ -238,9 +238,8 @@ void TopWindow::CenterRect(Ctrl *owner) else r = wr; Point p = r.CenterPos(sz); - - if (p.x + sz.cx <= wr.Width() && p.y + sz.cy <= wr.Height()) { - r = RectC(p.x, p.y, sz.cx, sz.cy); + r = RectC(p.x, p.y, sz.cx, sz.cy); + if (p.x <= wr.Width() && p.y <= wr.Height()) { wr.left += fm.left; wr.right -= fm.right; wr.top += fm.top; @@ -253,8 +252,8 @@ void TopWindow::CenterRect(Ctrl *owner) r.bottom = wr.bottom; minsize.cx = min(minsize.cx, r.GetWidth()); minsize.cy = min(minsize.cy, r.GetHeight()); - SetRect(r); } + SetRect(r); } } diff --git a/uppsrc/CtrlCore/X11Top.h b/uppsrc/CtrlCore/X11Top.h index ca72c1800..5751ec1a0 100644 --- a/uppsrc/CtrlCore/X11Top.h +++ b/uppsrc/CtrlCore/X11Top.h @@ -7,15 +7,17 @@ private: XClassHint *class_hint; Size xminsize, xmaxsize; bool topmost; + + Buffer PreperIcon(const Image& icon, int& len); + + void CenterRect(Ctrl *owner); + void DefSyncTitle(); + void EndIgnoreTakeFocus(); - void CenterRect(Ctrl *owner); - void DefSyncTitle(); - void EndIgnoreTakeFocus(); + void SyncState(); - void SyncState(); + Image invert; + WString title2; - Image invert; - WString title2; - - static Rect windowFrameMargin; + static Rect windowFrameMargin; //$ }; diff --git a/uppsrc/ide/icon.ico b/uppsrc/ide/icon.ico index 4cff9502574c41f1a9581c6a4b36e1faac662d5c..70287e90bfdc966832b79b084b534582aabb297e 100644 GIT binary patch literal 2862 zcmchZOKTHR6vuC7CX>O1jZ0SsH`ZO+)Y^)VL0Y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