Skip to content

Commit

Permalink
improve styling of module section expander button
Browse files Browse the repository at this point in the history
  • Loading branch information
elstoc authored and TurboGit committed Jan 15, 2021
1 parent b69a1c1 commit f51e05e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
19 changes: 19 additions & 0 deletions data/themes/darktable.css
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,25 @@ overshoot.right
margin: 2px 0 6px 0;
}

/* Control sections that can be expanded/collapsed need to be handled differently */

#iop-plugin-ui .section-expander #section_label,
#lib-plugin-ui .section-expander #section_label
{
margin: 0;
}

#lib-plugin-ui .section-expander,
#iop-plugin-ui .section-expander {
padding: 12px 0 6px 0;
}

#lib-plugin-ui .section-expander #control-button,
#iop-plugin-ui .section-expander #control-button {
padding: 0;
margin: 0;
}

/* Special modules: image infos, navigation and search ones */
#image-info
{
Expand Down
2 changes: 2 additions & 0 deletions src/iop/temperature.c
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,8 @@ void gui_init(struct dt_iop_module_t *self)
GtkWidget *destdisp_head = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, DT_BAUHAUS_SPACE);
GtkWidget *header_evb = gtk_event_box_new();
GtkWidget *destdisp = dt_ui_section_label_new(_("channel coefficients"));
context = gtk_widget_get_style_context(destdisp_head);
gtk_style_context_add_class(context, "section-expander");
gtk_container_add(GTK_CONTAINER(header_evb), destdisp);

g->coeffs_toggle = dtgtk_togglebutton_new(dtgtk_cairo_paint_solid_arrow, CPF_STYLE_BOX | CPF_DIRECTION_LEFT, NULL);
Expand Down
2 changes: 2 additions & 0 deletions src/libs/import.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,8 @@ void gui_init(dt_lib_module_t *self)
// collapsible section
GtkWidget *destdisp_head = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
GtkWidget *header_evb = gtk_event_box_new();
GtkStyleContext *context = gtk_widget_get_style_context(destdisp_head);
gtk_style_context_add_class(context, "section-expander");
GtkWidget *destdisp = dt_ui_section_label_new(_("parameters"));
gtk_container_add(GTK_CONTAINER(header_evb), destdisp);

Expand Down

0 comments on commit f51e05e

Please sign in to comment.