Search found 105 matches: qss

Searched query: qss

by Primus
Sun Mar 23, 2025 4:48 pm
Forum: MP - General Support
Topic: Finding a color line in QSS
Replies: 0
Views: 192

Finding a color line in QSS

Hi. New to this forum, I've been using XnViewMp for years (Linux Mint) without any problems but I'm having a problem with the interface colors. I have activated the dark theme and I would like to know how to change colors #2 (25, 25, 25) to have color #1 (54, 54, 54).


copie.png


I've tried in the style sheet but can't get anywhere.

Thanks in advance.
by HanVroon
Wed Feb 19, 2025 9:31 am
Forum: MP - Suggestions
Topic: Qt Stylesheet Snippet Repository
Replies: 18
Views: 56318

Re: Qt Stylesheet Snippet Repository

What I have been missing in all the topics of this forum (or I might have overlooked something:-) is how we can use a custom theme.
What is this C:\Program Files\XnViewMP\UI\style_sheet.qss file doing and when does changing that file have effect.
Now that I found out, I create this post for anyone who is in the dark about how it works, like me.

Please let me know (Pierre?) if the below text is nonsense, then I will remove the post.

There are four default themes that can be choosen, Default, Light, Dark and Black.
The settings of those themes are hard coded, there are no stylesheets provided with XnViewMP for them. Perhaps they are from Qt itself.

For customisation there is the Old Dark theme, the fifth option in Browser, menu View, Theme.
If that theme is choosen, two files are copied from C:\Program Files\XnViewMP\UI to your profile: style_sheet.qss and style_sheet_win.qss.
Every setting in those two files override the "Default" theme, the other three themes (Light, Dark, Black) cannot be modified that way, they stay hard coded.
The file style_sheet_win.qss only has a setting for combobox, apparently because this setting should only be applied to the Windows version.

The Default theme is white, so that's why you get a white theme if your style_sheet.qss only has a few settings.
Looking at the modified date of the Old Dark stylesheet (style_sheet.qss), ik looks like Pierre updates this file with new options if needed.
So you could use this theme file as a refference how to address the parts of the GUI that you want to change.

Hope this helps.
If all I wrote is correct, it might be good to add these lines to the top of this topic as a reference.
by HanVroon
Wed Feb 19, 2025 8:59 am
Forum: MP - General Support
Topic: Dark Theme with Custom Font Sizes
Replies: 1
Views: 1751

Re: Dark Theme with Custom Font Sizes

Looking for theme related topics I found this one, I can answer one question.

The only custom theme that can be edited by style sheet is "Old Dark".
After selecting this theme, two .qss files are copied from C:\Program Files\XnViewMP\UI to your profile.
Every setting in those two files override the "Default" theme, the other three themes (Light, Dark, Black) cannot be modified, they are hard coded.
The file style_sheet_win.qss only has a setting for combobox, aparently because this setting should only be applied to the Windows version.

The Default theme is white, so that's why you get a white theme if your style_sheet.qss only has a few settings.
by HanVroon
Sat Dec 14, 2024 6:22 pm
Forum: MP - General Support
Topic: Change the colour of tabs
Replies: 2
Views: 969

Re: Change the colour of tabs

Additional question:
There is a default file (I think):
C:\Program Files\XnViewMP\UI\style_sheet.qss

And the same file is in my profile directory (databases path).
To test I modified lots of colour values to see if anything changed, but XnView MP looks the same as before (with the default theme).
Does anyone know (and want to explain) how these stylesheets work?
by HanVroon
Thu Dec 12, 2024 7:29 pm
Forum: MP - General Support
Topic: Change the colour of tabs
Replies: 2
Views: 969

Change the colour of tabs

Hello,

I thought it was possible to change default colours . I use the Default theme.
I red about stylesheets (*.qss files).
I have a style_sheet.qss and a style_sheet_win.qss in my profile.

I would like the colour of the active tab (for one file open) to be more different in colour that the oter tabs.
I can sometimes hardly see which tab is active.

I randomly tried changing values at several QTabBar::tab: entries, but nothing happens.
How do I change the background colour of the active tab?

Regards,
Han
by Lycus
Mon Jul 15, 2024 12:38 pm
Forum: MP - General [Français]
Topic: Changer couleur bouton groupe de catégories ?
Replies: 0
Views: 2171

