Questions tagged [gtk4]

194 questions
2
votes
1 answer

Libadwaita on windows 10 & 11

I am new to GTK development. I started using GTK4 and it is really grea. As far as I understand libadwaita is used for reflecting dynamic system changes of colors (light/dark/contrast, etc) in a GTK4 application. This is system solution and if so, I…
kkemic
  • 59
  • 3
2
votes
1 answer

How do I get the string value contained in an EntryBuffer?

I'm working on a GTK4 application in Rust but having difficulty understanding EntryBuffers. I cant seem to find a function that returns the contained text of an EntryBuffer. I've tried to_string(), but I always get a string containing "EntryBuffer"…
2
votes
1 answer

In rust and gtk4, why does not gtk::Label satisfy gtk::Widget?

I'm trying to learn rust with its gtk4 bindings and decided to try ListStore as a model for ListBox. In order to bind the model, function which returns Widget is needed, but i need a Label. Why doesn't Label, which inherits Widget (implements…
mspehar
  • 527
  • 1
  • 6
  • 19
2
votes
1 answer

GTK4: Picture does not shrink

I am trying to insert an image into a header bar in GTK4. The image should fit the height of the parent widget. In gtk4-rs I tried: let image = gtk::Picture::builder() .hexpand(false) .vexpand(false) …
2
votes
1 answer

How do I make scrollable combo boxes scrollable using GTK4?

I am trying to make a combo box which contains a lot of items. Due to its length it hits the bottom of the screen. Here is an example of what happens when it hits the bottom of the screen: There are 80 items in the combo box, but it can only…
hopital
  • 53
  • 1
  • 6
2
votes
1 answer

Unable to compile GTK4 on Fedora with Hello World example Despite having all the requisite packages

I have read the install instructions on GTK for GTK4, which I used sudo dnf install gtk4 gtk4-devel The code of the Hello, World example is #include static void print_hello (GtkWidget *widget, gpointer data) { g_print…
Yammins
  • 61
  • 3
2
votes
1 answer

[GTK4][C] How should actions connect with menu items?

I'm making an application using GTK4 in C language. I'm trying to connect some actions with menu items but such items are inactive, i.e., they are not clickable while they appear. I don't know a way to solve this problem so any help are…
user
  • 153
  • 5
2
votes
1 answer

How do you set X11 window hints using gtk4-rs?

I am trying to write a GTK4 application in rust that should be compliant with parts of the Extended Window Manager Hints spec, but for that I need to be able to get and set X11 hints. In particular, I want to set _NET_WM_WINDOW_TYPE. If I were to…
1
vote
0 answers

How do I obtain a refernce to widgets in Relm4 Component?

I'm building an app using the Relm4 SimpleComponent / Component macro. It works great. But I don't understand how can I refer to the generated GTK widgets later? My understanding is that the update_view() method is automatically handled by the…
user2297996
  • 1,382
  • 3
  • 18
  • 28
1
vote
2 answers

how to get the state of a grouped gtk.CheckButton using Action

I'm trying to get the state of a gtk.CheckButton using Action since gtk docs says: When the code must keep track of the state of a group of radio buttons, it is recommended to keep track of such state through a stateful GAction with a target for…
raven
  • 775
  • 6
  • 22
1
vote
3 answers

How do you limit the number of GtkColumnView rows

I'm trying to reduce the load time of a ColumnView widget with lots of rows. quoting from gtk list widget documentation: While it is not a problem for short lists to instantiate widgets for every item in the model, once lists grow to thousands or…
raven
  • 775
  • 6
  • 22
1
vote
1 answer

GTK4 ScrolledWindow renders content unreadable

I am learning GTK4 and Python. While playing round with the Gtk.StackSidebar class, I came across this strange behavior that I cannot seem to figure out. I want my sidebar on the left, and my content to be scrollable. To do this I introduced a…
1
vote
1 answer

How to prevent text view from outgrowing window gtk4

Suppose I have the following layout in GTK4: A vertical box in a window containing three child widgets: ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Widget 1 ┃ ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫ ┃ …
idka
  • 131
  • 7
1
vote
0 answers

error: G_TEST_SUBPROCESS_DEFAULT undeclared when building gtkmm-4.0

I was trying to install gtkmm-4.0 and since my distro only ships gtkmm-3.0 I decided to build myself. Installed all the dependencies from the official gtkmm installation website and gave it a go. meson setup succeeded. But ninja failed with this…
Tony
  • 81
  • 9
1
vote
0 answers

GTK Installs Under "gtk-4.0" the Include Statements in the Source Code Become Obsolete

OS: Linux Mint 21.1 x86_64 As stated in GTK's official site (https://www.gtk.org/docs/installations/linux/) I downloaded the dev package for my distribution as: sudo apt-get install libgtk-4-dev The installation completed successfully and installed…
Di0n
  • 65
  • 4
1 2
3
12 13