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
Make tdesktop look native / Do not set Qt style to win by default #987
Comments
Also stop using Open Sans, distance between symbols in some alphabets (russian e.g.) is too big |
Linux users want native file dialog and tray menu! QFileDialog does not use the native dialog windows by default? |
I do nothing with the styles, but I use Qt static build, perhaps that is the cause of non-native look. |
Proper theming would be nice, but native picker would be even better. I don't how they do it, but Chrome on linux manages to chooses the gtk picker on Gnome and the kde picker ("KDE File Dialog Widget") on KDE. I would at least be happy with proper theming! |
@nortexoid This would introduce unneccesary dependencies. Qt way is to do it platform independent. |
@ManuelSchneid3r Why would it introduce dependecies? Make algorithm like: if there is gtkpeeker - use gtkpeeker, if there is KDE-file-dialog - use kdefile dialog. Otherwise use native. Chrome doesn't have any dependencies |
@Yanpas Sounds right to me. The Qt5 build of QupZilla I'm using doesn't have any GTK/KDE dependencies but it still allows the use of native file picker. |
@Yanpas, Qt-based applications should automatically use system-wide look without any algorithms. As @ManuelSchneid3r said, currently there is an overrride of default style in Telegram code (through fake args), that prevents it. |
Everybody seems to be talking only about looks. Sure, looks are important, but it's not just about looks. Functionality is also impaired! For example, mounted network drives, or "favourite places" are not shown in Telegram's file picker, although they exist in the native file picker. Another thing is that there is no file preview of the selected file on the right side. These are useful things and it's really annoying to not have those in the desktop client. |
I completely subscribe to @Lesik's comment. Thank you for highlighting the visual impairments that affect productivity directly! |
Please. File picker is really annoying to use and that is big shame considering how well Telegram works with media. |
@michaldaniel If it is something easy and I just do not know how to do that, a pull request fix will be much appreciated. But it should not bring any new dependencies for the resulting binary (it should check library availability at runtime and use them only when they are available or static link them). |
the main problem is not the style, but the lack of a picture preview as a workaround I just use the default filebrowser and drag the image to the telegram window which works just perfectly |
Cool workaround. Thanks for sharing! :) ~ Robert |
@telegramdesktop I have no idea what is the reason, as far as I know QT should use GTK by default if not overriden. I'll give it a try soon anyway as I love Telegram. Don't really count on much tho, it's not like I've done any QT development before. |
@michaldaniel and others, hluk, developer of CopyQ, has successfully done the same here. Maybe you can draw some inspiration? ~ Robert |
Just to clarify as discussed in #982, this issue is about the style in general, not the filechooser. These are two different issues and #982 should be reopened for Lesiks arguments. If you check orschiros link you will see, that there even the Qt filedialog is rendered with the native renderer and blends in well with the set desktop theme. As said the context menu of the systray icon is affected and presumably every not explicitely styled widget too. What prevents Telgram widgets from beeing rendered with the native renderer is this line in the code:
Is this fake arg really needed? Just to show the effect: My own Qt application started without parameters: (Well integrated Vertex theme) Sorry for the tons of reedits. |
@telegramdesktop, why is the style explicitly set to zero? What is the purpose of "fake args?" |
I am using Manjaro linux, tried to compile the binary and removing the "--style=0" fake argument from the binary. I can set environment variables for different apps but i cannot get the Telegram binary to switch to the native file-dialog QTCreator switches correctly if i change my environment variables though... |
Just to clearify again this bug is NOT about the filechooser. For filechooser check #982. |
@telegramdesktop @john-preston I've been trying to get portable builds of a patched telegram I maintain for a few days. And it seems that this can be fixed more properly by adding After this is works on a Xubuntu 16.04 system without the For others interested in build scripts (main is ubuntu_xenial atm) and what not, check out: |
@telegramdesktop @ManuelSchneid3r I've made PR for it #2221 by applying qgtk2 theme engine |
@BOOtak I still find it rather odd that a Qt application gives me a GTK file picker of any sort since I use KDE myself. With this PR however I doubt that |
I've added -no-gtkstyle in the latest 0.9.57 alpha version (instead of "-style=0" fake param). |
@john-preston Note that this option changes in Qt 5.7 |
@ManuelSchneid3r Looks like they are replacing it with "-no-gtk" or am I reading this wrong? |
@ManuelSchneid3r I'm not moving to Qt 5.7 in the near future, at least widely — they drop support for many versions of Windows and one more OS X. I'm still not ready to develop two versions for Windows like I do for OS X :/ |
The usage of the GTK filechooser is a big improvement to the software, what is the stance on making it optional to provide your own theme to the application and how hard would it be to implement? |
No, it is not and worst of all --no-gtkstyle does not work in 0.10.1 |
I think everything regarding theming will be hacky, rigid, and partial until (if) #1815 gets prioritized. |
@KAMiKAZOW Yes, this is a bit annoying if your desktop environment uses Qt. |
#667 ? |
#2958 imho better ticket. |
@Aokromes they're a bit different, this one is for Linux :) |
maybe, but it's sort of generic issue, people wanting a setting to allow to select how GUI is :) |
Actually this one is solved for me. Everything looks fine. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Telegram does not use the gtk style which uses gtk+ engine to render the widgets. Please do not do this. Just do not set it manually at all. As far as I know qt takes the correct style automatically.
Further reads:
http://doc.qt.io/qt-5/qstyle.html#details
http://doc.qt.io/qt-4.8/qgtkstyle.html#details
The text was updated successfully, but these errors were encountered: