Saturday, April 27, 2024
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 3286  / 2 Years ago, sat, september 17, 2022, 8:21:06

Lately, I've seen the widget below appear in GTK applications. I can't find it in Glade. What is it?



enter image description here


More From » application-development

 Answers
0

Looking at the Totem code, it looks like a set of GktButtons inside a GtkToolbar, with a CSS style applied and using symbolic icons (which are also installed by the theme in Ubuntu) instead of the stock ones.



Here's an example in Python



# Assuming builder is an initialized Gtk.Builder object and toolbar exists
# in the .ui definition file and is populated with Gtk.ToolButtons

context = builder.get_object('toolbar').get_style_context()
context.add_class(Gtk.STYLE_CLASS_INLINE_TOOLBAR)


More info on GTK+ 3 CSS styles:




[#40113] Saturday, September 17, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
onbean

Total Points: 29
Total Questions: 102
Total Answers: 115

Location: Benin
Member since Fri, Mar 24, 2023
1 Year ago
onbean questions
Fri, Mar 18, 22, 19:49, 2 Years ago
Tue, Dec 6, 22, 11:51, 1 Year ago
Mon, Jun 7, 21, 17:21, 3 Years ago
Mon, Jan 16, 23, 04:48, 1 Year ago
Mon, Oct 17, 22, 14:51, 2 Years ago
;