-
Notifications
You must be signed in to change notification settings - Fork 44
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
Labels in call stack for breakpoints, variables and threads are misaligned and unreadable #223
Comments
You could try playing around with the value here SublimeDebugger/modules/ui/style.py Line 100 in 7c88fa6
|
Not currently on package control but you can adjust this with the SublimeDebugger/Debugger.sublime-settings Line 12 in 805614b
|
Hello kei, I encountered the same as you, have you already tried out a set of value that displays correctly? I found my "Variable" panel been "Squeesed" into "Next page" |
@WZ-Tong Are you using |
Yes, but I found it's useless to "un-squeeze" the |
But the question kei met on this issue, just changing the |
I think this is caused by rust's backtrace name (it contains the full module path, and it's often quite long). And I believe the |
@daveleroy So, could I ask politely that if it's easy to fix because it's really a problem for rust user to use the debugger. I would appreciate it if some small improvements can be applied, but it's hard for me to create a PR myself, since I'm not familiar with related things. |
I don't think the issue is with rust here many adapters have content that is too large for the space. Everything rendered in the debugger has to be sized and clipped to fit inside the available space and that isn't happening for some users but its not clear why the calculations aren't working. I believe setting You appear to have some other issue where the panel (not the text/images) are too large or at least thats what it appears since the text/images is smaller than the panel when setting |
Yes, so I think my problem is more similar to the closed one #253. I'm trying to figure out where is the key point |
SublimeDebugger/modules/callstack.py Line 63 in cb99710
In my case, I can change this code to fix my problem: with TabbedViewContainer(width_scale=0.5, width_additional=-32, width_additional_dip=-32): But I don't know that if there are any side effects. After applying this, my ui appears like: Whatever, it's now useable and useful. Thanks for providing this plugin! |
@WZ-Tong That shouldn't cause any issues is basically making the panels smaller than the window size. The panels are intended to be sized to exactly fit the window and that appears to be calculated wrong. The current calculation is basically the window size - 30 dip since each phantom has some padding around them that appears to be 10 dip (5 on each side) If you are willing to try something that might get everything to line up correctly you could remove all your changes and try making a change here. SublimeDebugger/modules/ui/layout.py Line 149 in cb99710
into def from_dip(self, dip: float) -> float:
return (dip / self.em_width) * self.internal_font_scale // (maybe try adding - 0.001) or something as well And then using the |
Tried, substracting 0.001 is not enough, I made this work by changing it to def from_dip(self, dip: float) -> float:
return (dip / self.em_width) * self.internal_font_scale - 1 The constant 0.75 failed to work, changing to this won't work, either: return ((dip / self.em_width) - 0.01) * self.internal_font_scale Current scale: 0.97 |
Yeah thats too far off to be the issue with the panel width calculation. I think the solution here for now is to change the If you remove all the changes you made besides your SublimeDebugger/modules/callstack.py Line 63 in cb99710
If you don't have to fudge Leave |
Sorry, but seems it's my fault that I forget to remove I get a fresh install using package control Failed: width_additional=-30, width_additional_dip=-35
width_additional=-30, width_additional_dip=-40
width_additional=-31, width_additional_dip=-30 Works: width_additional=-32, width_additional_dip=-30 |
That unfortunately causes a pretty big gap so I'll add an additional setting to change this because I can't seem to figure out what is why the calculations are not working here. From your screenshot if you make the window really small does the gap on the very right stay the same size? or decrease in size? If it stays the same size I will make a fixed If it changes size I will make an |
Take If the window is smaller than 948*Height pixel, the variable panel is sqeezed out (like issue #253) But I noticed that if the window is 940~947 pixel wide, and I'm dragging it from smaller (e.g 930 pixel) to bigger, the variable panel pops up, and after maybe re-calc its size, it is squeezed out again. This maybe the threashhold. By calc the pixel from the right side of the panel, to the edge of sublime text window, I got the following: It stays in the same size |
I'll go ahead and add an Thanks for going through all this stuff, grabbing screenshots and testing all the cases its been a big help! |
The changes are on the main branch. You would put -2 for your I'm a little confused though because when I use the new setting and make the panel too big it just adds a horizontal scroll bar not sure why yours is even wrapping instead of doing the same. |
Sorry to be late. It works perfectly now! I don't know why either, but I have to mention that I'm using Sublime Text Dev build 4175, which maybe cause some differences? BTW, the version is different from package control, maybe you should push to package control again? |
I have been struggling with this issue for some time now and can't find a reasonable solution. My environment(s):
I have tried to reduce the UI scale in the debugger settings. This sometimes fixes it for specific instances but another debug session would have some misaligned labels. I've even tried to use my preferred font but that didn't help either.
This is 100% reproducible for me. I'm quite willing to play with the code if there are suggestions where to look.
The text was updated successfully, but these errors were encountered: