Why do gnome apps ignore parts of gtk 3 themes? - css

I am extremely new to making gtk 3 themes, and I have created a theme that is working with any app that is using titlebars, but any gnome app (such as shotwell, or rhythmbox) is ignoring the theme completely. I have determined it is due to the gnome apps using header-bars rather than title bars, but the header-bars will not using background-color or any other css attribute other than background-image. Any help is appreciated

Because gnome apps partly use default system user interface, which maybe different from gtk3, you need to change settings both in apps (if any) and in the system - gnome settings. It depends from app to app.

Related

How does one make GTK3 look native on Windows 7?

I am trying to make my GTK3 application look native on Windows 7. I tried the answer in the following question How to get native windows decorations on GTK3 on Windows 7+ and MSYS2
But it doesn't work. My GTK3 version on windows is 3.22 and I am using the Vala language. Tried with GTK3 version 3.20 to no avail either. I also tried changing the background color of the application in the code itself with the CssProvider and it works in Ubuntu, but not in Windows. In Windows, the application theme and all CSS manual settings are ignored.
Is there any way to achieve this? Thanks.
It worked by calling in the code, before displaying the main application window with show_all () :
Gtk.Settings.get_default ().gtk_theme_name = "win32";
When using a custom theme, the location of the theme should be: "YourApplicationExecutable\share\themes\ThemeFolder" as per described in the accepted answer of How to get native windows decorations on GTK3 on Windows 7+ and MSYS2
and the name set with gtk_theme_name in the code should be the name of the folder containing the theme.
Note that the method get_default () gets you the default GDK screen. If you want more control over specific widgets, use instead the method get_settings () over the specific widget that you want to change the theme for.
Sources:
How to get native windows decorations on GTK3 on Windows 7+ and MSYS2
https://valadoc.org/gtk+-3.0/Gtk.CssProvider.html
https://valadoc.org/gtk+-3.0/Gtk.Settings.html

Find gtk icon paths without gtk (how gtk find the default theme and icons?)

I need to use the system default icons but im not using gtk nor qt.. I need something like
find_icon('icon_name', [icon_size]) => '/usr/share/icons/...'
PD: Im using nodejs but i want to know how to find the icons to use them in any other language.
Thanks!!
access the dconf or gconf from command line shell (provided the language has function to access shell like C,Python,Perl, etc). then ask what desktop environment you are on than find the settings. gnome and kde share the same default folder in the root, but not if you set icon default on the home folder.

Is it possible to set icon for a custom file used by my app

I would like to create and app using Qt which will use custom files. The app will be available on Windows, OS X and Linux.
The idea is to have a custom icon for my file type (e.g. when you install Adobe's Master Collection, .as, .fla, .ps, etc. files have they own icons).
As far as I know Qt only helps you with app icon. I did not find any kind of support for this kind of problem.
This seems to be an OS problem. Do I need to create scripts to run on app install? (I will be using Bitrock's install builder to provide installers)
How can I achive this behaviour on all OSs?

Test WinXP look on other platforms?

Is there a way to test the look of my UI on Windows or other platforms from my Linux machine? I'd like to have some idea of how it will look without having to rebuilding the project on a windows machine.
At the command line for your program you can specify the style:
http://qt-project.org/doc/qt-5.0/qtwidgets/qapplication.html#QApplication
-style= style, sets the application GUI style. Possible values depend on your system configuration. If you compiled Qt with additional styles or have additional styles as plugins these will be available to the -style command line option. You can also set the style for all Qt applications by setting the QT_STYLE_OVERRIDE environment variable.
In some older documentation it mentions:
Possible values are motif, windows, and platinum.
I just tried this on Windows 8 with Qt 4.8.4, and I got no change adding in "style=platinum" or any of the others, and apparently the build of Qt that I got did not come with the additional style plugins. So, build Qt with the additional styles, and then you can preview the look for other OS's.
Hope that helps.

what does native="true" stand for in a Qt designer form

I am doing a diff between 2 project versions and noticed that some of the ui files have extra attributes in the xml that I have not put there myself:
where would native="true" come from? what would make it get added to the ui?
Qt GUIs can be displayed in many themes. native="true" forces the application to use the operating system's theme (on Linux, some QT apps look terrible because they don't look like the rest of the native apps).

Resources