![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <gtk/gtk.h>
Include dependency graph for label.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| G_BEGIN_DECLS gchar * | delete_underscore (const char *s) |
| gchar * | strip_markup (const char *s) |
| Remove Pango/Gtk markup and accel mnemonics from a text label. If markup parsing fails, fall back to a copy of the original string. | |
| void | dt_ui_section_label_set (GtkWidget *label) |
| GtkWidget * | dt_ui_section_label_new (const gchar *str) |
| GtkWidget * | dt_ui_label_new (const gchar *str) |
| void | dt_ellipsize_combo (GtkComboBox *cbox) |
| void | dt_gui_set_symbolic_icon (GtkWidget *image, const char *icon_name, GtkIconSize size, const GdkRGBA *color) |
| Set a symbolic icon on an image widget, optionally forcing a specific color. | |
| void | dt_gui_textview_set_padding (GtkTextView *textview) |
| Apply the standard recessed-input text padding to a GtkTextView. | |
| G_BEGIN_DECLS gchar * delete_underscore | ( | const char * | s | ) |
Remove the underscores GTK reads as mnemonic markers from a label. Newly-allocated; the caller frees it.
Remove the underscores GTK reads as mnemonic markers from a label.
Definition at line 62 of file label.c.
References dt_string_replace().
Referenced by _blendop_update_top_enable_label(), _gui_styles_dialog_run(), _history_store_prepend_item(), _hm_clean_module_name(), _iop_panel_label(), _ioporder_create_graph_node(), dt_gui_hist_dialog_new(), dt_history_item_get_name(), dt_history_item_get_name_html(), dt_iop_gui_init(), dt_lib_init_module(), dt_lib_unload_module(), and strip_markup().
| void dt_ellipsize_combo | ( | GtkComboBox * | cbox | ) |
| void dt_gui_set_symbolic_icon | ( | GtkWidget * | image, |
| const char * | icon_name, | ||
| GtkIconSize | size, | ||
| const GdkRGBA * | color | ||
| ) |
Set a symbolic icon on an image widget, optionally forcing a specific color.
gtk_image_set_from_icon_name() colors symbolic icons from the current CSS "color", but ansel.css's main theme provider is loaded at GTK_STYLE_PROVIDER_PRIORITY_USER + 1, which outranks any per-widget provider added at the more common GTK_STYLE_PROVIDER_PRIORITY_APPLICATION and silently wins the cascade. Loading the icon as a pre-tinted pixbuf via GtkIconInfo sidesteps CSS entirely, so the requested color always wins. Pass color = NULL for the normal (untinted, theme-foreground) rendering.
Definition at line 29 of file label.c.
References color, height, IS_NULL_PTR, L, MAX, size, and width.
Referenced by _studio_import_update_state().
| void dt_gui_textview_set_padding | ( | GtkTextView * | textview | ) |
Apply the standard recessed-input text padding to a GtkTextView.
CSS padding on the textview "text" node is parsed but ignored for layout in GTK3, so the 2px/4px inset matching entry/treeview (see data/themes/.css) has to be set on the widget itself.
| textview | The GtkTextView to update. |
Definition at line 136 of file label.c.
References DT_PIXEL_APPLY_DPI, and L.
Referenced by _active_modules_popup(), _pop_menu_dictionary_create_tag(), _pop_menu_dictionary_edit_tag(), gui_init(), and init_tab_general().
A plain label: start-aligned, capitalised, ellipsized.
Definition at line 112 of file label.c.
References dt_capitalize_label(), dt_free, and L.
Referenced by dt_gui_preferences_bool(), dt_gui_preferences_enum(), dt_gui_preferences_int(), dt_gui_preferences_string(), dt_iop_gui_init_blendif(), gui_init(), gui_init(), gui_init(), gui_init(), gui_init(), and gui_init().
A section heading. Capitalised: grammar says sentences start with a capital, and typography says it makes the structure of the text easier to pick out.
Definition at line 101 of file label.c.
References dt_capitalize_label(), dt_free, dt_ui_section_label_set(), and L.
Referenced by _build_complete_ui(), _build_primaries_ui(), _build_simple_ui(), _configure_slider_blocks(), _ensure_page_widgets(), _new_section_label(), dt_gui_new_collapsible_section(), gui_init(), gui_init(), gui_init(), gui_init(), and gui_init_section().
Turn an existing label into a section heading: full width, centred, ellipsized.
Definition at line 91 of file label.c.
References dt_gui_add_class(), and L.
Referenced by dt_ui_section_label_new().
| gchar * strip_markup | ( | const char * | s | ) |
Remove Pango/Gtk markup and accel mnemonics from a text label. If markup parsing fails, fall back to a copy of the original string.
| s | Original string to clean |
Definition at line 74 of file label.c.
References delete_underscore(), IS_NULL_PTR, and L.
Referenced by _styles_get_submenu(), add_generic_top_menu_entry(), add_generic_top_submenu_entry(), and set_menu_entry().