summaryrefslogtreecommitdiff
path: root/ui/tree_view.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:20:07 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:20:07 +0200
commit88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170 (patch)
treec6c5babb49b90293380106b81ae5c446959ac70f /ui/tree_view.cpp
parent5.3 (diff)
downloadFreeFileSync-88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170.tar.gz
FreeFileSync-88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170.tar.bz2
FreeFileSync-88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170.zip
5.4
Diffstat (limited to 'ui/tree_view.cpp')
-rw-r--r--ui/tree_view.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/ui/tree_view.cpp b/ui/tree_view.cpp
index b3a9595a..ea73d979 100644
--- a/ui/tree_view.cpp
+++ b/ui/tree_view.cpp
@@ -9,6 +9,7 @@
#include <wx/settings.h>
#include <wx/menu.h>
#include <zen/i18n.h>
+#include <zen/utf.h>
#include <zen/stl_tools.h>
#include <wx+/format_unit.h>
#include <wx+/rtl.h>
@@ -336,7 +337,7 @@ void TreeView::updateView(Predicate pred)
if (root.firstFile || !root.subDirs.empty())
{
root.baseMap = baseObj;
- compressNode(root);
+ this->compressNode(root); //"this->" required by two-pass lookup as enforced by GCC 4.7
}
else
newView.pop_back();
@@ -656,18 +657,18 @@ private:
case COL_TYPE_NAVI_DIRECTORY:
if (const TreeView::RootNode* root = dynamic_cast<const TreeView::RootNode*>(node.get()))
{
- const wxString dirLeft = utf8CvrtTo<wxString>(beforeLast(root->baseMap_.getBaseDirPf<LEFT_SIDE >(), FILE_NAME_SEPARATOR));
- const wxString dirRight = utf8CvrtTo<wxString>(beforeLast(root->baseMap_.getBaseDirPf<RIGHT_SIDE>(), FILE_NAME_SEPARATOR));
+ const wxString dirLeft = utfCvrtTo<wxString>(beforeLast(root->baseMap_.getBaseDirPf<LEFT_SIDE >(), FILE_NAME_SEPARATOR));
+ const wxString dirRight = utfCvrtTo<wxString>(beforeLast(root->baseMap_.getBaseDirPf<RIGHT_SIDE>(), FILE_NAME_SEPARATOR));
if (dirLeft.empty())
return dirRight;
else if (dirRight.empty())
return dirLeft;
else
- return utf8CvrtTo<wxString>(dirLeft + L" \x2212 " + dirRight); //\x2212 = unicode minus
+ return utfCvrtTo<wxString>(dirLeft + L" \x2212 " + dirRight); //\x2212 = unicode minus
}
else if (const TreeView::DirNode* dir = dynamic_cast<const TreeView::DirNode*>(node.get()))
- return utf8CvrtTo<wxString>(dir->dirObj_.getObjShortName());
+ return utfCvrtTo<wxString>(dir->dirObj_.getObjShortName());
else if (dynamic_cast<const TreeView::FilesNode*>(node.get()))
return _("Files");
break;
@@ -801,6 +802,8 @@ private:
dc.SetBrush(*wxTRANSPARENT_BRUSH);
dc.DrawRectangle(areaPerc);
}
+
+ wxDCTextColourChanger dummy3(dc, *wxBLACK); //accessibility: always set both foreground AND background colors!
dc.DrawLabel(numberTo<wxString>(node->percent_) + L"%", areaPerc, wxALIGN_CENTER);
rectTmp.x += widthPercentBar + 2 * CELL_BORDER;
@@ -816,7 +819,8 @@ private:
wxRect rectStat(rectTmp.GetTopLeft(), wxSize(bmp.GetWidth(), bmp.GetHeight()));
rectStat.y += (rectTmp.height - rectStat.height) / 2;
- clearArea(dc, rectStat, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+ //clearArea(dc, rectStat, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+ clearArea(dc, rectStat, *wxWHITE); //accessibility: always set both foreground AND background colors!
drawBitmapRtlMirror(dc, bmp, rectStat, wxALIGN_CENTER, buffer);
};
bgstack15