gtk3

How to modify a LD_LIBRARY_PATH environment variable?

跟風遠走 提交于 2021-02-08 11:37:54
问题 I have Ubuntu 16.04, and installing gtk+3.22.20, a version of GLIB >= 2.49.4 is needed. When running the 'configure' script, it says it detects that GLIB is 2.48.2. However, 'pkg-config --modversion glib-2.0' returns 2.52.3 since I installed that version. They suggest to: "remove the old version of GLib. You may also be able to fix the error by modifying your LD_LIBRARY_PATH enviroment variable, or by editing /etc/ld.so.conf. Make sure you have run ldconfig if that is required on your system.

Create popover that can overpass window area

爱⌒轻易说出口 提交于 2021-02-08 11:00:28
问题 There is a small window application (50x50px) with only one image inside of it. When you click the image, a popover(GtkPopover) appears, but it cannot overpass the window borders and only part of it is shown. How could I solve this issue without resizing the window? 回答1: Popovers in GTK under X11 cannot extend outside of the top-level window they belong to, because they do not use a separate windowing system surface; if they did, like menus, they would not be able to remain open even when

Create popover that can overpass window area

有些话、适合烂在心里 提交于 2021-02-08 10:59:58
问题 There is a small window application (50x50px) with only one image inside of it. When you click the image, a popover(GtkPopover) appears, but it cannot overpass the window borders and only part of it is shown. How could I solve this issue without resizing the window? 回答1: Popovers in GTK under X11 cannot extend outside of the top-level window they belong to, because they do not use a separate windowing system surface; if they did, like menus, they would not be able to remain open even when

OpenCV - Getting picture from default webcam in C/C++ - GTK Issues

﹥>﹥吖頭↗ 提交于 2021-02-08 08:51:13
问题 I have a simple GTK+ v3 GUI application, and I am making use of the OpenCV library so that I have a simple function for taking pictures from the one webcam connected to my computer. The code is included at the bottom of this post. I'm able to successfully acquire image data and render it on screen, but when I include this code in my GTK+ v3 project, I get a startup error like so: (result:2944): Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+3 in the same process is not

Force background of matplotlib figure to be transparent

余生长醉 提交于 2021-02-07 14:44:26
问题 I'm trying to include a matplotlib figure in a Python Gtk3 application I'm writing. I'd like to set the background colour of the figure to be transparent, so that the figure just shows up against the natural grey background of the application, but nothing I've tried so far seems to be working. Here's an MWE: from gi.repository import Gtk import matplotlib.pyplot as plt import matplotlib.lines as mlines import numpy as np from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as

Force background of matplotlib figure to be transparent

橙三吉。 提交于 2021-02-07 14:44:25
问题 I'm trying to include a matplotlib figure in a Python Gtk3 application I'm writing. I'd like to set the background colour of the figure to be transparent, so that the figure just shows up against the natural grey background of the application, but nothing I've tried so far seems to be working. Here's an MWE: from gi.repository import Gtk import matplotlib.pyplot as plt import matplotlib.lines as mlines import numpy as np from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as

Force background of matplotlib figure to be transparent

偶尔善良 提交于 2021-02-07 14:43:19
问题 I'm trying to include a matplotlib figure in a Python Gtk3 application I'm writing. I'd like to set the background colour of the figure to be transparent, so that the figure just shows up against the natural grey background of the application, but nothing I've tried so far seems to be working. Here's an MWE: from gi.repository import Gtk import matplotlib.pyplot as plt import matplotlib.lines as mlines import numpy as np from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as

select certain monitor for going fullscreen with gtk

时光怂恿深爱的人放手 提交于 2021-02-07 14:42:54
问题 I intend to change the monitor where I show a fullscreen window. This is especially interesting when having a projector hooked up. I've tried to use fullscreen_on_monitor but that doesn't produce any visible changes. Here is a non-working example: #!/usr/bin/env python import sys import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk from gi.repository import Gdk w = Gtk.Window() screen = Gdk.Screen.get_default() print ("Montors: %d" % screen.get_n_monitors()) if len(sys

python GTK3 limit label width

﹥>﹥吖頭↗ 提交于 2021-02-07 11:46:14
问题 I've got a set of labels in a flowbox, the problem is that I would like for these labels to be 96px wide at most. I've set label.set_ellipsize(True), but since the flowbox gives them as much room as they like they don't get ellipsized, even though I've set their size request to 96px wide. I've tried every function I could find that seemed even tangentially related on all the widgets involved, but nothing seems to work. the only workaround I did find was using set_min_children_per_line() but

Reopen window throws Gtk-CRITICAL **: gtk_widget_get_window: assertion 'GTK_IS_WIDGET (widget)' failed

拜拜、爱过 提交于 2021-02-05 08:44:09
问题 I have simple python3 + gtk3 code, which connects to dbus and listen for all events. When user click on icon in tray, he must see window with all showed earlier events. Code(I don't know where is problem and code size > 100 lines): https://github.com/rakshazi/notify-feed/blob/master/main.py How to reproduce: Run python main.py L117 Click on app icon in tray - will be opened window, it can be empty or with some items if any notifications was shown after run. L83 Close window. L93 Retry step #2