Dark Theme with Custom Font Sizes

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

Moderators: helmut, XnTriq, xnview

Post Reply
st11x
Posts: 5
Joined: Mon Jan 01, 2024 9:26 pm

Dark Theme with Custom Font Sizes

Post by st11x »

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

Code: Select all

/* 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:

Image

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
HanVroon
Posts: 225
Joined: Thu Jan 28, 2010 7:30 am

Re: Dark Theme with Custom Font Sizes

Post by HanVroon »

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.
Post Reply