diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:17:51 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:17:51 +0200 |
commit | 237aedc590b58c0e69d7dfcac92b5f767b7c004a (patch) | |
tree | 83f361a82ba483f2daf83b677e8685cd953812d9 /lib/custom_grid.cpp | |
parent | 4.5 (diff) | |
download | FreeFileSync-237aedc590b58c0e69d7dfcac92b5f767b7c004a.tar.gz FreeFileSync-237aedc590b58c0e69d7dfcac92b5f767b7c004a.tar.bz2 FreeFileSync-237aedc590b58c0e69d7dfcac92b5f767b7c004a.zip |
4.6
Diffstat (limited to 'lib/custom_grid.cpp')
-rw-r--r-- | lib/custom_grid.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/lib/custom_grid.cpp b/lib/custom_grid.cpp index 736bc49d..92f3b718 100644 --- a/lib/custom_grid.cpp +++ b/lib/custom_grid.cpp @@ -1080,20 +1080,23 @@ void CustomGridRim::updateGridSizes() CustomGrid::updateGridSizes(); //set row label size + if (GetRowLabelSize() > 0) + { + //SetRowLabelSize(wxGRID_AUTOSIZE); -> we can do better + wxClientDC dc(GetGridRowLabelWindow()); + dc.SetFont(GetLabelFont()); - //SetRowLabelSize(wxGRID_AUTOSIZE); -> we can do better - wxClientDC dc(GetGridRowLabelWindow()); - dc.SetFont(GetLabelFont()); + wxArrayString lines; + lines.push_back(GetRowLabelValue(GetNumberRows())); - wxArrayString lines; - lines.push_back(GetRowLabelValue(GetNumberRows())); + long width = 0; + long dummy = 0; + GetTextBoxSize(dc, lines, &width, &dummy); - long width = 0; - long dummy = 0; - GetTextBoxSize(dc, lines, &width, &dummy); + width += 8; - width += 8; - SetRowLabelSize(width); + SetRowLabelSize(width); + } } @@ -1377,7 +1380,7 @@ void CustomGridRim::setTooltip(const wxMouseEvent& event) virtual void visit(const FileMapping& fileObj) { tipMsg_ = copyStringTo<wxString>(std::wstring() + fileObj.getRelativeName<side>() + L"\n" + - _("Size") + L": " + zen::filesizeToShortString(fileObj.getFileSize<side>()) + L"\n" + + _("Size") + L": " + zen::filesizeToShortString(to<Int64>(fileObj.getFileSize<side>())) + L"\n" + _("Date") + L": " + zen::utcToLocalTimeString(fileObj.getLastWriteTime<side>())); } @@ -1449,7 +1452,7 @@ xmlAccess::ColumnAttributes CustomGridRim::getDefaultColumnAttributes() newEntry.type = xmlAccess::SIZE; newEntry.position = 4; - newEntry.width = 70; + newEntry.width = 80; defaultColumnSettings.push_back(newEntry); newEntry.type = xmlAccess::DATE; |