Skip to content

Commit 50924b7

Browse files
committed
[ADD] : add right align size column (#187)
1 parent 670a812 commit 50924b7

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/gui/DemoDialog.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -721,12 +721,16 @@ void DemoDialog::display(const ImVec4& vDisplayRect) {
721721
struct stat statInfos = {};
722722
int result = stat(bin_file_path_name.c_str(), &statInfos);
723723
if (!result) {
724-
vFileInfosPtr->tooltipMessage = toStr("%s : %s\n%s : %s", //
725-
(vFileInfosPtr->fileNameLevels[0] + ".gltf").c_str(), //
726-
IGFD::Utils::FormatFileSize(vFileInfosPtr->fileSize).c_str(), //
727-
(vFileInfosPtr->fileNameLevels[0] + ".bin").c_str(), //
728-
IGFD::Utils::FormatFileSize((size_t)statInfos.st_size).c_str()); //
729-
vFileInfosPtr->tooltipColumn = 1;
724+
const auto fileSize = IGFD::Utils::FormatFileSize(vFileInfosPtr->fileSize);
725+
const auto statInfosSize = IGFD::Utils::FormatFileSize((size_t)statInfos.st_size);
726+
vFileInfosPtr->tooltipMessage = toStr("%s : %s %s\n%s : %s %s", //
727+
(vFileInfosPtr->fileNameLevels[0] + ".gltf").c_str(), //
728+
fileSize.first.c_str(), //
729+
fileSize.second.c_str(), //
730+
(vFileInfosPtr->fileNameLevels[0] + ".bin").c_str(), //
731+
statInfosSize.first.c_str(), //
732+
statInfosSize.second.c_str()); //
733+
vFileInfosPtr->tooltipColumn = 2; // size column
730734
vFileInfosPtr->fileSize += (size_t)statInfos.st_size;
731735
} else {
732736
// no bin, so escaped.

0 commit comments

Comments
 (0)