From de7ac87d76ceede1f14610efcaaf83fc138e89c1 Mon Sep 17 00:00:00 2001 From: cxl Date: Sat, 14 Sep 2019 08:25:08 +0000 Subject: [PATCH] CtrlLib: Fixed several issues git-svn-id: svn://ultimatepp.org/upp/trunk@13604 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlLib/FileList.cpp | 4 ++-- uppsrc/CtrlLib/FileSel.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/uppsrc/CtrlLib/FileList.cpp b/uppsrc/CtrlLib/FileList.cpp index 2c4ee1540..29078d1e1 100644 --- a/uppsrc/CtrlLib/FileList.cpp +++ b/uppsrc/CtrlLib/FileList.cpp @@ -122,13 +122,13 @@ void FileList::Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const { const File& m = ValueTo(q); - w.DrawRect(r, paper); + bool inv = ((style & Display::SELECT) || (style & Display::CURSOR)) && (style & Display::FOCUS); + w.DrawRect(r, inv ? SColorHighlight() : paper); int x = r.left + 2; w.DrawImage(x, r.top + (r.Height() - m.icon.GetSize().cy) / 2, m.icon); x += iconwidth; x += 2; FontInfo fi = m.font.Info(); - bool inv = (style & Display::SELECT) && (style & Display::FOCUS); DrawFileName(w, x, r.top + (r.Height() - fi.GetHeight()) / 2, r.right - x - 2, r.Height(), WString(m.name), m.isdir, m.font, inv ? SColorHighlightText : m.ink, diff --git a/uppsrc/CtrlLib/FileSel.cpp b/uppsrc/CtrlLib/FileSel.cpp index 8035e95b7..1c7a82c70 100644 --- a/uppsrc/CtrlLib/FileSel.cpp +++ b/uppsrc/CtrlLib/FileSel.cpp @@ -1496,6 +1496,7 @@ void FileSel::FileUpdate() { } void FileSel::Rename(const String& on, const String& nn) { + #ifdef PLATFORM_WIN32 if(FileMove(FilePath(on), FilePath(nn))) #else