Changer couleur bouton groupe de catégories ?

Bonjour,

Dans un premier temps, merci pour ce logiciel que j'utilise quasiment quotidiennement. J'aimerais savoir si il est possible de modifier la couleur de la police d'un bouton "Actif" dans l'onglet groupe de catégories. En effet, la lisibilité entre les boutons actifs et inactifs n'est pas très marqué avec le thème sombre :

Situation actuel : La catégorie fleure est attribuée.
https://i.ibb.co/sCFzrS2/01.png

Situation désiré : Exemple
https://i.ibb.co/2WGbDYw/02.png


J'ai trouvé comment modifier toutes les propriétés des boutons dans le fichier Style_Sheet.qss mais impossible de trouver la propriété qui change la couleur de la police dans un état "Actif".

Pour ceux qui sont intéressés (et google) dans la version 1.7.2, les boutons du "Groupe de catégories" portent le TAG : CategorySetPanel>QToolButton

Exemple : Passe le bouton en vert quand il est survolé par le curseur de la souris.
CategorySetPanel>QToolButton:hover {
background-color: green;
}



Exemple : Passe le bouton en jaune quand il est cliqué
CategorySetPanel>QPushButton:triger {
background-color: yellow;
}


Exemple : Changer la couleur du bouton en teinte RGB, la police en noire et la taille de police en 16 px.
CategorySetPanel>QToolButton {
background-color: rgb(240,240,240);
color: Black;
font-size: 16px;
}




Merci d'avance pour une réponse éventuelle, et bonne journée.
by Exoner
Tue Apr 02, 2024 12:06 pm
Forum: MP - General Support
Topic: How to change style-folder and colors of the theme itself?
Replies: 4
Views: 1998

Re: How to change style-folder and colors of the theme itself?

Hello Pierre,

maybe I found a solution for the tooltip-colors.

Selecting View->Theme-Old dark opens an editor for the file styles_sheet.qss. Selecting this 'Old dark' theme gives me a basic dark-gray theme as a starting-point - including 'white on dark-grey' thumbnail-tooltips.

But my other questions are still relevant.
by Exoner
Tue Apr 02, 2024 11:39 am
Forum: MP - General Support
Topic: How to change style-folder and colors of the theme itself?
Replies: 4
Views: 1998

Re: How to change style-folder and colors of the theme itself?

Hello Pierre,

thank you for your answer, but it left me a little bit lost.

You wrote that the background-color of the active items (clicked as active) in listviews and thumbnail-views (currently black on blue in the dark-theme) are defined by WINDOWS itself. I'm on a dark theme in WINDOWS, but by default I get 'white on blue' for active items.

Is there really no chance to give selected items a light text-color, so that the text gets more readable?

I asked how to set a custom folder for the style-files (style_sheet.qss etc.). In fact I meant how to set a custom folder-path for this file like for the database. Sorry for the bad description of my goal. I want to put the styles-files in the same custom folder where my database resides.

I'm looking for a way to customise the appearence of the tooltip when hoovering over a thumbnail in the thumbnail-list-view. I have expanded the tooltip-information for a picture to get a larger tooltip with several lines of text. This works fine.

Currently the thumbnail-tooltip has the same color-settings like any other tooltip (buttons etc.), which currently is dark-grey on light-yellow. Maybe this is set by WINDOWS, too, I don't know.

Your suggestion was 'you can change QToolTip'.

But how do I do that?

I found QToolTip on line 972 in the styles-file 'style_sheet.qss'.

QToolTip{
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(180, 180, 180), stop:1 rgb(150, 150, 150));
}

I'm familiar with CSS-code, but have difficulties to understand this color-code.

How do I change it to get

background-color: darkgray
color: white
opacity: 60%

Have a nice day.
by xnview
Mon Apr 01, 2024 2:37 pm
Forum: MP - General Support
Topic: How to change style-folder and colors of the theme itself?
Replies: 4
Views: 1998

Re: How to change style-folder and colors of the theme itself?


1. How can I set a custom folder for the style-files (style_sheet.qss etc.)? I can do this for the database, but how to set this for the styles, too? I want to place them in a folder that is part of my backup-workflow.

you need to change folderColor* in xnview.ini


