-
-
Notifications
You must be signed in to change notification settings - Fork 722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved the position of the directory labels. #181
base: symmetric-dir-names
Are you sure you want to change the base?
Improved the position of the directory labels. #181
Conversation
I think it looks pretty good. Maybe it should offset slightly more so that most of the time it wont still be touching the edge? OTH it makes it easier to tell what edge it belongs to. I wonder if there are cases where that is harder to discern now. The == 0 comparisons should be == 0.0f since its a float. It probably doesnt matter too much but in general if you compare floats with integers strange things will happen. |
f30c3e3
to
ae51589
Compare
* Vertical and horizontal alignment always need to match to avoid overlapping of the label and the line. * Inverting the alignment on dir_name_position > 0.5 is only meaningful on a flat angle (below 45 degree in relation to the x axis) to avoid moving names on top of each other.
ae51589
to
c35addb
Compare
hmm.... change the offset would mean to use something like
to consider both alignments. But for me it is ok, when the label is touching the edge. |
I splitted it into two commits, to introduce the offset seperate, |
Any idea when you have time for this? |
This is looking pretty good. Sorry I'm pretty busy at the moment. |
The repositioning animation is really pleasant now. The actual position of the labels though often isn't better than just putting them in the middle of the line segment in a lot of cases. When a directory has a lot of files the label overlaps the file wheel. The reference I'm mostly trying this with is the Linux kernel, mainly focusing on how the outer satellite directories look, whether its clear what directory the label corresponds to. Maybe the label should be positioned between the 'file wheel' of the current directory and the parent directory. Also the hard coded offset distance maybe needs to be scaled to the length of the branch (in screen space - ie pixels), as it looks too far away when zoomed out. |
22104ce
to
e2b3f3e
Compare
I am at the end of my wisdom. Default is centering the labels on dir_name_position = 0.5 now. When dir_name_position is changed, the alignment of the labels will change keeping the symmetry and avoid overlapping of the labels and edges. I also changed the hard coded offset to 25% of the text height. Using the length of the branch looks not like a good idea, because the distance becomes big sometimes while the text size is the same. So the label no longer looks connected to the branch. Decreasing the distance results in something like "no offset" on short branches. |
Can you give me some feedback what to do? Would be great when we can finish this feature. It is ok for me to keep the j-Key to enable this feature. I can also add a command line option if you would like. |
to avoid overlapping of the label and the line.
meaningful on a flat angle (below 45 degree in relation to
the x axis) to avoid moving names on top of each other.