Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QSS Stylesheet? #47

Open
polarathene opened this issue Jul 22, 2017 · 13 comments
Open

QSS Stylesheet? #47

polarathene opened this issue Jul 22, 2017 · 13 comments

Comments

@polarathene
Copy link

I'm not familiar with theming enough to know if qss stylesheets would be useful enough or not, but some applications like SMPlayer seem to be able to use them to make similar changes that the active DE theme would do such as a windows background.

In my case I prefer a light theme but for some apps to have a dark theme. I was able to use Breeze Light and have SMPlayer use the PapirusDark theme, but it would not look like the screenshot. Turns out that you can create a style.qss file to place in the themes directory and get a dark styled app.

I'm not aware of any other way to apply a theme to an app different from the active one used for the rest of the DE/apps. I suggest it here as it may be useful for some other apps other than SMPlayer, users could then use the file maintained in this repo.

@varlesh
Copy link
Contributor

varlesh commented Jul 22, 2017

Theme contained only icons - not window colors, gradients, styles and etc...
For SMPlayer you can choose style on preferencies. For Plasma desktop i recommend set KVANTUM. For GTK DE > GTK+

@polarathene
Copy link
Author

@varlesh Ah ok. I have Breeze set as style in preferences, there isn't a Breeze Dark option, I think it only uses my active theme unless I override with QSS. So to have a dark theme applied when using a light theme only seems possible with QSS method.

Is this the only colours for theme that Arc applies?

@varlesh
Copy link
Contributor

varlesh commented Jul 22, 2017

Smplayer use .RCC files for skin - it's binary contained only PNG files and not support SVG or other vector images. Also nonKDE apps not support kde color scheme - it's imposibble. SMPlayer it's not KDE app.
If you want use another colors for SMPlayer icons you can change sources on SVG's and make new theme for your self or use imagemagick tool for colorize

@varlesh
Copy link
Contributor

varlesh commented Jul 22, 2017

For skin use Base interface or Mini, set this on preferencies:
2017-07-22 15-42-28

@polarathene
Copy link
Author

@varlesh Yes I know how to apply it, perhaps you misunderstand.

I am not asking for SMPlayer theme, but QSS file that SMPlayer theme and other Qt app can use for styling differently than active theme. On KDE I have Breeze Light, but I want to have dark theme for SMPlayer(and some other apps), this can be done with QSS for Qt apps. So Arc theme colours in a styles.qss file could also support theming specific apps with Arc colours.

This is the reddit thread and specific comment about QSS that I am referring to. And you can see on Breeze Light, with the sample QSS provided there, I get SMPlayer look like this with Style: Breeze and Icon set: PapirusDark in SMPlayer settings. Better QSS styling and it might look more like their theme preview even though I use a light theme for everything else.

@varlesh
Copy link
Contributor

varlesh commented Jul 23, 2017

Ok i understand you want use style as on elementaryOS, where all apps have light colorscheme, but some other apps (audience and terminal) use dark.
Colors available on color-schemes directory or on Kvantum theme.
QSS have option for application list or this applied only for all apps?

@varlesh
Copy link
Contributor

varlesh commented Jul 23, 2017

style.qss created on Smplayer theme directory or on main system icon theme?

@polarathene
Copy link
Author

@varlesh I haven't tried it with any other apps yet. For SMPlayer, using launch options like smplayer -stylesheet=/path/to/file.qss does not work(it does with dolphin and I guess most other Qt apps).

I added the style.qss file into the PapirusDark Icon set and it seems to apply that automatically, obviously this would not be ideal for people that just expect icon theme and their system window theme to apply to SMPlayer.

For those who want to use QSS, they'd normally just use the stylesheet option when launching the app I think, or in SMPlayer case, copy the QSS file to a Icon theme.

For clarity, I placed the file at /usr/share/smplayer/themes/PapirusDark/style.qss. In SMPlayer settings, the Icon set is PapirusDark, the Style drop down beneath that is Breeze(there is no Breeze Dark listed here).

@varlesh
Copy link
Contributor

varlesh commented Jul 23, 2017

On oficial smplayer PPA compiled with Qt4, maybe this happened because non-Qt5 app...
Try another player, for example QMPlay2 - he have option use system icon theme and compiled with Qt5 by default

@polarathene
Copy link
Author

@varlesh I'm confused what your comment is about.

I use KDE with light/white theme. Only for a few apps like SMPlayer, I want the app to use dark/black theme. style.qss file allow this, like I describe above.

This issue makes suggestion for style.qss file for this theme that user can use for apps if they want to. No bug, nothing wrong happen.

@varlesh
Copy link
Contributor

varlesh commented Jul 23, 2017

Sorry my English, it's not my language )
I mean if smplayer compiled with Qt4 maybe it's cause.. Maybe stylesheet worked only with Qt5. I don't know.
Also KWin have option for use another titlebar colorscheme for needed apps - it's another solution:
image
And third, i'm not programmer or developer KWin or SMplayer and i don't know why this not worked.

@polarathene
Copy link
Author

polarathene commented Jul 24, 2017

@varlesh

Maybe stylesheet worked only with Qt5. I don't know.

Are you saying it is not working for you? It works for me with SMPlayer if I place the style.qss file in the PapiprusDark theme directory using the sample QSS text from the reddit link.

Also KWin have option for use another titlebar colorscheme for needed apps - it's another solution:

That can only affect the titlebar.


Nothing is wrong or broken for me. I only suggest for arc-kde repo to include a style.qss file with theme colors, this allow a user to style specific Qt app with arc-kde themes while using another theme like Breeze Light.

@abers
Copy link

abers commented Jan 8, 2018

A style.qss (and style.qrc) would be much appreciated as well for using with PyQt / pyside. The pip and conda installs are pre-built wheels so only come with Fusion and Windows as themes. Even installing python3-pyqt5 from apt gets the right colours but retains the overall Fusion style. Be amazing if could:

import arc-kde
app = QtGui.QApplication()
app.setStyleSheet(arc-kde.load_stylesheet())

For example, see QDarkStyleSheet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants