I would be very grateful if you could help me with this problem. Nothing was changing.Īs I am not experienced enough, I cannot tell what is going wrong. I even tried to reverse the order of icons to see if I was mistaking with the colors. (The light icons are displayed as black). I was expecting that as soon as my application runs, the icon would be switched to the light version. Making sure that Qt is looking in the correct path I added the code necessary to make the theme switch. Here is how my button looks with this icon: (The dark icons are displayed as white, which makes them ideal for darker backgrounds) I created a simple QPushButton and added the Qogir-dark icon to it for demonstration purposes. Resources/icons/Qogir-dark/16/actions/accept_signal.svg Resources/icons/Qogir/24/actions/accept_signal.svg In addition, I also included the index.theme files for each folder. I choose only two files since this is only a test. I followed the instructions about how to import these files into the resource file. I found a very nice icon theme called Qogir from the Gnome website. After reading this article I attempted to give it a try with a simple example. Unfortunately, I am facing another issue that I cannot solve. Therefore, I have two questions:ġ - Is there a way to set the icons for QPushButtons/QActions through stylesheets? (Is there an element like img/icon that I can use to specify the URL?)Ģ- If the above is not possible, then what is a good way to approach this Thank you for sharing this amazing article. However, the icons remain the same style. If we want to switch to another theme (dark theme), then we can simply use the code mentioned above to switch the look and feel of our Widgets by applying a different stylesheet. Let's assume we have a set of light theme icons setup for some QPushButtons/QActions in our application. How does one switch the icons for a theme? (What I mean by this questions is the following) Although this is a very nice and convenient way to approach this problem, But it still doesn't fix one big issue: This code attempts to read a stylesheet qss file and apply the styles to our application widgets. If(file.open(QIODevice::ReadOnly | QIODevice::Text))ĪtStyleSheet(input.readAll()) To change individual folder colour, right-click on the file and change colour from the context menu. Operating System: Fedora Linux 35 KDE Plasma Version: 5.24. I just want to change all the folders to be plain old manila colored. I’ve tried alternative icon packs, but the closest I found changed the Application Launcher icon to an Apple icon. One often finds solutions that consist of the following code: The feature to change folder colour was preinstalled on my Linux Mint 21. Im using the Breeze Dark theme and icons. In the forum click the Code-button above the text box, than press ctrl-v. It is usually fine to compile programs and apply patches, as I have discussed in many examples on this site, but on this occasion it is better to wait until a solution is available that has been validated by the developers.įor now the question is 'solved', but I will continue to update it and indeed research the issue to see how it could be accomplished in the manner that it is done in Nautilus.When searching on the internet for topics such as the following:ġ- "How to switch themes in QtWidget applications"Ģ- "How to create Dark mode and Light mode for QtWidget applications" Mark the complete result inclusive the command with the mouse and press ctrl-shift-C. You could experiment of course in a virtualised environment (virtualbox) or on a computer set aside for development, but not on a stable system. So the method as described in the patch has not really been validated by the developers, and because it would involve a lot of time compiling thunar and its dependencies (as noted here), and then a lot of risk in installing them to your system, I would advise against trying it. The prefix-only check if a bit flawed as well, it can be improved with a dot-check (so foo2.png is not matched). However, one of the leading xfce developers, Nick Schermer, has commented that Will have a custom icon loaded if the image in the. Thumbnaill dir and loads a custom icon if there's a file that matches There is a discussion at the xfce forum on how thunar custom icons could be accomplished, and a patch has even been submitted for thunar. You can use either emblems (right-click > properties > emblems) or the user-dirs (the fixed list of userĭirectories can be found and modified in ~/.config/user-dirs.dirs). However, the answer from Simon Steinbeiß, an active xfce and xubuntu developer, was that: This feature request has come up on the mailing-lists several times, and was quite recently proposed in this discussion.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |