From ffb26cb2f10083d3f96cfb2db2d726f558afb1b5 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 9 Jan 2023 14:36:44 -0700 Subject: [PATCH] Change tree icon size from 20px to 16px Can be overridden in CSS now --- api/js/etemplate/et2_widget_tree.ts | 16 ++++++++++------ api/templates/default/etemplate2.css | 3 +++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/api/js/etemplate/et2_widget_tree.ts b/api/js/etemplate/et2_widget_tree.ts index a95e7b3b1f..dbf9089a82 100644 --- a/api/js/etemplate/et2_widget_tree.ts +++ b/api/js/etemplate/et2_widget_tree.ts @@ -218,16 +218,20 @@ export class et2_tree extends et2_inputWidget createTree(widget) { widget.input = new dhtmlXTreeObject({ - parent: widget.div[0], - width: '100%', - height: '100%', - image_path: widget.options.image_path, - checkbox: widget.options.multiple + parent: widget.div[0], + width: '100%', + height: '100%', + image_path: widget.options.image_path, + checkbox: widget.options.multiple }); + // Allow controlling icon size by CSS + widget.input.def_img_x = ""; + widget.input.def_img_y = ""; + // to allow "," in value, eg. folder-names, IF value is specified as array widget.input.dlmtr = ':}-*('; - if (widget.options.std_images) + if(widget.options.std_images) { widget.setImages.apply(widget, widget.options.std_images.split(',')); } diff --git a/api/templates/default/etemplate2.css b/api/templates/default/etemplate2.css index 3fd3a24c70..e45a7cd9dc 100644 --- a/api/templates/default/etemplate2.css +++ b/api/templates/default/etemplate2.css @@ -4112,6 +4112,9 @@ button.shortcut-buttons-flatpickr-button { font-weight: 700; } +.standartTreeImage img { + width: 16px; +} .selectedTreeRow { background-color: rgba(102, 153, 204, 0.7);