369 questions
0
votes
0
answers
22
views
Why does the titlebar crossfade transition work one way and not the other using libadwaita?
In the first code example, there is a crossfade animation that happens between changes.
import sys
import gi
# Require specifically GTK 4.0 and Adwaita 1
gi.require_version('Gtk', '4.0')
gi....
1
vote
1
answer
89
views
GTK4 App in Rust: How to add application icon (gresource)?
I have started developing a small app in Rust using GTK4 bindings on Linux Mint.
I have created the following resources.gresource.xml in the project directory:
<?xml version="1.0" ...
0
votes
0
answers
51
views
When can I reliably query the preferred size of a GTK4 Entry upon
I have the following PyGObject code as an MWE:
import gi
gi.require_version("Gtk", "4.0")
from gi.repository import Gtk, GLib
class FontSizeApp(Gtk.Application):
def __init__(...
1
vote
1
answer
45
views
GTK4 Run-time errors setting label text in a callback
I have a simple GTK4 C program that displays a dropdown with 3 choices and a label. The callback for the dropdown notify::selected-item event passes the label as the 2nd argument.
The callback is ...
0
votes
0
answers
13
views
gtk4-rs dispose_template dispose doesn't dispose non-bound widgets
Dispose tempalte disposes only bound widgets. Is there a way to dispose all children graph?
Here are the details.
Object implementation:
#[derived_properties]
impl ObjectImpl for MyWidget {
...
2
votes
1
answer
85
views
Catch mouse enter and leave signals from AppplicationWindow in GTK4 Python
I'm creating a Gtk4 app in python 3 and I want to trigger a state change when the user mouses over the ApplicationWindow but I'm banging my head against a wall trying to figure out what signal string ...
1
vote
0
answers
44
views
Not seeing webview within webkitgtk-6.0 when embedded with gtk box?
Whenever I use a GtkBox to hold a WebKitWebView, it does not display on screen. However when directly appending the WebKitWebView as the child of the window, it does.
This works:
GtkWidget *...
1
vote
0
answers
89
views
How do you apply transformations to an arbitrary GTK widget which will not trigger layout recomputations?
Since GTK's CSS implementation doesn't support transform: property for arbitrary widgets, you have to do it other ways. E.g., you can apply a GskTransform to a widget, but unfortunately it only works ...
0
votes
0
answers
89
views
I am getting a blank black window when I run the rust app
I am using gtk4 for building a gui application. However I am facing issue upon running a sample code for testing.
use gtk4 as gtk;
use gtk::prelude::*;
use gtk::{glib, Application, ApplicationWindow, ...
0
votes
1
answer
47
views
Unable to create header unit for gtkmm4
Trying to create gtkmm 4 header unit using g++ 15 with:
g++ -std=c++23 -fmodules -fsearch-include-path -fmodule-header gtkmm.h `pkg-config --cflags gtkmm-4.0`
I get the following error:
/usr/...
0
votes
1
answer
43
views
How to pass a Sender from gtkApplication to gtkWindow?
I am passing the sender of on async channel to a modal window so that the modal window can send messages to the parent window:
...
let (tx, rx): (Sender<ApplicationMessage>, Receiver<...
-3
votes
1
answer
106
views
How to show a modal window in gtk4 and Rust?
I have gone through the examples for gtk4 and I am trying to show a 2nd window modally.
I am showing the main window as a composite template and would like to show a dialog that is also a composite ...
0
votes
0
answers
33
views
How to Justify (Fill) the Last Line of a Gtk.TextView in GTK4?
I am working on a GTK4 application using Python, and I am trying to justify (fill) the text in a Gtk.TextView. While the text is justified properly for most lines, the last line of the text block is ...
0
votes
0
answers
32
views
GTK4 application high CPU usage
I'm writing a GTK4 application, and it consumes very high CPU load. Digging in a bit, it turned out that I have enormously high amount of this system call (strace snippet):
recvmsg(14, {msg_namelen=0},...
0
votes
1
answer
113
views
How to create menus in GTK 4 with pygi?
I've googled about this quite a bit. I've put a number of examples of what I tried https://stromberg.dnsalias.org/svn/gtk-4-menu/trunk - I'm going to quote the closest one immediately below in case ...
0
votes
0
answers
49
views
How is simple Gtk 4.0 PopoverMenubar created using python3 as example?
Gtk documentation on migrating to Gtk4 mentions that
Tabular menus were rarely used and complicated the menu code, so they have not been brought over to GtkPopoverMenu. If you need complex layout in ...
1
vote
0
answers
70
views
How to drag & drop (move) GtkWindow using GtkGestureLongPress?
I am trying to move GtkWindow via GtkGestureLongPress. I want to implement it in VTE base terminal app. My script is given below. The problem is -
I ran the ping(ping 127.0.0.1) command in the ...
1
vote
1
answer
80
views
How to remove selected item from GtkColumnview by clicking Gtkbutton?
I am trying to remove the selected item from a column view. I found this demo script from this site, which was explained by another user for the sort function. It has 2 columns, I want, when I click ...
0
votes
0
answers
52
views
Touch scrolling causes persistent text field cursor and segmentation fault in entry widgets
I have a sample GTK4 application where a list of entries is arranged vertically in a scrolled window. When I test the application using a mouse by continuously scrolling the window, the app does not ...
1
vote
1
answer
66
views
Why is GtkPopover autohide not working because of this child widget?
I want to use GtkText widget inside GtkPopover. But the problem is, when I try to copy text from GtkText widget by right clicking (via GtkText default context menu); then GtkPopover autohide stops ...
1
vote
1
answer
63
views
How to add GtkLabel With exit Icon/button on GtkStackSwitcher page?
I am using GtkStackSwitcher and GtkStack widget in gtk4, trying to add window close icon/button and label together in GtkStackSwitcher (page). I tried the demo script below. It is adding the page with ...
0
votes
1
answer
497
views
getting an error related to virtual:world while compiling a gtk application
I'm learning GTK, and I'm trying to get its hello world example program compile on my ubuntu 24.04 system, but I got this following message:
> gcc $(pkg-config --cflags gtk4) -o hello-world-gtk ...
2
votes
1
answer
104
views
Test widget GtkColumnView with language C et gtk4.10
based on this exemple
example-columnview-with-strings-gtk4-c
I test this new widget with my data
below a mwe code in order to select part with error
I have an error when I implement 7 callcak "...
1
vote
2
answers
301
views
How to rotate a widget in Gtk4
I have a Gtk.Label in an app I am working on migrating from Gtk3 to Gtk4. In Gtk3, Label had a set_angle method that allowed rotating a label about its center.
That was removed in Gtk4, but there isn'...
1
vote
0
answers
64
views
How can I print webpage to pdf using webkitgtk
I am using webitgtk6
#include <webkit/webkit.h>
Here are printing result functions
static void print_finished(WebKitPrintOperation *operation, gpointer user_data)
{
g_print("Done\n&...