Hello people
In a gtk application we have several files and pasting, we usually have a src folder, data, po, among others, and we have .h, .c, css, build files among others. I’m developing a system, and I’ve already created several files, including the about dialog window, but the question comes. How do I display my application icon? From what I saw in most of the codes in the gitlab repository this is in the “logo-icon-name” property, and generally the developers put the “application-id” parameter. What configuration should I do in the .c and .build files to have this result on my system. Does anyone know how it works, what the rules are, semantics. I have not found documentation that explains the implementation. If someone sober helps me there. Thank you guys
You should follow the documentation on themed icons.
The logo-icon-name
, and all the icon-name
variants in the GTK API, follow the icon theme specification for named icon assets. When you distribute your application you should always install your icon assets within a directory structure that follows the icon theme, and then point GtkIconTheme
to that path so that it can load the icons using their name.
2 Likes
Friend thank you very much for your help.
Go up know what the function of this code in meson.build
if get_option('profile') == 'development'
find_program('git')
rev_txt = run_command('git','rev-parse','--short','HEAD').stdout().strip()
profile = 'Devel'
name_suffix = ' (Development)'
rev = '-@0@'.format(rev_txt)
else
profile = ''
name_suffix = ''
rev = ''
endif
if profile == ''
application_id = 'org.gnome.MyApplication'
else
application_id = 'org.gnome.MyApplication.@0@'.format(profile)
endif
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.