gpt4 book ai didi

vala - vala 中的 GtkColorChooser 对话框

转载 作者:行者123 更新时间:2023-12-04 05:32:40 44 4
gpt4 key购买 nike

我想在我的应用程序中使用颜色选择器对话框 - https://github.com/satya164/gtk-theme-config

我在 vala 中找不到关于 ColorChooserDialog 的任何文档。目前我正在使用颜色按钮来选择颜色。但是我在编译时收到以下弃用警告,我使用的是 Vala 0.16.1 和 GTK3.6(警告没有出现在 GTK3.4 中)。我找不到有关使用 ColorChooser 对话框的示例。如果有人能帮我实现 ColorChooserDialog,我将不胜感激。

valac --pkg gtk+-3.0 -X -lm gtk-theme-config.vala -o gtk-theme-config
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c: In function ‘theme_pref_window_set_values’:
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1013:2: warning: ‘gtk_color_button_set_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:100): Use 'gtk_color_chooser_set_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1016:2: warning: ‘gtk_color_button_set_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:100): Use 'gtk_color_chooser_set_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1019:2: warning: ‘gtk_color_button_set_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:100): Use 'gtk_color_chooser_set_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1022:2: warning: ‘gtk_color_button_set_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:100): Use 'gtk_color_chooser_set_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1025:2: warning: ‘gtk_color_button_set_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:100): Use 'gtk_color_chooser_set_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c: In function ‘theme_pref_window_on_selected_color_set’:
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1499:2: warning: ‘gtk_color_button_get_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:103): Use 'gtk_color_chooser_get_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c: In function ‘theme_pref_window_on_panelbg_color_set’:
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1519:2: warning: ‘gtk_color_button_get_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:103): Use 'gtk_color_chooser_get_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c: In function ‘theme_pref_window_on_panelfg_color_set’:
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1536:2: warning: ‘gtk_color_button_get_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:103): Use 'gtk_color_chooser_get_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c: In function ‘theme_pref_window_on_menubg_color_set’:
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1553:2: warning: ‘gtk_color_button_get_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:103): Use 'gtk_color_chooser_get_rgba' instead [-Wdeprecated-declarations]
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c: In function ‘theme_pref_window_on_menufg_color_set’:
/home/satya/Workspace/gtk-theme-config/gtk-theme-config.vala.c:1570:2: warning: ‘gtk_color_button_get_rgba’ is deprecated (declared at /usr/include/gtk-3.0/gtk/gtkcolorbutton.h:103): Use 'gtk_color_chooser_get_rgba' instead [-Wdeprecated-declarations]

最佳答案

将您的 Vala 升级到最新的 0.17.x 版本(或暂时忽略警告——它们没有任何危害)。

关于vala - vala 中的 GtkColorChooser 对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12383427/

44 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com