2. How can I change a default colour of the Dark theme? I have difficulties to read the black-on-blue colour-setting for a selected item (folder-list, thumbnail-list) and want to change both colours (maybe white on dark-grey).

the blue color can't changed, it's from the system


3. I managed to set the appearence of the info-overlay in fullscreen-view (pressing key <I>). I have set some transparency there. How can I customise the tooltip that appears when hoovering over a thumbnail? I'm looking for some dark gray background (#666666) with some transparency and a white text-colour.

you can change QToolTip
by Exoner
Sat Mar 30, 2024 2:30 pm
Forum: MP - General Support
Topic: How to change style-folder and colors of the theme itself?
Replies: 4
Views: 1998

How to change style-folder and colors of the theme itself?

Hello,

I use Version 1.6.5. I searched the forum but did not find the right answers. So here are my questions:

1. How can I set a custom folder for the style-files (style_sheet.qss etc.)? I can do this for the database, but how to set this for the styles, too? I want to place them in a folder that is part of my backup-workflow.

2. How can I change a default colour of the Dark theme? I have difficulties to read the black-on-blue colour-setting for a selected item (folder-list, thumbnail-list) and want to change both colours (maybe white on dark-grey).

3. I managed to set the appearence of the info-overlay in fullscreen-view (pressing key <I>). I have set some transparency there. How can I customise the tooltip that appears when hoovering over a thumbnail? I'm looking for some dark gray background (#666666) with some transparency and a white text-colour.

Thank you for your time :D

Keep healthy
by xnview
Wed Jan 10, 2024 6:39 am
Forum: Retest
Topic: Add metadata summary info panel
Replies: 23
Views: 9000

Re: Add metadata summary info panel

please send your style qss
by st11x
Tue Jan 02, 2024 10:10 pm
Forum: MP - General Support
Topic: Dark Theme with Custom Font Sizes
Replies: 1
Views: 1751

Dark Theme with Custom Font Sizes

Hi,

I find the UI elements and font sizes really small for me and saw that I could switch to the Old Dark mode and provide some CSS to change the font sizes. That great, however, after a restart, most of the UI turns white.

This is the only CSS I put in to style_sheet.qss


/* Default for all widgets */
QWidget{ font-size: 12pt; }


/* Tabs */
QTabBar{ font-size: 12pt; }
MyTabBar{ font-size: 12pt; }


/* Context Menu & Menu Bar */
QMenu, QMenuBar{ font-size: 12pt; }


/* List & Tree Views */
QListView{ font-size: 12pt; }
QTreeView{ font-size: 12pt; }


/* Folders Tree */
QDockWidget > QTreeView{ font-size: 12pt; }


and nothing in style_sheet_win.qss. On restart, my screen looks like this:

https://i.ibb.co/TPZ98D8/image.png

I know there are some settings in xnview.ini for background colors but I don't see any difference (with respect to colors) between the xnview.ini file generated by the dark theme and the old dark theme.

Are there any file settings I can change to make the font sizes without using the old dark theme?

thanks
Matt
by XnTriq
Fri Dec 22, 2023 2:15 am
Forum: New
Topic: Texte schlecht lesbar
Replies: 1
Views: 1030

Re: Texte schlecht lesbar

Willkommen im XnView-Forum, HenKno!

Diesen Text kann man vergrößern, indem man Ansicht → Farbschema → Bisheriges Dunkel aufruft und den Text für style_sheet.qss damit ersetzt:

QComboBox { font-size: 13px; }
by cicciobello
Wed Dec 13, 2023 2:26 pm
Forum: Retest
Topic: Add metadata summary info panel
Replies: 23
Views: 9000

Re: Add metadata summary info panel


which theme do you use?


I use a custom theme (style_sheet.qss). I used elements from various parts/origins. I don't know exactly how it works, but I managed to get something that works quite well, albeit with some problems.
The problem is not resolved by restarting MP. I have been using this theme for various releases.
by cicciobello
Thu Nov 23, 2023 2:58 pm
Forum: Closed/Resolved
Topic: Resize problem (minor interface bug)
Replies: 5
Views: 1858

Re: Resize problem (minor interface bug)

File: style_sheet.qss

QListView{
background-color: rgb(20, 20, 20);
border: 1px solid black;
font-family: "Verdana";
font-size: 10pt;
}