[Thunar-dev] Thunar-dev Digest, Vol 115, Issue 1

Apurv Jyotirmay apurvj199512 at gmail.com
Tue Mar 21 17:39:15 CET 2017


Markus, your patches are working nicely. I'm so much satisfied with
Thunar's aesthetics now. You've done a great work. I would love these
patches to land in the master branch. I applied both the patches on Thunar
1.6.11, On Xubuntu 16.04.

On Mar 14, 2017 17:44, <thunar-dev-request at xfce.org> wrote:

Send Thunar-dev mailing list submissions to
        thunar-dev at xfce.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://mail.xfce.org/mailman/listinfo/thunar-dev
or, via email, send a message with subject or body 'help' to
        thunar-dev-request at xfce.org

You can reach the person managing the list at
        thunar-dev-owner at xfce.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Thunar-dev digest..."


Today's Topics:

   1. how to tell thunar never to increase space between        icons?
      (Bruno Dantas)
   2. Re: how to tell thunar never to increase space between icons?
      (Markus)


----------------------------------------------------------------------

Message: 1
Date: Tue, 14 Mar 2017 07:19:54 -0400
From: Bruno Dantas <thunar at dantas.airpost.net>
To: thunar-dev at xfce.org
Subject: [Thunar-dev] how to tell thunar never to increase space
        between icons?
Message-ID: <f69fdb5f-4ad1-b64a-723d-a3daef05caa5 at airpost.net>
Content-Type: text/plain; charset=utf-8

This is a cosmetic issue but it's driving me bonkers.

I only use Thunar with the option to "View as Icons". I'd like the spacing
between icons in Thunar to be constant, but Thunar insists on increasing
the spacing between icons when long filenames are detected (e.g., when I
press Control+H in my home folder and hidden files with long names show up).

A user perplexed by this same issue documented it here, with screenshots:
https://bbs.archlinux.org/viewtopic.php?id=199121

If I put something like this in my ~/.gtkrc-2.0 to increase the
baseline/initial distance between icons...

style "thunar-spaced-out-icons"
{
  ThunarIconView::column-spacing = 70
  ThunarIconView::row-spacing = 70
}
class "ThunarIconView" style "thunar-spaced-out-icons"

...Thunar increases the distance between icons even more when long file
names are detected.

Is there a setting that tells Thunar to NOT change the distance between
icons? If there is no such setting, I'd like to recompile Thunar without
this "feature". I grepped the source code for "column-spacing" and didn't
find an obvious culprit, so the offending function must change a variable
of some other name. Please help.


------------------------------

Message: 2
Date: Tue, 14 Mar 2017 13:09:29 +0100
From: Markus <markus.xp at web.de>
To: thunar-dev at xfce.org
Subject: Re: [Thunar-dev] how to tell thunar never to increase space
        between icons?
Message-ID: <9e3ba1aa-4165-7e8a-d10c-278b25b0e8f3 at web.de>
Content-Type: text/plain; charset="utf-8"

I wrote patches for this a while back. I'll attach them to this mail,
maybe they'll prove useful for you. I can't exactly remember which
version I wrote them against but I think it should be the 4.12's Thunar
already. Here's a short overview (I'm citing my notes from when I wrote
those patches):

thunar_fixed_width_final.patch

    This patch addresses the issue of varying horizontal spacing in icon
    view by using a fixed width (= maximum width) for the columns of the
    grid layout.
    The patch introduces the following xfconf variable:

        misc-fixed-item-width: toggles the fixed item width on (TRUE) or
        off (FALSE); default: TRUE

    The patch only affects icon view and the new behavior only applies
    to views with text below items.


thunar_truncate_final.patch

    The appended patch addresses the issue of huge filename labels by
    adding filename truncation using ellipsis insertion and introduces 3
    new xfconf values:

        icon-view-text-lines: maximum amount of lines for filenames in
        icon view (default: 4)

        compact-view-text-width: maximum pixel width for filenames in
        compact view (default: 300)

        misc-truncate-filenames: boolean toggling the new
        truncate/ellipsize behavior for filenames (default: TRUE)

    I chose to not put the ellipsis at the end of the filenames as many
    other file managers do it, but in the center. This will keep the
    file extension readable in most cases which I find quite handy.
    However if you deem this unsuitable, feel free to replace the
    occurences of "PANGO_ELLIPSIZE_MIDDLE" with "PANGO_ELLIPSIZE_END"
    which will result in the ellipsis being at the end.

_______________________________

The first patch is essentially what you are looking for. I added a
second as a bonus since it complements the first one beautifully by
limiting the size of item labels. This guarantees fixed horizontal
spacing as well as limited vertical spacing when using text below icons.
The truncation should still apply to text besides icons as well. Use the
xfconf editor to set the introduced settings values.
Be aware that I wrote those patches a long time ago. I currently can't
check whether they are still working but they should point you into the
right direction at least!

Cheers!

Markus.
> This is a cosmetic issue but it's driving me bonkers.
>
> I only use Thunar with the option to "View as Icons". I'd like the
spacing between icons in Thunar to be constant, but Thunar insists on
increasing the spacing between icons when long filenames are detected
(e.g., when I press Control+H in my home folder and hidden files with long
names show up).
>
> A user perplexed by this same issue documented it here, with screenshots:
https://bbs.archlinux.org/viewtopic.php?id=199121
>
> If I put something like this in my ~/.gtkrc-2.0 to increase the
baseline/initial distance between icons...
>
> style "thunar-spaced-out-icons"
> {
>   ThunarIconView::column-spacing = 70
>   ThunarIconView::row-spacing = 70
> }
> class "ThunarIconView" style "thunar-spaced-out-icons"
>
> ...Thunar increases the distance between icons even more when long file
names are detected.
>
> Is there a setting that tells Thunar to NOT change the distance between
icons? If there is no such setting, I'd like to recompile Thunar without
this "feature". I grepped the source code for "column-spacing" and didn't
find an obvious culprit, so the offending function must change a variable
of some other name. Please help.
> _______________________________________________
> Thunar-dev mailing list
> Thunar-dev at xfce.org
> https://mail.xfce.org/mailman/listinfo/thunar-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/thunar-dev/
attachments/20170314/6068dca7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thunar_fixed_width_final.patch
Type: text/x-patch
Size: 6525 bytes
Desc: not available
URL: <https://mail.xfce.org/pipermail/thunar-dev/
attachments/20170314/6068dca7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thunar_truncate_final.patch
Type: text/x-patch
Size: 8946 bytes
Desc: not available
URL: <https://mail.xfce.org/pipermail/thunar-dev/
attachments/20170314/6068dca7/attachment-0001.bin>

------------------------------

Subject: Digest Footer

_______________________________________________
Thunar-dev mailing list
Thunar-dev at xfce.org
https://mail.xfce.org/mailman/listinfo/thunar-dev


------------------------------

End of Thunar-dev Digest, Vol 115, Issue 1
******************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/thunar-dev/attachments/20170321/fb0013fe/attachment.html>


More information about the Thunar-dev mailing list