Questions tagged [gtk4]
194 questions
0
votes
0 answers
relm4 - Access nested template child from root
I have a main WidgetTemplate view, which includes another WidgetTemplate inside of it:
adw::Window {
// ...
#[template]
MainWidget {
#[template_child] // Can't access MainWidget->SettingsPage->btn_dark_mode like this
…

eminfedar
- 558
- 3
- 16
0
votes
0 answers
Running the compiled gtk4 C application will screw up my screen's resolution?
Does anyone has this running when they running the compiled gtk applications, their task bar goes missing? or rather go below the screen(i cant see my taskbar anymore). I installed my gtk with msys2 on Windows 10 and using the mingw gcc compiler…

ZFCrow
- 11
- 2
0
votes
0 answers
Gtk::ComboBoxText select item with mouse on dropdown macOS Ventura 13.2.1 Gtkmm4
I have added a simple ComboBoxText widget to my programm, but I am unable to select any of the drop-down options with my mouse by clicking on the drop-down. I can however use my keyboard arrows and enter button to change the selected option. What…

Alberto García
- 19
- 1
0
votes
0 answers
Creating a TreeView using modern GTK4 without using deprecated functions
Now this is a question for programming in C with GTK4.
This is about creating a TreeView. In the GTK4 samples, it contains a GtkListStore, which contains the following code:
#include
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static GtkWidget…

Platinum Lucario
- 43
- 5
0
votes
1 answer
How to create a TreeView-like UI using ColumnView in GTK4?
Google says use ColumnView, because TreeView is deprecated. But how to create a UI like this with ColumnView of GTK4? Gnome Files seems to be able to do that, but I am not sure if they are using columnView. Could you show the bare minimum code to…

Damn Vegetables
- 11,484
- 13
- 80
- 135
0
votes
0 answers
How serialize a Gtk.Textview buffer in Gtk4
I’m working on a flatpak python+gtk4 application which is, roughly speaking, a text editor, and I need a way to save the contents of a TextView including all the tags.
What I know: In Gtk 4, TextView buffer no longer has built-in serialization…

Kripto
- 46
- 1
- 3
0
votes
1 answer
Render on click on the GLArea (Glium backend)
I want to perform a render on click event on the GLArea. The problem is that when I call the drawing method from the event handler, the "canvas" does not change.
There is the my_draw_func() method in the Renderer struct, that contains the render…

RedGradient
- 1
- 1
0
votes
1 answer
Gtk4 GridView Vala
I'm trying to make a GridView of images which may or may not be draggable based on context
But I'm unable to even make the object as the parameters for the constructor don't make sense to me
How do I make this object or is there some example that I…

pp2yttD
- 1
- 1
0
votes
1 answer
GTK4: Pango Markup in menus
to build a clean GTK4 version of my program (https://atomes.ipcms.fr) I need to be able to add pango markup in GTK4 menus, and, the menu(s) must be C coded and not read from XML file(s).
This question follows the one from this post (that contains a…

Sébastien Le Roux
- 115
- 9
0
votes
1 answer
how can I get underlined text using gtk4 css in C?
This is the relevant part of the code:
btn1 = gtk_button_new_with_label("one");
gtk_grid_attach (GTK_GRID (grid_ptr), btn1, 0, 1, 1, 1);
gtk_widget_set_name ( btn1, "btn1");
GtkCssProvider *prvdr = gtk_css_provider_new ();
GtkStyleContext…

jediapingveno
- 3
- 2
0
votes
1 answer
Binding property from within custom GTK widget, `self` does not implement ObjectType despite being a widget
I'm using gtk-rs with GTK4. I have a custom widget representing a row in a GtkListView widget. My custom widget (MyRow) is defined exactly as done in the book (see https://github.com/gtk-rs/gtk4-rs/tree/master/book/listings/todo/1/task_row).
I want…

Nicolas
- 6,611
- 3
- 29
- 73
0
votes
1 answer
How to get/set selected items of GTK4's ColumnView?
I'm trying to replace Gtk.TreeView with Gtk.ColumnView
for Gtk.TreeView (with Gtk.TreeStore) I have following code to get/set selection:
# get selection
selection = .get_selection()
model, treeiter =…

mi4code
- 1
- 3
0
votes
1 answer
What is the pie chart in Nautilus when copying for a widget
I am developing a Python program with a GTK4 GUI and would like to use the pie chart which is also displayed in Nautilus when copying files etc.
Can anyone tell me if this is a standard GUI element and what it is called?
enter image description…

Sebastian Jäpel
- 1
- 1
0
votes
1 answer
How to set the GTK4 tooltip delay in gtk-rs?
I can do like
let button = Button::builder().label("Click me..!")
.tooltip_text("You have to click this..!")
.margin_top(24)
.margin_bottom(24)
…

Redu
- 25,060
- 6
- 56
- 76
0
votes
1 answer
Textview and some buttons in column GTK
I'm trying to create a layout with an text view and in the 2nd column 4 buttons aligned vertically. I tried reading documentation but the window isn't rendered or button stay aligned horizontally.
…