Modify application scrollbar from fvwm2?

I’ve been starting to use the QupZilla browser. It’s a pretty decent browser (based on Qt), except that the vertical scroll bar on the main window is virtually indistinguishable shades of gray. After some frustration trying to change this with themes using Qt stylesheets, the developers say that this scrollbar’s appearance is controlled by the desktop theme.

I don’t have a desktop (other than the wooden thing that my display rests on), I use FVWM. So is it possible to use FVWM to change the scrollbar appearance? And if so, how, and where can I look for more info?

(It would be acceptable to change all application scrollbars to a common appearance, as browsers are the only thing I regularly use that have them.)

The scrollbar appearance is controlled by the set Gtk or Qt themes. These the developers supposed to I guess.


Changing a Qt based theme you have to use Qt4Config (name differs a little depending on the distribution you’re using).
If “Gtk” is set in this tool Qt applications are using the set Gtk theme. This theme can be changed with LxAppearance (not so much dependencies as the Gnome tool).

Try to use one of the older themes like Raleigh or QtCurve which won’t use such non-sensical effects if available.

– Thomas –

But AFAIK I am not using any of this at all, just FVWM on top of X. There’s nothing like a Qt4Config anywhere on my system.

There is a “Raleigh” directory in /usr/share/themes (along with several others), but again, AFAIK it isn’t used for anything. It’s just stuff (like the files for dozens of languages that I don’t even read) that gets dumped into /usr/share by an install program too simple-minded to consider what the user actually needs.

So the bottom line is that I’m terminally confused :frowning:

Qt4Config or QtConfig-4 or QtConfig or qtconfig - depending on you distro must be on your system because it’s part of Qt. What distribution you’re using?

Again … each Gtk or Qt application uses a theme else you won’t see anything. Per default a Motif look is set.

FVWM can change colors of a titlebar and its buttons (if defined) with e.g. colorsets. Also the borders of a window but the elements inside of a window are controlled by the used toolkit (Qt/Gtk). The same happens with used colors, shadows and animations of elements inside a window. This is steared over themes. Scrollbars are elements of the used toolkit. So, if you want to change a color or background of an element you must do this over another theme than the current one. Therefore you should use tools like qtconfig (Qt) or lxappearance (Gtk) to switch the theme easily.

To get a better overview of the toothing here’re some links. Hope they help a little to lifting your confusion. Else shout :slight_smile:

What is difference between GTK and QT applications?
Uniform look for Qt and GTK applications
QT Programs Not Conforming to GTK Themes on Unity
Qt5 applications don’t use gtk style on Liux Mint

– Thomas –

OK, I found it. It’s just named “qtconfig”, and I was doing a find on names with a ‘4’ in them.

I’m using OpenSuSE 13.1.

Neither one of those seem to have any obvious way to modify the scrollbar :frowning: The frustrating thing is that I can (after some trial & error) use Qt stylesheets to modify scrollbars in sub-windows of the application (e.g. in the “Preferences” dialogs), but those changes don’t affect the main window scrollbar at all. Yet I can change some other elements of the main window…

Thanks much. It seems almost impossible to find a good starting place to figure these things out.

Well, here’s the shout :slight_smile:

I have played around a bit with the qtconfig program (and with lxappearance), but all I can make it do is switch among a set of about half a dozen predefined styles. There are very few changes that can be made to those styles (colors, mostly), and none of those seem to have any effect on apps. (Changing the style does affect the appearance, but as far as I can tell, just to the default of that style.) Most frustratingly, the only file that’s ever changed is .config/Trolltech.conf, and the only thing that changes is the style name.

So at least now I know what questions to ask.

  1. Where do I find the files that define a style? Say for example the “Plastique” style. There is no file with any reasonable variant of that name to be found on my whole system.

  2. When I do find those files, is there a reference for the syntax. and directions on how to get the system to use my modified style?

I apologize for the off-topic questions, but I am getting pretty frustrated. I can barely make out the scrollbar slider, and no longer have (if I ever did) the fine motor control needed to reliably place the mouse cursor on it, which makes trying to use “modern” browsers a major pain.

Would you make a screenshot of qupzilla that I can see your problem, please? I’ve installed the browser in a VM but scrollbar looks good. Best would be a screenshot of your desktop with qupzilla, a Gtk+ application e.g. pcmanfm, lxappearence and qtconfig.
You can upload it to imageshack or another image sharing service and post the link.

That’s understandable. Currently I’m at work but this afternoon I’ll answer your questions as much as possible. :slight_smile:

– Thomas –

Unfortunately it’s very problematic to get a unified look between different toolkits. As I looked around I saw that qupzilla using themes with css. That means if you set in qtconfig “Gtk+” you need a theme which has settings for Gtk3 because Gtk3 uses css, too.

From that point of view it would be good to install gtk3-engine-oxygen because

Because “Plastique” is a built-in theme in Qt4.

Currently it is the best approach to use a Gtk theme with support for Gtk2 and 3 to fit the most used toolkits (Qt4, Qt5, Gtk2, Gtk3) because Qt themes mostly hasn’t a Gtk counterpart. So an uniform look is rarely possible than with Gtk themes.

But, it’s important that your first (custom) Gtk theme doesn’t use any Gtk3 engines like Unico (except Adwaita, because it’s the default theme engine of Gnome). Engines are for special looks which can’t achieved with default style settings. No Gtk3 engines because the style interface of Gtk3 changed a lot in the past, so for example a theme can work on Gtk3.14 but on Gtk3.16 not or not correctly.

A good and clean theme is Greybird which doesn’t use any theme engine. Download and unpack it to ~/.themes/ (the user wide location for Gtk themes). It’s available in lxappearance immediatelly. Choose it. Open qtconfig and set the GUI style to Gtk+. Now open qupzilla and the widgets/elements should have the same look as in a Gtk application.

If qupzilla looks similar to Gtk applications, you can start to change some parts :stuck_out_tongue:

For Gtk+:
GTK 3 Theming Tutorial
Tutorial for making GTK3 themes

For Qt (only as a fingerpost):
Qt4 Theming Tutorials?

Hope it helps a bit O_O

– Thomas –

Thanks for the info. I’ll have a look through it, and figure out how to get a few pictures linked in.

The good news is that I have, after a good bit of trial & error, gotten something that sort of works for me. The trick is to use the qtconfig program, set “button background” to a contrasting color (currently I have it bright green, but that will change), and reboot the system. I was getting pretty frustrated until I accidentally discovered this, because nothing was happening with my changes. Naturally, I’d always restore the default before quitting, until one time I forgot. In addition to changing the button background, it also changes the scrollbar’s slider to the specified color.

As far as getting a unified look & feel goes, that’s not really necessary. A browser is the only GUI app that I use regularly. Occasionally use Acrobat reader and gv, but seldom enough that I can live with the scrollbars - which anyway seem to be larger & have better contrast than does the QupZilla one. Otherwise, I can go months without using anything but xterms and things that run in them.

It is strange, though, that the changes to qtconfig that affect QupZilla don’t affect the other programs at all. Maybe they use GTK, or something different? Anyway, I’d sure like to have a better understanding of just how to change appearance. I’m not an artistic type who needs a decorated screen - white on black works for me :slight_smile: - but I do want to be able to see things clearly.