piroor / treestyletab

Tree Style Tab, Show tabs like a tree.
http://piro.sakura.ne.jp/xul/treestyletab/
Other
3.48k stars 279 forks source link

[Enhancement] Easy setting tab indent width with a numerical setting in Preferences > Appearance #3566

Closed noyannus closed 4 months ago

noyannus commented 4 months ago

Abstract

The width of tab indents is often desired; too often to hide it in CSS. Please create a Settings item unter Appearance.

Steps to see the situation

  1. insert into CSS:
    /* TAB INDENT WIDTH */
    :root{
    --indent-step: 20px ;
    tab-item[data-level][data-level="0"] tab-item-substance {margin-left: calc(var(--indent-step) * 0) !important;}
    tab-item[data-level][data-level="1"] tab-item-substance {margin-left: calc(var(--indent-step) * 1) !important;}
    tab-item[data-level][data-level="2"] tab-item-substance {margin-left: calc(var(--indent-step) * 2) !important;}
    tab-item[data-level][data-level="3"] tab-item-substance {margin-left: calc(var(--indent-step) * 3) !important;}
    tab-item[data-level][data-level="4"] tab-item-substance {margin-left: calc(var(--indent-step) * 4) !important;}
    tab-item[data-level][data-level="5"] tab-item-substance {margin-left: calc(var(--indent-step) * 5) !important;}
    tab-item[data-level][data-level="6"] tab-item-substance {margin-left: calc(var(--indent-step) * 6) !important;}
    tab-item[data-level][data-level="7"] tab-item-substance {margin-left: calc(var(--indent-step) * 7) !important;}
    tab-item[data-level][data-level="8"] tab-item-substance {margin-left: calc(var(--indent-step) * 8) !important;}
    tab-item[data-level][data-level="9"] tab-item-substance {margin-left: calc(var(--indent-step) * 9) !important;}
    tab-item[data-level][data-level="10"] tab-item-substance {margin-left: calc(var(--indent-step) * 10) !important;}
    }

    2: change the value of --indent-step:

Expected result and Actual (present) result

The indent width changes with ^^this value.

Suggestion: This should be more accessible. A simple number setting in Preferences > Appearance would add much to user satisfaction.

Environment

All

P.S: How could the above CSS snippet be simplified? (I could'nt find a way to get data-level into a variable.)

irvinm commented 4 months ago

Just update this value.

image

noyannus commented 4 months ago

Thanks for the quick reply!

This is weird. I had no baseIndent in about:config. Removed and reinstalled TST, still missing, created baseIndent with value 15 and varied it; it had no effect. Restart FF, toggle TST: same.

In a different, rather clean profile also no baseIndent, after creation its value has no effect. The CSS code does, so the FF functionality is definitely OK.

This was with FF 126.0 (64bit) Firefox for openSUSE, on Operating System: openSUSE Tumbleweed 20240524 KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.2.0 Qt Version: 6.7.0 Kernel Version: 6.9.1-1-default (64-bit) Graphics Platform: X11

irvinm commented 4 months ago

Oh! This is NOT about:config ... this is part of the TST settings. Go to about:addons -> TST -> Preferences -> (Scroll to bottom) Development -> All configs -> baseIndent.

image

noyannus commented 4 months ago

Thank you so much! It works as intended.

On a meta level: this is not really a setting only a developer needs. So the initial idea —to have it accessible for the unskilled user in the main Appearance— still holds.

Apart from user satisfaction, a few issues like the present, and the time investment is fully returned.

grafik

source: XKCD

Thanks again!

(closing as resolved)