Closed step- closed 4 years ago
Hi Is Options > Filer windows > Tools/Minibuffer > width of toolbar sets minimum width of window ON ?
The calculation of width is not rightness. So something broken?
Yes, it is ON, see pictures. Something is broken. First open folder is OK: it shows SMALL icons and whole toolbar (CORRECT).
Move down to folder with few icons:
Move up to the previous folder
Thank you
I changed options to your pics but not reproduced. Does It happen even with [text only] -> [icons only]? Any other conditions?
Does It happen even with [text only] -> [icons only]? No.
Any other conditions? The attached file is all that I can think of.
Hmm, not reproduced. Does it happen without the .mo?
Does it happen without the .mo? Yes it does, I just tried.
I think I know why you can't reproduce: it depends on the theme. I've been using mine for so long that I forgot I had customized it for rox (#156). You should be able to reproduce if you add the following lines to your gtk2 theme file (.gtkrc-mine or similar):
# http://rox.sourceforge.net/desktop/book/export/html/98.html
# https://github.com/jun7/rox-filer/issues/156
# Deleting everything between the braces resets to theme default values.
style "rox-toolbar-lbl" = "default"
{
fg[NORMAL] = "#4e81c6"
fg[PRELIGHT] = "#4e81c6"
fg[ACTIVE] = "#4e81c6"
}
style "rox-toolbar-btn-lbl" = "rox-toolbar-lbl"
{
font_name = "DejaVu Sans 16"
}
widget "rox-filer.*.GtkToolbar.GtkButton.*.GtkLabel" style "rox-toolbar-btn-lbl"
widget "rox-filer.*.GtkToolbar.GtkLabel" style "rox-toolbar-lbl"
If I comment out the last two lines and run rox -n the toolbar isn't cut off anymore. I suppose the current code calculates toolbar width based on a smaller font-size: my system font size is 10pt, I only change it for the rox toolbar.
Reproduced! I will fix it.
Thank you!
Thank you for reporting!
Ah label is cut off. Sorry I will fix it.
Yes I was just testing it and it's better but there are still cases when the toolbar is cut off. When I change folder from small icon view (many items) going to large icon view (few items) the toolbar shrinks too much and cuts off some buttons.
Not reproduced. Any other conditions?
With the .mo
Only with the .mo
Hmm. The width of toolbar is calculated once when toolbar is created. So If the bug is in the calculation, changing folder is not matter. Does It happen only with changing folder from small to large?
Ah I get it. You have to add '┼' to N_("Size┼"). rox calculates width without '┼' and then added. The width of items depend on max width. So it is serious.
Are you testing with the gtk2 styles that I mentioned previously? If you do you will see the issue more clearly, because the font size is much bigger in those styles, so a calculation error is magnified.
The width of items depend on max width. Yes, I can see that when I hover the pointer over each button: they're all the same size large enough to for 'Size┼'.
One more question, maybe a new issue. With Options > Tools/Minibuffer > Toobar type: Icons only & Show totals of items ON, sometimes the total of items isn't shown because the window shrinks too much. Changing folders can bring the item count back into view. Has anything like this happened to you before? Is it correct?
Does it happen with HEAD(6bbef70700228fb3c81d6751fa40cc80a1d82017) ?
Thanks for the message. I hadn't thought about checking commits. I just built and tested 6bbef70. It's much better now but not quite fixed. The last icon and the item counts are still cut off.
AUTOMATIC
AUTOMATIC
MANUAL -- I resized to show whole toobar
Changing a toolbar option(e.g. Show totals of items) re-calculate toolbar width. So could you check the result of changing it on a dir having few folders or empty?
Yes, good, changing a toolbar option recalculates width and all icons then come into view!
So the calculation is now OK. The width of the toolbar is narrow than the picts you post? Then the size chars are suspect. If not, Hmm I have no idea.
I'm not sure if you are asking something new. The width of the toolbar can be like any of the three pictures I posted. It depends on what rox wants to show. When rox resizes the toolbar too narrow the last icon and the item counts are out of view, cut off.
This with the .mo but without gtk styles always shows all buttons (but item count is still out of view)
You said that not fixed. So I want to know whether the calculation is OK or not. Since the calculation is OK, there is another problems making windows narrow. Isn't it fixed with reboot or changing dir?
Not fixed with reboot or changing dir. Problem is fixed when no gtk style. See the last picture I posted. Problem not fixed when gtk style. Maybe depend on char size in gtk style property?
Hmm the caluculation is not OK? Changing toolbar options with gtk style makes same result?
Make sure that when changed gtk theme, reboot rox. the gtk_widget_size_request that used to get width of widgets not returns proper size without reboot.
I don't know if the calculation is OK or not. I don't know what the calculation does. Changing toolbar options with gtk style makes all buttons visible TEMPORARILY until I change the folder and then buttons are cut off again.
Make sure that when changed gtk theme, reboot rox. the gtk_widget_size_request that used to get width of widgets not returns proper size without reboot.
Ah, sorry for not rebooting rox before. Now I did. Then problem is not fixed when no gtk style. With or without gtk style problem is the same: buttons out of view.
Could you post a pict of the result of changing options?
Sure. With .mo and no gtk theme.
BEFORE
AFTER
You have to add '┼' to N_("Size┼") for the caluclation.
Which calculation? I didn't need to do any calculation.
For the width of the toolbar. You can see buttons of the pict (rox-20200204-006) are narrow because it lacks '┼'.
Yes, I understand. But I don't understand what you want me to do. I did not need to do any calculations. Nothing I can do to calculate the width of the toolbar, sorry.
Maybe I understand. You mean changing the .mo? If you want to test a different .mo you can easily build one from the one I sent you. Wait...
msgunfmt < ROX-Filer.mo > test.po vim test.po msgfmt -o test.mo test.po
Inside my .mo there are two lines:
msgid "Size"
msgstr "🌑"
msgid "Size┼"
msgstr "🌑"
The first one matches when your _N is "Size" the second one matches when your _N is "Size┼" They both return "🌑" because you append different characters after "Size". If your code can define different _N("Size"+character) for all appended characters then I can change the .po.
I could not understand why both return "🌑". So just change the bottom of "🌑" to "🌑┼".
Ah, right, you already changed the _N in 6bbef70 -- I hadn't seen that commit. Good. ... Yes, I changed "🌑" to ""🌑┼" in .mo and now all buttons are visible! Good!
Only last thing: sometimes item count is not visible. I think it happens when the string ends with
"(n
hidden)". In my Options > Filer windows > New window > show hidden files is OFF.
It is normal. Calculating the width of information label every time is not planned.
Calculating the width of information label every time is not planned. OK.
Does rox not calculate the information label when a new window opens? Because when I start rox in $HOME from shell prompt, rox never shows info label, and $HOME has many hidden folders.
Only when a new window opens makes no sense. If you want more wider window you can change the base information string that I added by 6bbef70700228fb3c81d6751fa40cc80a1d82017 as you do tool labels.
Only when a new window opens makes no sense.
Agreed.
If you want more wider window
I don't.
I want the window to be wide enough to show the info label. Currently the window is too narrow therefore it doesn't show the info label. I have to resize the window manually to view the info label. Is that normal? When the window resizes automatically, some times is cuts off the info label again. Is that normal?
Thank you very much for fixing #204 and all your patience and support! I think you can close this issue (resolved). To discuss about item count I have opened #207.
Thank you again
Hello, My toolbar is set to show text only, no icons, and the item count, and the window is set to auto-resize. Rox displays the window too narrow, so some toolbar labels on the right side and the item count are cut off. I think this is a bug, let me know your thinking. Thank you.