[GNC] Change GnuCash scrollbar color in CSS?

Glenn Fowler gfowler1 at outlook.com
Wed Aug 17 17:48:00 EDT 2022


Thanks Adrien for the tip. I dug through some themes and figured it out.
Just leaving this here for someone in the future:

/* Scollbar */
scrollbar slider {
  /* Size of the scrollbar */
  min-width: 22px;
  min-height: 22px;
  border-radius: 0px;

  /* Padding around the slider */
  border: 7px solid transparent;

  /* scrollbar slider color */
  background-color: cornflowerblue;
}

/* scrollbar slider color on hover */
scrollbar slider:hover {
  background-color: royalblue;
}

/* scrollbar slider color when clicked */
scrollbar slider:hover:active {
  background-color: navy;
}

/* minimum slider height for large register entries */
scrollbar.vertical slider {
  min-height: 70px;
}

On Wed, Aug 17, 2022 at 1:55 AM Adrien Monteleone <
adrien.monteleone at lusfiber.net> wrote:

> It has been some time since I dealt with the topic, but I vaguely seem
> to recall that someone reported that the Inspector can run under
> Windows, though I didn't think that possible at first. Of course, I
> could be remembering wrong, and I don't have an installation on that OS
> to test it out. (maybe it has to be installed separately?)
>
> I think I once advised to spin up a Linux VM to run the Inspector, but
> then learned that the GTK versions between OSes don't always, or maybe
> even never, match. So what might work on one, might not work on an another.
>
> I'm not sure if this next idea will turn out to be more trouble or not,
> but since the desired change is controlled by GTK themes, rather than
> GnuCash, perhaps maybe investigate specifying a different theme entirely
> after finding one that more closely matches what you are looking to
> achieve. There should be instructions on the wiki for specifying an
> entire theme even on Windows.
>
> There are many sources for GTK themes, gnome-look.org being one. You
> want to at least use a GTK 3 theme. If it is v4 only or older than 3, it
> most likely will not help. (GnuCash is now using GTK3)
>
> Regards,
> Adrien
>
> On 8/16/22 10:28 PM, Glenn Fowler wrote:
> >   Hi,
> >
> > In on Windows and unfortunately there are no Windows details for GTK
> > Inspector on: https://wiki.gnucash.org/wiki/GTK3#Using_the_GTK_Inspector
> so
> > I'm not sure if it's even available on Windows.
> >
> > I did add the 'environment.local' file to 'C:\Program Files
> > (x86)\gnucash\etc' per the instructions but it didn't work.
> >
> > On Tue, Aug 16, 2022 at 8:44 PM Adrien Monteleone <
> > adrien.monteleone at lusfiber.net> wrote:
> >
> >> Glenn, check the wiki with respect to the GTKInspector which might be
> >> able to help you find the proper id/class/object to target.
> >>
> >>   From the Inspector you can also make changes in real time to
> experiment.
> >>
> >> I'm pretty sure that GnuCash doesn't expose this element to styling, but
> >> customizing the GTK theme should work. (but will apply to all of your
> >> GTK apps)
> >>
> >> What OS?
> >>
> >> Regards,
> >> Adrien
> >>
> >> On 8/16/22 11:35 AM, Glenn Fowler wrote:
> >>> Hi,
> >>>
> >>> Does anyone know how to change the scrollbar and scrollbar button color
> >> in
> >>> gtk-3.0.css?
> >>>
> >>> I have tried:
> >>>
> >>> scrollbar slider {
> >>>       color: blue;
> >>> }
> >>>
> >>> and...
> >>>
> >>> scrollbar button {
> >>>       color: blue;
> >>> }
> >>>
> >>> Both have no effect. I didn't find anything in the mailing list
> archives
> >>> and the above I got from generic GTK CSS.
> >>
> >>
> >> _______________________________________________
> >> 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
> >> -----
> >> 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
> > -----
> > 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
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


More information about the gnucash-user mailing list