Questions tagged [gtk4]

194 questions
0
votes
2 answers

How to resize a Gtk4 window?

Here has a gtk4 window (ApplicationWindow) which contain a gtk Label. When I fill a long multi-line text in the label, the window auto become large width and height, this no problem. But I fill a short text in the label again, I want the window…
eexpress
  • 386
  • 1
  • 14
0
votes
1 answer

GTK4 Window Created From XML Immediately Closes

I create a GTK4 Window from an XML file via Python. When I run the code, the window actually pops up very briefly (and all controls are there as expected), but then closes immediately. I assume there is something missing in my code, but I can't…
Boris
  • 8,551
  • 25
  • 67
  • 120
0
votes
1 answer

Gtk progressbar setting CSS min-width has no effect

I try to use a smaller horizontal Gtk::ProgressBar in my project. The standard minimum width as defined in /usr/share/themes/Adwaita-maia/gtk-4.0/gtk.css is 150px : progressbar.horizontal > trough { min-width: 150px; } When I change the 150px…
0
votes
1 answer

Compiler error "unkown type name 'GtkWidget" with Code::Blocks

I know the similar question to this, this ain't it; although my case is extremely similar. The first 4 lines of the Code::Blocks "Hello World" program when you open a new GTK project are this: #include #include static void…
owl
  • 3
  • 3
0
votes
1 answer

C - GTK 4 - Able to remove row from liststore but unable to append row to liststore

I am trying to make a program in C with GTK 4.0 on and for Linux and I am trying to update all of the rows in a liststore and add some rows to the liststore. I can use gtk_list_store_remove but when I try to use gtk_list_store_append the program…
Gaming Doom
  • 113
  • 1
  • 8
0
votes
0 answers

Gtk Window to Gdk Surface in GTK4

I was wondering how I could get the X11 window ID for a Gtk Window in gtk4. I have seen other answers before regarding gtk3, but they don't seem to work in the latest gtk4. I found gdk_x11_surface_get_xid, but I can't pass a GtkWidget to that. I…
Ank i zle
  • 2,089
  • 3
  • 14
  • 36
0
votes
1 answer

How do I replicate the gtk_button_click function in GTK4

All, As I continue to learn how to migrate code I built for GTK3 to GTK4, I continue to encounter instances where functions in GTK3 no longer exist in GTK4. As an example, I had built a small test program that uses a standard button with an image…
NoDakker
  • 3,390
  • 1
  • 10
  • 11
0
votes
1 answer

Convert PIL.Image to/from Gtk.Picture/Gtk.Image in gtk4

I do RGBA image manipulation in PIL(low) and would like to display the resulting image in a gtk4 application. For that, I'd need a seamless PIL.Image <--> Gtk.Picture/Gtk.Image converter. I'd like to avoid using temporary files at all cost. I found…
Andrej Prsa
  • 551
  • 3
  • 14
0
votes
0 answers

I can't make Gtk Picture Widget currect size

[the picture widget fills a strange space][1] [1]: https://i.stack.imgur.com/Hktgz.png I've set both halign and valign for every widget to Gtk.Align.START, but while the label widget works okay, the picture widget still fills the window until there…
0
votes
1 answer

How to change theme in GTK4.0 on windows?

I'm new to development using GTK. I installed gtkmm4.0 on windows using mingw64, but i noticed that the applications generated follow the default theme(adwaita); however i want to change that and use the windows 10 native theme. Where is the…
Goemon0992
  • 17
  • 6
0
votes
1 answer

How to capture names of clicked folders in the right pane of a GtkFileChooserWidget (GTK4)?

My box runs Ubuntu 21.10. I use GTK4, C-language and XML description of the GUI. I am new to GUIs in general, and to GTK4 in particular. The program uses a GtkFileChooserWidget because I need a Widget which, in addition to being embedded to the main…
fmb1
  • 3
  • 1
0
votes
1 answer

xubuntu 21.10 g++ gtk4 "error: ‘gtk_container_add’ was not declared in this scope"

xubuntu 21.10 g++ gtk4 give me next error while I compile my source codes in console (terminal) "error: ‘gtk_container_add’ was not declared in this scope". #include Which libs (deb packets) I need install to my xubuntu 21.10 and…
aleks_yolp
  • 17
  • 3
0
votes
1 answer

gtkmm4: Gtk::Button click signal doesn't fire when in Gtk::HeaderBar

I'm using gtkmm4. I have a Gtk::Window, Gtk::Button, and Gtk::HeaderBar. I've packed the Button to the end of the HeaderBar and then set the Window's titlebar to the headerbar. My code looks something like this: class Window: public…
NintendoZaedus
  • 653
  • 3
  • 8
  • 22
0
votes
1 answer

Get calculated size of widget in GTK 4.0

Is it possible to find out the calculated size of a widget, say, GtkButton and when the size changes under GTK 4.0? Ive tried a bunch of different things and none seem to work. It looks like under GTK 3.0 it was possible to use a size-allocate…
Ian Harrigan
  • 836
  • 6
  • 14
0
votes
1 answer

Gtk4: Example of gtk_popover_menu_bar_add_child

I am looking for an example of the utilization of the function: gtk_popover_menu_bar_add_child In particular how to setup what the documentation is calling the ‘id’ So far I could not find anything on the web. I understand that I need to use the…
1 2 3
12
13