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
theming? #10
Comments
Pext is a Qt5 application, so should inherit your Qt5 theming. For now, you can change your system Qt theme, or put something like In the future I do want to see if I can retrieve a list of systems themes so you can choose one from a drop-down menu in the top bar, or possibly see if I can add support for more "custom" themes using Qt Style Sheets. EDIT: You can also play with EDIT 2: On my Debian system, a list of available options for |
35c255f implements the very basics to select a theme from the command line. Not all supported Qt5 themes are currently listed due to PyQt5 limitations, but it's a start. I'm leaving this issue open until I feel there is enough proper theming support. |
There's a better way to style it under GTK.
|
Having researched more about this, there seem to be several possibilities to let users theme Pext to their wishes beyond @zamber's note. Putting this here for my own reference and in the hope someone may be able to help figure out what Telegram is doing and how possible that would be. Qt Stylesheets (https://doc.qt.io/qt-5/stylesheet.html)Just like CSS, pretty awesome and powerful-looking. However, not natively supported in QML and will need https://github.com/Ableton/aqt-stylesheets, a C++ plugin. Shipping this with Pext as a binary is obviously not an option, so this route will require setting up something like OpenBuildSystem so users can get binaries that will just work and the source code stays clean from binaries. While the most powerful solution, it is rather heavy-weight. QML Style Singleton (https://wiki.qt.io/Qml_Styling#Approach_2:_Style_Singleton)Not really a great solution. Bad code here will crash the whole app and thus make themes able to crash Pext as a whole. Also won't style dialog boxes and so that aren't part of the QML. QPalette (https://doc.qt.io/qt-5/qpalette.html)Simple solution, but very weak, would only allow users to change the colour of some text elements, basically. This is barely theming. Figure out whatever Telegram is doingTheir solution involves .tdesktop-theme files which are .zip files containing a background image and something which seems like just a list of colours to use for everything. No clue if something like this can be used for Pext. |
I started theming support based on QPalette in the feature/theming branch. A basic theming file (which can already be loaded if put in ~/.config/pext/themes/pext_theme_dark/theme.conf and calling Pext with --theme=dark) will look like this:
(This was based on https://gist.github.com/QuantumCD/6245215 for testing purposes) It's still rather crude, but this seems to be the best way to go. |
As of 687da11 I consider this fixed. I'll create a new issue about writing documentation for this. See https://github.com/Pext/pext_theme_eggplant for an example. |
is there a way to change the colors and look of pext?
The text was updated successfully, but these errors were encountered: