diff --git a/uppsrc/Core/heap.cpp b/uppsrc/Core/heap.cpp index fa85e50bb..49fb352ee 100644 --- a/uppsrc/Core/heap.cpp +++ b/uppsrc/Core/heap.cpp @@ -311,8 +311,8 @@ void *operator new[](size_t size, const std::nothrow_t&) noexcept { void *ptr = void operator delete[](void *ptr, const std::nothrow_t&) noexcept { UPP::MemoryFree(ptr); } #if defined(PLATFORM_WIN32) && defined(COMPILER_CLANG) -// this is temporary fix before llvm-mingw fixes weak references -// void __attribute__((__noreturn__)) std::__throw_bad_alloc (void) { throw bad_alloc(); } +// this is temporary fix before llvm-mingw fixes weak references + void __attribute__((__noreturn__)) std::__throw_bad_alloc (void) { throw bad_alloc(); } #endif #endif diff --git a/uppsrc/CtrlLib/Ch.cpp b/uppsrc/CtrlLib/Ch.cpp index 44cb00ee4..f18249f06 100644 --- a/uppsrc/CtrlLib/Ch.cpp +++ b/uppsrc/CtrlLib/Ch.cpp @@ -545,8 +545,12 @@ void ChSynthetic(Image *button100x100, Color *text, bool macos) ib[i][0] = AdjustColor(c, a[i]); ibb[i][0] = Blend(SColorFace(), SColorPaper(), i * 255 / 7); } - s.hchunk = MakeButton(roundness, Magnify(ib, 10, 1), DPI(1), ink); - s.hlook = MakeButton(roundness, Magnify(ibb, 10, 1), DPI(1), ink); + Image m = MakeButton(roundness, Magnify(ib, 10, 1), DPI(1), ink); + s.hchunk = m; + s.vchunk = RotateAntiClockwise(m); + m = MakeButton(roundness, Magnify(ibb, 10, 1), DPI(1), ink); + s.hlook = m; + s.vlook = RotateAntiClockwise(m); s.bound = true; s.nomargins = true; } diff --git a/uppsrc/CtrlLib/Progress.cpp b/uppsrc/CtrlLib/Progress.cpp index ef6ff9abb..658812740 100644 --- a/uppsrc/CtrlLib/Progress.cpp +++ b/uppsrc/CtrlLib/Progress.cpp @@ -13,11 +13,21 @@ CH_STYLE(ProgressIndicator, Style, StyleDefault) nomargins = false; } +Rect ProgressIndicator::GetMargins() +{ + if(style->classic || percent || !IsNull(color)) + return ChMargins(ViewEdge()); + Size sz = GetSize(); + Rect r = ChMargins(sz.cx > sz.cy ? style->hlook : style->vlook); + if(style->nomargins) + r.left = r.right = r.top = r.bottom = 0; + return r; +} + Size ProgressIndicator::GetMsz() { Size sz = GetSize(); - Rect mg = ChMargins(style->classic || percent || !IsNull(color) ? EditFieldEdge() - : sz.cx > sz.cy ? style->hlook : style->vlook); + Rect mg = GetMargins(); sz.cx -= mg.left + mg.right; sz.cy -= mg.top + mg.bottom; return sz; @@ -38,8 +48,8 @@ void ProgressIndicator::Paint(Draw& w) { } } if(style->classic || percent || !IsNull(color)) { - ChPaintEdge(w, sz, EditFieldEdge()); - Rect mg = ChMargins(EditFieldEdge()); + ChPaintEdge(w, sz, ViewEdge()); + Rect mg = GetMargins(); sz -= Size(mg.left + mg.right, mg.top + mg.bottom); Rect r1, r2, r3; r1 = r2 = r3 = RectC(mg.left, mg.top, sz.cx, sz.cy); @@ -47,12 +57,10 @@ void ProgressIndicator::Paint(Draw& w) { if(sz.cx > sz.cy) { r1.right = r2.left = min(p, sz.cx) + mg.left + p0; r3.right = mg.left + p0; - r3.bottom = r1.bottom; } else { - r2.bottom = r1.top = sz.cy - min(p, sz.cy) + mg.left + p0; - r3.bottom = mg.top + p0; - r3.right = r1.right; + r2.bottom = r1.top = sz.cy - min(p, sz.cy) + mg.top - p0; + r3.top = r3.bottom - p0; } w.DrawRect(r1, Nvl(color, SColorHighlight())); w.DrawRect(r2, SColorPaper); @@ -72,23 +80,17 @@ void ProgressIndicator::Paint(Draw& w) { w.End(); } else { - if(sz.cy > sz.cx) { - ChPaint(w, sz, style->vlook); - Rect r = ChMargins(style->vlook); - if(style->nomargins) - r.left = r.right = r.top = r.bottom = 0; - w.Clip(r.left, r.top, sz.cx - r.left - r.right, sz.cy - r.top - r.bottom); - ChPaint(w, r.left, sz.cy - r.bottom - p - p0, sz.cx - r.left - r.right, p, - style->vchunk); - } - else { + Rect r = GetMargins(); + if(sz.cx > sz.cy) { ChPaint(w, sz, style->hlook); - Rect r = ChMargins(style->hlook); - if(style->nomargins) - r.left = r.right = r.top = r.bottom = 0; w.Clip(r.left, r.top, sz.cx - r.left - r.right, sz.cy - r.top - r.bottom); ChPaint(w, r.left + p0, r.top, p, sz.cy - r.top - r.bottom, style->hchunk); } + else { + ChPaint(w, sz, style->vlook); + w.Clip(r.left, r.top, sz.cx - r.left - r.right, sz.cy - r.top - r.bottom); + ChPaint(w, r.left, sz.cy - r.bottom - p - p0, sz.cx - r.left - r.right, p, style->vchunk); + } w.End(); } } diff --git a/uppsrc/CtrlLib/Progress.h b/uppsrc/CtrlLib/Progress.h index 09ae284fd..0990dc834 100644 --- a/uppsrc/CtrlLib/Progress.h +++ b/uppsrc/CtrlLib/Progress.h @@ -18,6 +18,7 @@ protected: const Style *style; Color color; + Rect GetMargins(); Size GetMsz(); public: diff --git a/uppsrc/GLCtrl/GLCtrl.upp b/uppsrc/GLCtrl/GLCtrl.upp index e3aba5572..d18da7447 100644 --- a/uppsrc/GLCtrl/GLCtrl.upp +++ b/uppsrc/GLCtrl/GLCtrl.upp @@ -2,7 +2,7 @@ uses CtrlCore, plugin/glew; -library(WIN32 (GCC | CLANG)) "glaux glu32 opengl32"; +library(WIN32 (GCC | CLANG)) "glu32 opengl32"; pkg_config(LINUX | BSD) "gl glu"; diff --git a/uppsrc/ide/Builders/GccBuilder.cpp b/uppsrc/ide/Builders/GccBuilder.cpp index 432f17616..75edf2b3b 100644 --- a/uppsrc/ide/Builders/GccBuilder.cpp +++ b/uppsrc/ide/Builders/GccBuilder.cpp @@ -129,7 +129,9 @@ bool GccBuilder::BuildPackage(const String& package, Vector& linkfile, V } String cc = CmdLine(package, pkg); - + + if(IsVerbose()) + cc << " -v"; if(HasFlag("WIN32")/* && HasFlag("MT")*/) cc << " -mthreads"; if(HasFlag("DEBUG_MINIMAL")) @@ -478,7 +480,9 @@ bool GccBuilder::Link(const Vector& linkfile, const String& linkoptions, for(int i = 0; i < linkfile.GetCount(); i++) if(GetFileTime(linkfile[i]) > targettime) { Vector lib; - String lnk = CompilerName(); + String lnk; + if(IsVerbose()) + lnk << " -v"; if(HasFlag("GCC32")) lnk << " -m32"; if(HasFlag("DLL")) @@ -578,6 +582,16 @@ bool GccBuilder::Link(const Vector& linkfile, const String& linkoptions, PutConsole("Linking..."); bool error = false; CustomStep(".pre-link", Null, error); + if(lnk.GetCount() < 8000) + lnk = CompilerName() + " " + lnk; + else { + String rn = CatAnyPath(outdir, "link"); + PutVerbose("Generating response file: " << rn); + PutVerbose(lnk); + lnk.Replace("\\", "/"); + SaveFile(rn, lnk); + lnk = CompilerName() + " @" + rn; + } if(!error && Execute(lnk) == 0) { CustomStep(".post-link", Null, error); PutConsole(String().Cat() << GetHostPath(target) << " (" << GetFileInfo(target).length