Background Colour for Side Panels

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

Post Reply
User avatar
Brother Gabriel-Marie
Posts: 286
Joined: Thu Aug 23, 2007 2:33 pm
Location: United States

Background Colour for Side Panels

Post 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.
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Background Colour for Side Panels

Post 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 ;-)
User avatar
Brother Gabriel-Marie
Posts: 286
Joined: Thu Aug 23, 2007 2:33 pm
Location: United States

Re: Background Colour for Side Panels

Post 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?
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Background Colour for Side Panels

Post 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 :-)
User avatar
Brother Gabriel-Marie
Posts: 286
Joined: Thu Aug 23, 2007 2:33 pm
Location: United States

Re: Background Colour for Side Panels

Post 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);
}
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Background Colour for Side Panels

Post 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++?
User avatar
Brother Gabriel-Marie
Posts: 286
Joined: Thu Aug 23, 2007 2:33 pm
Location: United States

Re: Background Colour for Side Panels

Post 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.
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Background Colour for Side Panels

Post 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
User avatar
Brother Gabriel-Marie
Posts: 286
Joined: Thu Aug 23, 2007 2:33 pm
Location: United States

Re: Background Colour for Side Panels

Post 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*?
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Background Colour for Side Panels

Post 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);
}
User avatar
Brother Gabriel-Marie
Posts: 286
Joined: Thu Aug 23, 2007 2:33 pm
Location: United States

Re: Background Colour for Side Panels

Post 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.
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Background Colour for Side Panels

Post 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);
}
Post Reply