[GNC] CSS selectors for alternating rows and individual columns on the Account page?

Parker Graham plg57 at gmx.com
Fri Feb 26 07:50:05 EST 2021


This is what I did in css to make it look good and function well

On 2/25/21 8:38 PM, Peter S. Shenkin wrote:
> This sounds like a good reason to use Qt. 😁
>
> (A cross-platform GUI building tool.)
>
> -P.
>
> On Thu, Feb 25, 2021 at 11:45 AM Adrien Monteleone <
> adrien.monteleone at lusfiber.net> wrote:
>
>> I poked around with the inspector quite a bit when GnuCash moved to
>> GTK3, and as far as I can tell, the content of the Account Page (save
>> the header bar) is not exposed to styling, sorry. (that is, the entire
>> account table 'tree' is one CSS node and the individual items, rows, and
>> columns are not accessible to CSS)
>>
>> You could employ a very ugly workaround though:
>>
>> Set every other account to have the background color you want, then turn
>> on: Preferences > Accounts > Account Color > Show the Account Color as
>> background.
>>
>> The downside is you'd need to do this for every other account manually,
>> and then when you collapse parts of the tree, your striping will break.
>> (and then you can't use other custom colors) You could maybe just set
>> the parent accounts to have a background color, so that when everything
>> is expanded, there is some visual separation.
>>
>> *note, I've found the page easier to read and see the hierarchy when I
>> turned *off*: Preferences > General > General > Enable vertical grid
>> lines on table displays.
>>
>> Regards,
>> Adrien
>>
>> On 2/23/21 9:18 PM, Evelyn Yamanaka wrote:
>>> Hi all,
>>>
>>> I'm using GNUCash 4.4 on Windows 10, and I'm trying to customize the
>>> appearance of the Account page using the CSS file:
>>>
>>> %APPDATA%\GnuCash\gtk-3.0.css
>>>
>>> I can't figure out how to modify alternating rows (background color)
>>> or individual columns (e.g. the "Account Name" column) on the Account
>>> page because I don't know the CSS selector for those items.
>>>
>>> I've used the GTK Inspector to identify other elements. But I can't
>>> figure out the CSS path for these two items. I've tried the following,
>>> in case the tree in the Account page behaved like an HTML table, but
>>> neither worked:
>>>
>>> #gnc-id-account-tree tr:nth-child(even) {
>>>       background-color: #888;
>>> }
>>> #gnc-id-account-tree td:nth-child(1) {
>>>       background-color: #888;
>>> }
>>>
>>> More info, including a screenshot for reference, can be found here:
>>>
>> https://superuser.com/questions/1627977/what-are-the-css-selectors-for-alternating-rows-and-specific-columns-in-gnucash
>>> Would appreciate any help figuring out which CSS selectors to use, or
>>> just letting me know if it's impossible to do. Thanks.
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> If you are using Nabble or Gmane, please see
>> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gtk-3.0.css
Type: text/css
Size: 4489 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20210226/52b82872/attachment.css>


More information about the gnucash-user mailing list