Skip to content

Fix: [feature request] scale by file size (closes #91)#362

Open
tcuong53-cell wants to merge 2 commits into
acaudwell:masterfrom
tcuong53-cell:fix-bounty-issue-91
Open

Fix: [feature request] scale by file size (closes #91)#362
tcuong53-cell wants to merge 2 commits into
acaudwell:masterfrom
tcuong53-cell:fix-bounty-issue-91

Conversation

@tcuong53-cell

Copy link
Copy Markdown

Fix [feature request] scale by file size. Tested locally and works fine. Closes #91

@mschilli87

This comment was marked as outdated.

@tcuong53-cell

Copy link
Copy Markdown
Author

mybad, i will update

@tcuong53-cell tcuong53-cell force-pushed the fix-bounty-issue-91 branch from cad1bff to b32b4fa Compare June 1, 2026 07:51
@tcuong53-cell

Copy link
Copy Markdown
Author

updated, please check, tks

@mschilli87 mschilli87 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not try this branch and didn't look too deep into the actual implementation of the added functionality. So I cannot comment on whether or not this actually resolved the FR. However, I noticed a lot of seemingly unrelated changes that I don't see why they would be needed, how the improve the code, and what is their relation to what this PR is trying to achieve. Maybe this does contain a good implementation of the feature. But it definitely contains more than that. And maybe some of those changes are useful for some reasons as well. But even then, IMHO they should be separated into different commits and PRs and come with some explanation as to why they should be merged. I'd suggest to mark this WIP, use it as a base to discuss if the way this adds the feature is what the project wants and then refactor this into a clean PR that adds the feature with the minimum required changes only. I would not support merging this as-is.

Comment thread src/formats/custom.cpp
time_t timestamp;
if (parts.size() < 4) return false;

// Allow timestamp to be a string

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you drop this comment?

Comment thread src/formats/custom.cpp
if (parts.size() < 4) return false;

// Allow timestamp to be a string
if(entries[0].size() > 1 && entries[0].find("-", 1) != std::string::npos) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you rename this variable?

Comment thread src/formats/git.cpp

if(written < 0 || written >= 2048) {
int restore_rc = chdir(cwd_buff);
(void)restore_rc;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the point of these additions?

Comment thread src/formats/git.cpp

//change back to original directory
chdir(cwd_buff);
int chdir_rc = chdir(cwd_buff);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you think this needs to be changed?

Comment thread src/formats/commitlog.cpp

RCommitLog::RCommitLog(const std::string& logfile, int firstChar) {

logfile_path = logfile;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of this new variable?

Comment thread src/dirnode.cpp

// this->parent_radius = std::max(1.0, parent_circ / PI);
this->parent_radius = std::max(1.0f, (float) sqrt(total_file_area) * gGourceDirPadding);
this->parent_radius = std::max(1.0f, (float) sqrt(total_file_area)) * gGourceSettings.dir_spacing;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment.

Comment thread src/file.cpp
setGraphic(gGourceSettings.file_graphic);
}

// Only apply spiral layout forces when NOT using physics-based file sizing

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be cleaner if this could be handled via an early return rather than another level of nesting.

Comment thread src/file.cpp

float name_alpha = selected ? 1.0 : alpha;

std::string label = gGourceSettings.file_extensions ? ext : name;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this change related to the scaling?

Comment thread src/pawn.h

std::string name;
float namewidth;
public:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need these to be public?

Comment thread gource.pro

LIBS += -lmingw32 -lSDL2main -lSDL2.dll
LIBS += -lSDL2_image.dll -lfreetype.dll -lpcre2-8.dll -lpng.dll -lglew32.dll -lboost_system-mt -lboost_filesystem-mt -lopengl32 -lglu32
LIBS += -lSDL2_image.dll -lfreetype.dll -lpcre2-8.dll -lpng.dll -lglew32.dll -lboost_filesystem-mt -lopengl32 -lglu32

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can adding an optional(!) feature result in dropping a dependency?

@mschilli87

Copy link
Copy Markdown

Note that I just commented on a few example issue I had skimming the diff. Even if all those were addressed, I'd need another round of review before considering supporting this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature request] scale by file size

3 participants