mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-28 06:12:53 -06:00
ide,CtrlCore: Large icons
git-svn-id: svn://ultimatepp.org/upp/trunk@6322 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
bc9b4f37ed
commit
2018228680
4 changed files with 19 additions and 16 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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<unsigned long> 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,15 +7,17 @@ private:
|
|||
XClassHint *class_hint;
|
||||
Size xminsize, xmaxsize;
|
||||
bool topmost;
|
||||
|
||||
Buffer<unsigned long> 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;
|
||||
//$ };
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Loading…
Add table
Add a link
Reference in a new issue