Page 1 of 1

Background Colour for Side Panels

Posted: Mon May 02, 2016 9:30 pm
by Brother Gabriel-Marie
Here is the thread I started for the background colour for the browser window.

Now that I have a nice, comfortable custom gray for my browser and preview panel,
how can I set that colour to the background for the side panels, such as Favorites, Folders and Categories?
AND for the tabs in the Data Pane, such as Properties and ExifTool ?
It looks funny to have all gray and that those panels to be white.

Re: Background Colour for Side Panels

Posted: Mon May 02, 2016 9:45 pm
by XnTriq
Brother Gabriel-Marie wrote:how can I set that colour to the background for the side panels, such as Favorites, Folders and Categories?

Code: Select all

QTreeView {
background-color: rgb(RRR, GGG, BBB);
}
Brother Gabriel-Marie wrote:AND for the tabs in the Data Pane, such as Properties and ExifTool ?
I'll be back ;-)

Re: Background Colour for Side Panels

Posted: Mon May 02, 2016 9:58 pm
by Brother Gabriel-Marie
XnTriq - actually, that works on the Properties/ExifTool panel, too. But it messes with the line-by-line striping, too.
Is there qss to adjust the striping?

And is there qss to adjust the text in the other panels?

You know what? I found the C:\Program Files\XnViewMP\UI\style_sheet.qss file - I'm going to go through it and see if I can cypher what to use.
I suppose the elements are class names I can fetch via a window tool?

Re: Background Colour for Side Panels

Posted: Mon May 02, 2016 10:00 pm
by XnTriq
Brother Gabriel-Marie wrote:actually, that works on the Properties/ExifTool panel, too. But it messes with the line-by-line striping, too.
Yes, I'm still trying to figure that one out :-)

Re: Background Colour for Side Panels

Posted: Mon May 02, 2016 10:04 pm
by Brother Gabriel-Marie
Ah - you know, I think that this setting is for both things - the background AND the row striping.
It's the same setting - you can't have one without the other...
You'd have to have the elements separated in the code definitions.

QTreeView {
background-color: rgb(R,G,B);
}

Re: Background Colour for Side Panels

Posted: Mon May 02, 2016 10:10 pm
by XnTriq
This should fix it for the Properties and ExifTool panels:

Code: Select all

QTreeView {
background-color: rgb(RRR, GGG, BBB);
alternate-background-color: rgb(RRR, GGG, BBB);
}
Brother Gabriel-Marie wrote:I suppose the elements are class names I can fetch via a window tool?
Something like WinSpy++?

Re: Background Colour for Side Panels

Posted: Mon May 02, 2016 10:18 pm
by Brother Gabriel-Marie
XnTriq

Ah, yes, I found the alternate-background colour.
Here's the problem though - MP thinks that one set of lines in the Properties/ExifTool tabs is the background colour.
So you can't have one background colour for panels and a different one for for text panes.
You see, *I* (capital eye) want 143 gray for the background of panels that display trees or thumbnails or preview images.
But for just text - like in Properties/ExifTool, I want gray 225 alternating with white.

However, that is a pretty piddly desire, and I won't press our friendly neighbourhood suggestion-receiver to make this change. :P

As for fetching the class names using Winspy++, (which is my beloved go-to for this kind of work), it won't fetch class names from MP. It can only get the parent program's class name - must have to do with the components used.

Also, the entire Data panel is white when there is no file selected. Maybe you can help me find the qss for that too.

Re: Background Colour for Side Panels

Posted: Mon May 02, 2016 10:30 pm
by XnTriq
Brother Gabriel-Marie wrote:As for fetching the class names using Winspy++, (which is my beloved go-to for this kind of work), it won't fetch class names from MP. It can only get the parent program's class name - must have to do with the components used.
GammaRay is a free software introspection tool for Qt applications developed by KDAB.

PS: Tools » Settings… » Browser » Browser » Preview background color

Re: Background Colour for Side Panels

Posted: Mon May 02, 2016 10:33 pm
by Brother Gabriel-Marie
XnTriq - Yes, I have that setting already set for the background of the preview pane, and THAT works IF an image is selected in the browser. However, if you click off of an image in the browser - to a non-image area, the preview pane (entire data pane, since there is no data) will turn white. Where's the colour for *that*?

Re: Background Colour for Side Panels

Posted: Mon May 02, 2016 10:45 pm
by XnTriq
Brother Gabriel-Marie wrote:However, if you click off of an image in the browser - to a non-image area, the preview pane (entire data pane, since there is no data) will turn white. Where's the colour for *that*?

Code: Select all

QTabWidget::pane {
color: rgb(RRR, GGG, BBB);
}

Re: Background Colour for Side Panels

Posted: Mon May 02, 2016 10:54 pm
by Brother Gabriel-Marie
Hmmm...

That doesn't work for me (64bit, by the way).
I tried both color AND background-color for the QTabWidget::pane

I found it is also the case if you select a folder. A folder does to the data pane (with its tabs) what no-selection does.

Re: Background Colour for Side Panels

Posted: Mon May 02, 2016 11:45 pm
by XnTriq
Brother Gabriel-Marie wrote:Here's the problem though - MP thinks that one set of lines in the Properties/ExifTool tabs is the background colour.
So you can't have one background colour for panels and a different one for for text panes.
You see, *I* (capital eye) want 143 gray for the background of panels that display trees or thumbnails or preview images.
But for just text - like in Properties/ExifTool, I want gray 225 alternating with white.
I'm afraid you're correct :-|

Code: Select all

/*** Thumbnails ***/

QListView,
MyThumbListView {
background-color: rgb(143, 143, 143);
}

/*** Preview ***/

QTabWidget::pane {
background-color: rgb(143, 143, 143);
}

/*** Properties + ExifTool ***/

QTreeView {
background-color: rgb(225, 225, 225);
alternate-background-color: rgb(255, 255, 255);
}
QTreeView::item {
color: rgb(0, 0, 0);
}
QTreeView::item:alternate {
color: rgb(0, 0, 0);
}